congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CachedMethod.getDeclaringClass
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.codehaus.groovy/groovy

  protected Object noSuchMethod(CachedMethod method, Object object, Object[] arguments) {
    throw new MissingMethodException(method.getName(), method.getDeclaringClass().getTheClass(), arguments, false);
  }
}
origin: org.codehaus.groovy/groovy

private int compareToCachedMethod(CachedMethod other) {
  if (other == null)
    return -1;
  final int strComp = getName().compareTo(other.getName());
  if (strComp != 0)
    return strComp;
  final int retComp = getReturnType().getName().compareTo(other.getReturnType().getName());
  if (retComp != 0)
    return retComp;
  CachedClass[] params = getParameterTypes();
  CachedClass[] otherParams = other.getParameterTypes();
  final int pd = params.length - otherParams.length;
  if (pd != 0)
    return pd;
  for (int i = 0; i != params.length; ++i) {
    final int nameComp = params[i].getName().compareTo(otherParams[i].getName());
    if (nameComp != 0)
      return nameComp;
  }
  final int classComp = cachedClass.toString().compareTo(other.getDeclaringClass().toString());
  if (classComp != 0)
    return classComp;
  throw new RuntimeException("Should never happen");
}
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

private static void createInvokeMethod(CachedMethod method, ClassWriter cw, Class returnType, String methodDescriptor) {
  MethodVisitor mv;
  mv = cw.visitMethod(ACC_PUBLIC, "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", null, null);
  mv.visitCode();
  mv.visitVarInsn(ALOAD, 1);
  BytecodeHelper.doCast(mv, method.getParameterTypes()[0].getTheClass());
  loadParameters(method, 2, mv);
  mv.visitMethodInsn(INVOKESTATIC, BytecodeHelper.getClassInternalName(method.getDeclaringClass().getTheClass()), method.getName(), methodDescriptor, false);
  BytecodeHelper.box(mv, returnType);
  if (method.getReturnType() == void.class) {
    mv.visitInsn(ACONST_NULL);
  }
  mv.visitInsn(ARETURN);
  mv.visitMaxs(0, 0);
  mv.visitEnd();
}
origin: org.codehaus.groovy/groovy

Class callClass = cachedMethod.getDeclaringClass().getTheClass();
boolean useInterface = callClass.isInterface();
origin: org.codehaus.groovy/groovy

  loadParameters(method, 2, mv);
mv.visitMethodInsn(INVOKESTATIC, BytecodeHelper.getClassInternalName(method.getDeclaringClass().getTheClass()), method.getName(), methodDescriptor, false);
BytecodeHelper.box(mv, returnType);
if (method.getReturnType() == void.class) {
origin: org.codehaus.groovy/groovy-all-minimal

  protected Object noSuchMethod(CachedMethod method, Object object, Object[] arguments) {
    throw new MissingMethodException(method.getName(), method.getDeclaringClass().getTheClass(), arguments, false);
  }
}
origin: org.kohsuke.droovy/groovy

  protected Object noSuchMethod(CachedMethod method, Object object, Object[] arguments) {
    throw new MissingMethodException(method.getName(), method.getDeclaringClass().getTheClass(), arguments, false);
  }
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

  protected Object noSuchMethod(CachedMethod method, Object object, Object[] arguments) {
    throw new MissingMethodException(method.getName(), method.getDeclaringClass().getTheClass(), arguments, false);
  }
}
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 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.codehaus.groovy/groovy-jdk14

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.reflectionCachedMethodgetDeclaringClass

Popular methods of CachedMethod

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

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • String (java.lang)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top PhpStorm 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