| Constructor and Description |
|---|
Java8() |
| 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 |
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 method,
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)
transform meta method.
|
MetaMethod |
transformMetaMethod(MetaClass metaClass,
MetaMethod metaMethod,
Class<?> caller)
transform meta method
|
boolean |
trySetAccessible(AccessibleObject ao)
Set the
accessible flag for this reflected object to true
if possible. |
public static GenericsType configureTypeVariableDefinition(ClassNode base, ClassNode[] cBounds)
public Class<?>[] getPluginDefaultGroovyMethods()
getPluginDefaultGroovyMethods in interface VMPluginpublic int getVersion()
VMPlugingetVersion in interface VMPluginprotected int getElementCode(ElementType value)
protected Parameter[] processParameters(CompileUnit compileUnit, Method m)
public void setAdditionalClassInformation(ClassNode cn)
setAdditionalClassInformation in interface VMPluginpublic Class<?>[] getPluginStaticGroovyMethods()
getPluginStaticGroovyMethods in interface VMPluginpublic void configureAnnotationNodeFromDefinition(AnnotationNode definition, AnnotationNode root)
configureAnnotationNodeFromDefinition in interface VMPluginpublic void configureAnnotation(AnnotationNode node)
configureAnnotation in interface VMPluginpublic void configureClassNode(CompileUnit compileUnit, ClassNode classNode)
configureClassNode in interface VMPluginprotected Parameter makeParameter(CompileUnit cu, Type type, Class<?> cl, Annotation[] annotations, String name)
public 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<?> caller)
VMPlugintransformMetaMethod in interface VMPluginmetaClass - meta classmetaMethod - the original meta methodcaller - caller class, whose method sets accessible for methodspublic MetaMethod transformMetaMethod(MetaClass metaClass, MetaMethod metaMethod)
VMPlugintransformMetaMethod in interface VMPluginmetaClass - meta classmetaMethod - the original meta methodpublic void invalidateCallSites()
invalidateCallSites in interface VMPluginpublic Object getInvokeSpecialHandle(Method method, Object receiver)
VMPlugingetInvokeSpecialHandle 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 nullThrowable