public abstract class JavaBeansConfiguration extends Configuration
_add, _add1, _and, _divide, _eq, _ge, _gt, _le, _lt, _mod, _multiply, _negate, _not, _or, _shiftArithmetic, _shiftLeft, _shiftRight, _subtract, _subtract1, _xor, normalConfiguration
Constructor and Description |
---|
JavaBeansConfiguration()
Constructor
|
JavaBeansConfiguration(java.lang.Class stopClass)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
callConstructor(Context context,
java.lang.Class c,
java.lang.Object[] args,
java.lang.Class[] types)
Calls a constructor
|
java.lang.Object |
callMethod(Context context,
java.lang.Class c,
java.lang.String name,
java.lang.Object[] args,
java.lang.Class[] types,
java.lang.Object target)
Calls a method
|
protected java.lang.Object |
getBeanProperty(Context context,
java.lang.Object target,
java.lang.String name)
Gets a Bean property of the specified bean.
|
java.lang.reflect.Constructor[] |
getConstructors(java.lang.Class cls)
Get all public constructors of the specified class.
|
java.lang.Object |
getField(Context context,
java.lang.Object target,
java.lang.String name)
Gets a Bean property of the specified bean.
|
java.lang.reflect.Method[] |
getMethods(java.lang.Class cls)
Collects the Bean methods for the specified class.
|
protected java.lang.Class |
getStopClass() |
void |
putField(Context context,
java.lang.Object target,
java.lang.String name,
java.lang.Object value)
Sets a Bean property of the specified bean.
|
protected void |
setBeanProperty(Context context,
java.lang.Object target,
java.lang.String name,
java.lang.Object value)
Sets a Bean property of the specified bean.
|
createList, createMap, formatObject, getDefault, getDefaultImports, getElement, getInitialClassLoader, getRange, getStaticField, handleUndefinedSymbol, initializeOperators, invokeMethod, makeArray, putStaticField, setElement, setRange, toCallable, toEnumeration
public JavaBeansConfiguration()
public JavaBeansConfiguration(java.lang.Class stopClass)
protected java.lang.Class getStopClass()
public java.lang.reflect.Method[] getMethods(java.lang.Class cls)
getMethods
in class Configuration
cls
- the classpublic java.lang.reflect.Constructor[] getConstructors(java.lang.Class cls)
getConstructors
in class Configuration
cls
- the classpublic java.lang.Object getField(Context context, java.lang.Object target, java.lang.String name)
getField
in class Configuration
context
- the context in which the property is readtarget
- the target beanname
- the Bean property nameprotected java.lang.Object getBeanProperty(Context context, java.lang.Object target, java.lang.String name)
context
- the context in which the property is readtarget
- the target beanname
- the Bean property namepublic void putField(Context context, java.lang.Object target, java.lang.String name, java.lang.Object value)
putField
in class Configuration
context
- the context in which the property is readtarget
- the target beanname
- the Bean property namevalue
- the new property valueprotected void setBeanProperty(Context context, java.lang.Object target, java.lang.String name, java.lang.Object value)
context
- the context in which the property is readtarget
- the target beanname
- the Bean property namevalue
- the new property valuepublic java.lang.Object callMethod(Context context, java.lang.Class c, java.lang.String name, java.lang.Object[] args, java.lang.Class[] types, java.lang.Object target)
callMethod
in class Configuration
context
- the contexctc
- the class of the methodname
- the name of the methodargs
- argumentstypes
- type information of each argumentstarget
- the target object of the method callpublic java.lang.Object callConstructor(Context context, java.lang.Class c, java.lang.Object[] args, java.lang.Class[] types)
callConstructor
in class Configuration
context
- the contextc
- class of the constructorargs
- the argumentstypes
- type information of each arguments