|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--pnuts.lang.Runtime | +--pnuts.compiler.JavaAdapter
This class provides a way to extends a Java class in Pnuts.
Fields inherited from interface pnuts.compiler.Constants |
ACC_ABSTRACT,
ACC_FINAL,
ACC_NATIVE,
ACC_PRIVATE,
ACC_PROTECTED,
ACC_PUBLIC,
ACC_STATIC,
ACC_SYNCHRONIZED,
ACC_TRANSIENT,
ACC_VOLATILE,
CONSTANT_Class,
CONSTANT_Double,
CONSTANT_Fieldref,
CONSTANT_Float,
CONSTANT_Integer,
CONSTANT_InterfaceMethodref,
CONSTANT_Long,
CONSTANT_Methodref,
CONSTANT_NameAndType,
CONSTANT_String,
CONSTANT_Utf8 |
Constructor Summary | |
protected |
JavaAdapter()
|
Method Summary | |
static java.lang.Class |
generateEventAdapter(java.lang.Class listenerType,
java.lang.String methodName)
Generate an adapter class for bean events. |
static java.lang.Class |
generateSubtype(java.lang.Class superClass,
java.lang.Class[] interfaces,
Package pkg,
Context context)
Generates a class that extends the superClass and implements the interfaces. |
static ClassFile |
getClassFileForEventAdapter(java.lang.String className,
java.lang.Class listenerType,
java.lang.String methodName)
Creates a class file of a event adapter that implements the specified listenerType. |
static ClassFile |
getClassFileForSubtype(java.lang.String className,
java.lang.Class superClass,
java.lang.Class[] interfaces,
Package pkg,
Context context)
Creates a class file image of a subtype of superClass (or some interfaces) and writes to the output stream. |
Methods inherited from class pnuts.lang.Runtime |
arrayType,
assignRange,
binary,
call,
callConstructor,
callConstructor,
callConstructor,
callFunction,
callMethod,
callMethod,
callMethod,
cast,
catchException,
checkException,
checkException,
compareTo,
escape,
exec,
execute,
fileToURL,
format,
getBeginLine,
getBottomType,
getCompiledScript,
getEndLine,
getField,
getFunction,
getFunction,
getFunctions,
getIndex,
getRuntime,
getScriptSource,
getScriptURL,
getStaticField,
isArray,
jump,
matchType,
namespaceRefreshed,
newInstance,
parseChar,
parseFloat,
parseInt,
parseString,
primitive,
printError,
putField,
putStaticField,
quantity,
range,
readSymbolTable,
setLine,
setLine,
setPackage,
transform,
unary,
writeSymbolTable |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected JavaAdapter()
Method Detail |
public static java.lang.Class generateSubtype(java.lang.Class superClass, java.lang.Class[] interfaces, Package pkg, Context context) throws java.lang.ClassNotFoundException
superClass
- super class that the generated class extendsinterfaces
- list of interfaces that the generated class implementspkg
- a Package that includes functions to be mapped to methods.context
- a Context in which functions are extracted from pkgpublic static java.lang.Class generateEventAdapter(java.lang.Class listenerType, java.lang.String methodName)
listenerType
- a Class object of a EventListener subclassmethodName
- a method name of the listener type.public static ClassFile getClassFileForSubtype(java.lang.String className, java.lang.Class superClass, java.lang.Class[] interfaces, Package pkg, Context context) throws java.lang.ClassNotFoundException
superClass
- super class that the generated class extendsinterfaces
- list of interfaces that the generated class implementspkg
- a Package that includes functions to be mapped to methods.context
- a Context in which functions are extracted from pkgpublic static ClassFile getClassFileForEventAdapter(java.lang.String className, java.lang.Class listenerType, java.lang.String methodName)
className
- the class name of the event adapterlistenerType
- a Class object of a EventListener subclassmethodName
- a method name of the listener type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |