| Constructor and Description |
|---|
Java5() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAccessible(Class<?> callerClass,
Class<?> declaringClass,
int memberModifiers,
boolean allowIllegalAccess)
check whether the member can be accessed or not
|
boolean |
checkCanSetAccessible(AccessibleObject accessibleObject,
Class<?> callerClass)
The following scenarios can not set accessible, i.e.
|
void |
configureAnnotation(AnnotationNode node) |
void |
configureAnnotationFromDefinition(AnnotationNode definition,
AnnotationNode root)
Deprecated.
|
void |
configureAnnotationNodeFromDefinition(AnnotationNode definition,
AnnotationNode root) |
void |
configureClassNode(CompileUnit compileUnit,
ClassNode classNode) |
static GenericsType |
configureTypeVariableDefinition(ClassNode base,
ClassNode[] cBounds) |
static ClassNode |
configureTypeVariableReference(String name) |
protected int |
getElementCode(ElementType value) |
Object |
getInvokeSpecialHandle(Method m,
Object receiver)
Returns a handle with bound receiver to invokeSpecial the given method.
|
Class[] |
getPluginDefaultGroovyMethods() |
Class[] |
getPluginStaticGroovyMethods() |
int |
getVersion()
Gives the version the plugin is made for
|
void |
invalidateCallSites() |
Object |
invokeHandle(Object handle,
Object[] args)
Invokes a handle produced by #getInvokeSpecialdHandle
|
protected Parameter |
makeParameter(CompileUnit cu,
Type type,
Class cl,
Annotation[] annotations,
String name) |
protected Parameter[] |
processParameters(CompileUnit compileUnit,
Method m) |
void |
setAdditionalClassInformation(ClassNode cn) |
MetaMethod |
transformMetaMethod(MetaClass metaClass,
MetaMethod metaMethod,
Class<?>[] params,
Class<?> caller)
transform meta method
|
boolean |
trySetAccessible(AccessibleObject ao)
Set the
accessible flag for this reflected object to true
if possible. |
public void setAdditionalClassInformation(ClassNode cn)
setAdditionalClassInformation in interface VMPluginpublic static GenericsType configureTypeVariableDefinition(ClassNode base, ClassNode[] cBounds)
public Class[] getPluginDefaultGroovyMethods()
getPluginDefaultGroovyMethods in interface VMPluginpublic Class[] getPluginStaticGroovyMethods()
getPluginStaticGroovyMethods in interface VMPlugin@Deprecated public void configureAnnotationFromDefinition(AnnotationNode definition, AnnotationNode root)
public void configureAnnotationNodeFromDefinition(AnnotationNode definition, AnnotationNode root)
configureAnnotationNodeFromDefinition in interface VMPluginpublic void configureAnnotation(AnnotationNode node)
configureAnnotation in interface VMPluginprotected int getElementCode(ElementType value)
public void configureClassNode(CompileUnit compileUnit, ClassNode classNode)
configureClassNode in interface VMPluginprotected Parameter[] processParameters(CompileUnit compileUnit, Method m)
protected Parameter makeParameter(CompileUnit cu, Type type, Class cl, Annotation[] annotations, String name)
public void invalidateCallSites()
invalidateCallSites in interface VMPluginpublic Object getInvokeSpecialHandle(Method m, Object receiver)
VMPlugingetInvokeSpecialHandle in interface VMPluginpublic int getVersion()
VMPlugingetVersion in interface VMPluginpublic Object invokeHandle(Object handle, Object[] args) throws Throwable
VMPlugininvokeHandle in interface VMPluginhandle - the handleargs - arguments for the method call, can be empty but not nullThrowablepublic boolean checkCanSetAccessible(AccessibleObject accessibleObject, Class<?> callerClass)
checkCanSetAccessible in interface VMPluginaccessibleObject - the accessible object to checkcallerClass - the callerClass to invoke setAccessiblepublic boolean checkAccessible(Class<?> callerClass, Class<?> declaringClass, int memberModifiers, boolean allowIllegalAccess)
VMPlugincheckAccessible in interface VMPlugincallerClass - callerClass the callerClass to invoke setAccessibledeclaringClass - the type of member ownermemberModifiers - modifiers of memberallowIllegalAccess - whether to allow illegal accesspublic boolean trySetAccessible(AccessibleObject ao)
VMPluginaccessible flag for this reflected object to true
if possible.trySetAccessible in interface VMPluginao - the accessible objecttrue if the accessible flag is set to true;
false if access cannot be enabled.public MetaMethod transformMetaMethod(MetaClass metaClass, MetaMethod metaMethod, Class<?>[] params, Class<?> caller)
VMPlugintransformMetaMethod in interface VMPluginmetaClass - meta classmetaMethod - the original meta methodparams - parameter typescaller - caller type