Package de.odysseus.el.tree
Class Bindings
- java.lang.Object
-
- de.odysseus.el.tree.Bindings
-
- All Implemented Interfaces:
TypeConverter
,java.io.Serializable
public class Bindings extends java.lang.Object implements TypeConverter
Bindings, usually created by aTree
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Bindings.MethodWrapper
Wrap aMethod
for serialization.
-
Field Summary
Fields Modifier and Type Field Description private TypeConverter
converter
private java.lang.reflect.Method[]
functions
private static java.lang.reflect.Method[]
NO_FUNCTIONS
private static javax.el.ValueExpression[]
NO_VARIABLES
private static long
serialVersionUID
private javax.el.ValueExpression[]
variables
-
Fields inherited from interface de.odysseus.el.misc.TypeConverter
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description Bindings(java.lang.reflect.Method[] functions, javax.el.ValueExpression[] variables)
Constructor.Bindings(java.lang.reflect.Method[] functions, javax.el.ValueExpression[] variables, TypeConverter converter)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
convert(java.lang.Object value, java.lang.Class<T> type)
Apply type conversion.boolean
equals(java.lang.Object obj)
java.lang.reflect.Method
getFunction(int index)
Get function by index.javax.el.ValueExpression
getVariable(int index)
Get variable by index.int
hashCode()
boolean
isFunctionBound(int index)
Test if given index is bound to a function.boolean
isVariableBound(int index)
Test if given index is bound to a variable.private void
readObject(java.io.ObjectInputStream in)
private void
writeObject(java.io.ObjectOutputStream out)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
NO_FUNCTIONS
private static final java.lang.reflect.Method[] NO_FUNCTIONS
-
NO_VARIABLES
private static final javax.el.ValueExpression[] NO_VARIABLES
-
functions
private transient java.lang.reflect.Method[] functions
-
variables
private final javax.el.ValueExpression[] variables
-
converter
private final TypeConverter converter
-
-
Constructor Detail
-
Bindings
public Bindings(java.lang.reflect.Method[] functions, javax.el.ValueExpression[] variables)
Constructor.
-
Bindings
public Bindings(java.lang.reflect.Method[] functions, javax.el.ValueExpression[] variables, TypeConverter converter)
Constructor.
-
-
Method Detail
-
getFunction
public java.lang.reflect.Method getFunction(int index)
Get function by index.- Parameters:
index
- function index- Returns:
- method
-
isFunctionBound
public boolean isFunctionBound(int index)
Test if given index is bound to a function. This method performs an index check.- Parameters:
index
- identifier index- Returns:
true
if the given index is bound to a function
-
getVariable
public javax.el.ValueExpression getVariable(int index)
Get variable by index.- Parameters:
index
- identifier index- Returns:
- value expression
-
isVariableBound
public boolean isVariableBound(int index)
Test if given index is bound to a variable. This method performs an index check.- Parameters:
index
- identifier index- Returns:
true
if the given index is bound to a variable
-
convert
public <T> T convert(java.lang.Object value, java.lang.Class<T> type)
Apply type conversion.- Specified by:
convert
in interfaceTypeConverter
- Parameters:
value
- value to converttype
- target type- Returns:
- converted value
- Throws:
javax.el.ELException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
writeObject
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-