Tabnine Logo
CachedMethod.setAccessible
Code IndexAdd Tabnine to your IDE (free)

How to use
setAccessible
method
in
org.codehaus.groovy.reflection.CachedMethod

Best Java code snippets using org.codehaus.groovy.reflection.CachedMethod.setAccessible (Showing top 20 results out of 315)

origin: org.codehaus.groovy/groovy

public PogoCachedMethodSite(CallSite site, MetaClassImpl metaClass, CachedMethod metaMethod, Class[] params) {
  super(site, metaClass, metaMethod, params);
  reflect = metaMethod.setAccessible();
}
origin: org.codehaus.groovy/groovy

public PojoCachedMethodSite(CallSite site, MetaClassImpl metaClass, MetaMethod metaMethod, Class[] params) {
  super(site, metaClass, metaMethod, params);
  reflect = ((CachedMethod)metaMethod).setAccessible();
}
origin: org.codehaus.groovy/groovy

public Object invoke(Object object, Object[] arguments) {
  try {
    return method.setAccessible().invoke(object, arguments);
  } catch (IllegalArgumentException | IllegalAccessException e) {
    throw new InvokerInvocationException(e);
  } catch (InvocationTargetException e) {
    throw e.getCause() instanceof RuntimeException ? (RuntimeException)e.getCause() : new InvokerInvocationException(e);
  }
}
origin: groovy/groovy-core

  static void doIt () {

    new A ().protectedMethod();

    try {
      CachedMethod m = CachedMethod.find(A.class.getDeclaredMethod("protectedMethod", new Class [0] ));
      Object[] arguments = new Object[0];
      m.setAccessible().invoke(new A(), arguments);
    } catch (NoSuchMethodException e) {
    } catch (IllegalAccessException e) {
    } catch (InvocationTargetException e) {
    }
  }
}
origin: org.codehaus.groovy/groovy

public static Constructor compilePogoMethod(CachedMethod cachedMethod) {
  ClassWriter cw = makeClassWriter();
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genPogoMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: org.codehaus.groovy/groovy

public static Constructor compilePojoMethod(CachedMethod cachedMethod) {
  ClassWriter cw = makeClassWriter();
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genPojoMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: org.codehaus.groovy/groovy

public static Constructor compileStaticMethod(CachedMethod cachedMethod) {
  ClassWriter cw = makeClassWriter();
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genStaticMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: org.codehaus.groovy/groovy

Method method = cachedMethod.setAccessible();
Class<?>[] parameters = method.getParameterTypes();
int size = parameters.length;
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public PojoCachedMethodSite(CallSite site, MetaClassImpl metaClass, MetaMethod metaMethod, Class[] params) {
  super(site, metaClass, metaMethod, params);
  reflect = ((CachedMethod)metaMethod).setAccessible();
}
origin: org.codehaus.groovy/groovy-all-minimal

public Object invoke(Object object, Object[] arguments) {
  try {
    return setAccessible().invoke(object, arguments);
  } catch (IllegalArgumentException e) {
    throw new InvokerInvocationException(e);
  } catch (IllegalAccessException e) {
    throw new InvokerInvocationException(e);
  } catch (InvocationTargetException e) {
    throw new InvokerInvocationException(e);
  }
}
origin: org.kohsuke.droovy/groovy

public Object invoke(Object object, Object[] arguments) {
  try {
    return method.setAccessible().invoke(object, arguments);
  } catch (IllegalArgumentException e) {
    throw new InvokerInvocationException(e);
  } catch (IllegalAccessException e) {
    throw new InvokerInvocationException(e);
  } catch (InvocationTargetException e) {
    throw new InvokerInvocationException(e);
  }
}
origin: org.codehaus.groovy/groovy-all-minimal

public Object invoke(Object object, Object[] arguments) {
  try {
    return method.setAccessible().invoke(object, arguments);
  } catch (IllegalArgumentException e) {
    throw new InvokerInvocationException(e);
  } catch (IllegalAccessException e) {
    throw new InvokerInvocationException(e);
  } catch (InvocationTargetException e) {
    throw new InvokerInvocationException(e);
  }
}
origin: org.codehaus.groovy/groovy-jdk14

public static Constructor compilePogoMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(true);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genPogoMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: org.kohsuke.droovy/groovy

public static Constructor compileStaticMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(true);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genStaticMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: org.kohsuke.droovy/groovy

public static Constructor compilePojoMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(true);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genPojoMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: org.codehaus.groovy/groovy-jdk14

public static Constructor compileStaticMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(true);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genStaticMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: org.kohsuke.droovy/groovy

public static Constructor compilePogoMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(true);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genPogoMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public static Constructor compilePogoMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genPogoMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public static Constructor compileStaticMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genStaticMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public static Constructor compilePojoMethod(CachedMethod cachedMethod) {
  ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
  final CachedClass declClass = cachedMethod.getDeclaringClass();
  final CallSiteClassLoader callSiteLoader = declClass.getCallSiteLoader();
  final String name = callSiteLoader.createClassName(cachedMethod.setAccessible());
  final byte[] bytes = genPojoMetaMethodSite(cachedMethod, cw, name);
  
  return callSiteLoader.defineClassAndGetConstructor(name, bytes);
}
org.codehaus.groovy.reflectionCachedMethodsetAccessible

Popular methods of CachedMethod

  • getCachedMethod
  • <init>
  • find
  • isStatic
  • compareTo
  • compareToCachedMethod
  • compareToMethod
  • getDeclaringClass
  • getDescriptor
  • getModifiers
  • getName
  • getNativeParameterTypes
  • getName,
  • getNativeParameterTypes,
  • getParameterTypes,
  • getReturnType,
  • toString,
  • correctArguments,
  • createPogoMetaMethodSite,
  • createPojoMetaMethodSite,
  • createStaticMetaMethodSite

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • BoxLayout (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now