|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.googlecode.sarasvati.impl.NestedReadEnv
public class NestedReadEnv
Constructor Summary | |
---|---|
NestedReadEnv(ReadEnv outerEnv,
ReadEnv innerEnv)
|
Method Summary | ||
---|---|---|
String |
getAttribute(String name)
Gets an attribute as a String. |
|
|
getAttribute(String name,
Class<T> type)
Returns the given attribute, transformed into the given type. |
|
|
getAttribute(String name,
Class<T> type,
T defaultValue)
Returns the given attribute, transformed into the given type. |
|
Iterable<String> |
getAttributeNames()
Returns an Iterable of attribute names. |
|
boolean |
hasAttribute(String name)
Checks if the given attribute is present. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NestedReadEnv(ReadEnv outerEnv, ReadEnv innerEnv)
Method Detail |
---|
public Iterable<String> getAttributeNames()
ReadEnv
getAttributeNames
in interface ReadEnv
public String getAttribute(String name)
ReadEnv
getAttribute
in interface ReadEnv
name
- The name of the attribute to get
public <T> T getAttribute(String name, Class<T> type)
ReadEnv
getAttribute
in interface ReadEnv
T
- The type which the attribute should be returned as.name
- The name of the attribute to get.type
- The class type which the attribute should be transformed to.
public <T> T getAttribute(String name, Class<T> type, T defaultValue)
ReadEnv
getAttribute
in interface ReadEnv
T
- The type which the attribute should be returned as.name
- The name of the attribute to get.type
- The class type which the attribute should be transformed to.defaultValue
- The value to return if no value is set.
public boolean hasAttribute(String name)
ReadEnv
hasAttribute
in interface ReadEnv
name
- Name of the attribute to check for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |