|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpnuts.lang.Configuration
pnuts.lang.JavaBeansConfiguration
public abstract class JavaBeansConfiguration
This is a configuration for JavaBeans. Only methods in method descriptors can be called. Field access expression reads/writes property of the Beans.
Field Summary |
---|
Fields inherited from class pnuts.lang.Configuration |
---|
_add, _add1, _and, _divide, _eq, _ge, _gt, _le, _lt, _mod, _multiply, _negate, _not, _or, _shiftArithmetic, _shiftLeft, _shiftRight, _subtract, _subtract1, _xor, normalConfiguration |
Constructor Summary | |
---|---|
JavaBeansConfiguration()
Constructor |
|
JavaBeansConfiguration(java.lang.Class stopClass)
Constructor |
Method Summary | |
---|---|
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. |
Methods inherited from class pnuts.lang.Configuration |
---|
createList, createMap, formatObject, getDefault, getDefaultImports, getElement, getInitialClassLoader, getRange, getStaticField, handleUndefinedSymbol, initializeOperators, invokeMethod, makeArray, putStaticField, setElement, setRange, toCallable, toEnumeration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaBeansConfiguration()
public JavaBeansConfiguration(java.lang.Class stopClass)
Method Detail |
---|
protected java.lang.Class getStopClass()
public java.lang.reflect.Method[] getMethods(java.lang.Class cls)
getMethods
in class Configuration
cls
- the class
public java.lang.reflect.Constructor[] getConstructors(java.lang.Class cls)
getConstructors
in class Configuration
cls
- the class
public 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 name
protected 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 call
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |