congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
CachedMethod.getParamsCount
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.codehaus.groovy/groovy

public static void genCallWithFixedParams(ClassWriter cw, String name, final String superClass, CachedMethod cachedMethod, String receiverType ) {
  if (cachedMethod.getParamsCount() > 4) return;
  
  StringBuilder pdescb = new StringBuilder();
  final int pc = cachedMethod.getParamsCount();
  for (int i = 0; i != pc; ++i) pdescb.append("Ljava/lang/Object;");
  
  writeMethod(cw,name,pc+2,superClass,cachedMethod,receiverType,pdescb.toString(),false);
}
origin: org.codehaus.groovy/groovy

private static void createMetaMethods(final Class extensionClass, final List<MetaMethod> metaMethods, final boolean isStatic) {
  CachedClass cachedClass = ReflectionCache.getCachedClass(extensionClass);
  CachedMethod[] methods = cachedClass.getMethods();
  for (CachedMethod method : methods) {
    if (method.isStatic() && method.isPublic() && method.getParamsCount() > 0) {
      // an extension method is found
      metaMethods.add(isStatic?new NewStaticMetaMethod(method) : new NewInstanceMetaMethod(method));
    }
  }
}
origin: org.codehaus.groovy/groovy

private static void createIsValidMethodMethod(CachedMethod method, ClassWriter cw, String className) {
  MethodVisitor mv;
  if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
origin: org.codehaus.groovy/groovy

mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL, "doMethodInvoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", null, null);
mv.visitCode();
if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
  mv.visitVarInsn(ALOAD, 1);
  BytecodeHelper.doCast(mv, method.getParameterTypes()[0].getTheClass());
origin: org.kohsuke.droovy/groovy

public static void genCallWithFixedParams(ClassWriter cw, String name, final String superClass, CachedMethod cachedMethod, String receiverType ) {
  if (cachedMethod.getParamsCount() > 4) return;
  
  StringBuilder pdescb = new StringBuilder();
  final int pc = cachedMethod.getParamsCount();
  for (int i = 0; i != pc; ++i) pdescb.append("Ljava/lang/Object;");
  
  writeMethod(cw,name,pc+2,superClass,cachedMethod,receiverType,pdescb.toString(),false);
}
origin: org.codehaus.groovy/groovy-jdk14

public static void genCallWithFixedParams(ClassWriter cw, String name, final String superClass, CachedMethod cachedMethod, String receiverType ) {
  if (cachedMethod.getParamsCount() > 4) return;
  
  StringBuilder pdescb = new StringBuilder();
  final int pc = cachedMethod.getParamsCount();
  for (int i = 0; i != pc; ++i) pdescb.append("Ljava/lang/Object;");
  
  writeMethod(cw,name,pc+2,superClass,cachedMethod,receiverType,pdescb.toString(),false);
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public static void genCallWithFixedParams(ClassWriter cw, String name, final String superClass, CachedMethod cachedMethod, String receiverType ) {
  if (cachedMethod.getParamsCount() > 4) return;
  
  StringBuilder pdescb = new StringBuilder();
  final int pc = cachedMethod.getParamsCount();
  for (int i = 0; i != pc; ++i) pdescb.append("Ljava/lang/Object;");
  
  writeMethod(cw,name,pc+2,superClass,cachedMethod,receiverType,pdescb.toString(),false);
}
origin: org.codehaus.groovy/groovy-jdk14

helper = new BytecodeHelper(mv);
mv.visitCode();
if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
  mv.visitVarInsn(ALOAD,1);
  helper.doCast(method.getParameterTypes()[0].getTheClass());
mv.visitEnd();
if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
origin: org.kohsuke.droovy/groovy

helper = new BytecodeHelper(mv);
mv.visitCode();
if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
  mv.visitVarInsn(ALOAD,1);
  helper.doCast(method.getParameterTypes()[0].getTheClass());
mv.visitEnd();
if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

private static void createIsValidMethodMethod(CachedMethod method, ClassWriter cw, String className) {
  MethodVisitor mv;
  if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

mv = cw.visitMethod(ACC_PUBLIC + ACC_FINAL, "doMethodInvoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", null, null);
mv.visitCode();
if (method.getParamsCount() == 2 && method.getParameterTypes()[0].isNumber && method.getParameterTypes()[1].isNumber) {
  mv.visitVarInsn(ALOAD, 1);
  BytecodeHelper.doCast(mv, method.getParameterTypes()[0].getTheClass());
org.codehaus.groovy.reflectionCachedMethodgetParamsCount

Popular methods of CachedMethod

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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