public class JavaDispatchImpl extends Object implements JavaDispatch
Constructor and Description |
---|
JavaDispatchImpl(CompilingClassLoader ccl)
This constructor initializes a dispatcher for handling static members.
|
JavaDispatchImpl(CompilingClassLoader ccl,
Object target)
This constructor initializes a dispatcher around a particular instance.
|
Modifier and Type | Method and Description |
---|---|
Field |
getField(int dispId) |
Object |
getFieldValue(int dispId) |
protected Member |
getMember(int dispId) |
MethodAdaptor |
getMethod(int dispId) |
Object |
getTarget() |
boolean |
isField(int dispId) |
boolean |
isMethod(int dispId) |
void |
setFieldValue(int dispId,
Object value) |
public JavaDispatchImpl(CompilingClassLoader ccl)
ccl
- class loader to use for dispatching member accesspublic JavaDispatchImpl(CompilingClassLoader ccl, Object target)
ccl
- class loader to use for dispatching member accesstarget
- the instance object to use for dispatching member accessesNullPointerException
- if target is nullpublic Field getField(int dispId)
getField
in interface JavaDispatch
dispId
- the unique number of a fieldpublic Object getFieldValue(int dispId)
getFieldValue
in interface JavaDispatch
dispId
- the unique number of a fieldIllegalArgumentException
public MethodAdaptor getMethod(int dispId)
getMethod
in interface JavaDispatch
dispId
- the unique number of a methodpublic Object getTarget()
getTarget
in interface JavaDispatch
public boolean isField(int dispId)
isField
in interface JavaDispatch
dispId
- the unique number of a method or fieldpublic boolean isMethod(int dispId)
isMethod
in interface JavaDispatch
dispId
- the unique number of a method or fieldpublic void setFieldValue(int dispId, Object value)
setFieldValue
in interface JavaDispatch
dispId
- the unique number of a fieldvalue
- the value to assign to the fieldIllegalArgumentException
protected Member getMember(int dispId)
dispId
- the unique number of a method or fieldCopyright © 2018. All rights reserved.