Codota Logo
CachedMethod.getParamsCount
Code IndexAdd Codota 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)

  • Common ways to obtain CachedMethod
private void myMethod () {
CachedMethod c =
  • Codota IconMethod method;CachedMethod.find(method)
  • Codota IconCachedClass cachedClass;new CachedMethod(cachedClass, declaredMethods[i])
  • Smart code suggestions by Codota
}
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

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Menu (java.awt)
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Collectors (java.util.stream)
  • ImageIO (javax.imageio)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now