congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ClassNode.addSyntheticMethod
Code IndexAdd Tabnine to your IDE (free)

How to use
addSyntheticMethod
method
in
org.codehaus.groovy.ast.ClassNode

Best Java code snippets using org.codehaus.groovy.ast.ClassNode.addSyntheticMethod (Showing top 12 results out of 315)

origin: org.codehaus.groovy/groovy

/**
 * Helper method to add a new method to a ClassNode.  Depending on the shouldBeSynthetic flag the
 * call will either be made to ClassNode.addSyntheticMethod() or ClassNode.addMethod(). If a non-synthetic method
 * is to be added the ACC_SYNTHETIC modifier is removed if it has been accidentally supplied.
 */
protected MethodNode addMethod(ClassNode node, boolean shouldBeSynthetic, String name, int modifiers, ClassNode returnType, Parameter[] parameters,
                ClassNode[] exceptions, Statement code) {
  if (shouldBeSynthetic) {
    return node.addSyntheticMethod(name, modifiers, returnType, parameters, exceptions, code);
  } else {
    return node.addMethod(name, modifiers & ~ACC_SYNTHETIC, returnType, parameters, exceptions, code);
  }
}
origin: org.codehaus.groovy/groovy

    new Parameter(ClassHelper.OBJECT_TYPE, "args")
};
MethodNode method = classNode.addSyntheticMethod(
    "this$dist$invoke$" + objectDistance,
    ACC_PUBLIC + ACC_SYNTHETIC,
    new Parameter(ClassHelper.OBJECT_TYPE, "value")
};
method = classNode.addSyntheticMethod(
    "this$dist$set$" + objectDistance,
    ACC_PUBLIC + ACC_SYNTHETIC,
    new Parameter(ClassHelper.STRING_TYPE, "name")
};
method = classNode.addSyntheticMethod(
    "this$dist$get$" + objectDistance,
    ACC_PUBLIC + ACC_SYNTHETIC,
origin: org.codehaus.groovy/groovy

staticMetaClassField.setSynthetic(true);
node.addSyntheticMethod(
    "$getStaticMetaClass",
    ACC_PROTECTED,
origin: org.codehaus.groovy/groovy

node.addSyntheticMethod(
    name, mods, ClassHelper.VOID_TYPE,
    Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, methodCode);
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

/**
 * Helper method to add a new method to a ClassNode.  Depending on the shouldBeSynthetic flag the
 * call will either be made to ClassNode.addSyntheticMethod() or ClassNode.addMethod(). If a non-synthetic method
 * is to be added the ACC_SYNTHETIC modifier is removed if it has been accidentally supplied.
 */
protected void addMethod(ClassNode node, boolean shouldBeSynthetic, String name, int modifiers, ClassNode returnType, Parameter[] parameters,
             ClassNode[] exceptions, Statement code) {
  if (shouldBeSynthetic) {
    node.addSyntheticMethod(name, modifiers, returnType, parameters, exceptions, code);
  } else {
    node.addMethod(name, modifiers & ~ACC_SYNTHETIC, returnType, parameters, exceptions, code);
  }
}
origin: org.codehaus.groovy/groovy-jdk14

/**
 * Helper method to add a new method to a ClassNode.  Depending on the shouldBeSynthetic flag the 
 * call will either be made to ClassNode.addSyntheticMethod() or ClassNode.addMethod(). If a non-synthetic method 
 * is to be added the ACC_SYNTHETIC modifier is removed if it has been accidentally supplied.
 */
private void addMethod(ClassNode node, boolean shouldBeSynthetic, String name, int modifiers, ClassNode returnType, Parameter[] parameters,
    ClassNode[] exceptions, Statement code) {
  if (shouldBeSynthetic) {
    node.addSyntheticMethod(name,modifiers,returnType,parameters,exceptions,code);
  } else {
    node.addMethod(name,modifiers&~ACC_SYNTHETIC,returnType,parameters,exceptions,code);            
  }
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

    new Parameter(ClassHelper.OBJECT_TYPE, "args")
};
MethodNode method = classNode.addSyntheticMethod(
    "this$dist$invoke$" + objectDistance,
    ACC_PUBLIC + ACC_SYNTHETIC,
    new Parameter(ClassHelper.OBJECT_TYPE, "value")
};
method = classNode.addSyntheticMethod(
    "this$dist$set$" + objectDistance,
    ACC_PUBLIC + ACC_SYNTHETIC,
    new Parameter(ClassHelper.STRING_TYPE, "name")
};
method = classNode.addSyntheticMethod(
    "this$dist$get$" + objectDistance,
    ACC_PUBLIC + ACC_SYNTHETIC,
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

staticMetaClassField.setSynthetic(true);
node.addSyntheticMethod(
    "$getStaticMetaClass",
    ACC_PROTECTED,
origin: org.kohsuke.droovy/groovy

staticMetaClassField.setSynthetic(true);
node.addSyntheticMethod(
  "$getStaticMetaClass",
  ACC_PROTECTED,
    node.addSyntheticMethod(
        "getMetaClass",
        ACC_PUBLIC | ACC_SYNTHETIC,
    node.addSyntheticMethod(
        "setMetaClass",
        ACC_PUBLIC,
    blockScope.putReferencedLocalVariable(vMethods);
    blockScope.putReferencedLocalVariable(vArguments);
    node.addSyntheticMethod(
        "invokeMethod",
        ACC_PUBLIC,
    node.addSyntheticMethod(
        "getProperty",
        ACC_PUBLIC,
    node.addSyntheticMethod(
        "setProperty",
        ACC_PUBLIC,
origin: org.codehaus.groovy/groovy-all-minimal

        EmptyStatement.INSTANCE);
node.addSyntheticMethod(
    "getMetaClass",
    ACC_PUBLIC,
node.addSyntheticMethod(
    "setMetaClass",
    ACC_PUBLIC,
node.addSyntheticMethod(
    "invokeMethod",
    ACC_PUBLIC,
node.addSyntheticMethod(
    "getProperty",
    ACC_PUBLIC,
});
node.addSyntheticMethod(
    "setProperty",
    ACC_PUBLIC,
origin: org.codehaus.groovy/groovy-jdk14

staticMetaClassField.setSynthetic(true);
node.addSyntheticMethod(
  "$getStaticMetaClass",
  ACC_PROTECTED,
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

String name = SWAP_INIT;
BlockStatement methodCode = new BlockStatement();
node.addSyntheticMethod(
    name, mods, ClassHelper.VOID_TYPE,
    Parameter.EMPTY_ARRAY, ClassNode.EMPTY_ARRAY, methodCode);
org.codehaus.groovy.astClassNodeaddSyntheticMethod

Javadoc

Adds a synthetic method as part of the compilation process

Popular methods of ClassNode

  • getName
  • getMethods
    This methods creates a list of all methods with this name of the current class and of all super clas
  • <init>
    Constructor used by makeArray() if no real class is available
  • getSuperClass
  • equals
  • addMethod
  • getAnnotations
  • addField
  • getFields
    Returns a list containing FieldNode objects for each field in the class represented by this ClassNod
  • getPlainNodeReference
  • getField
    Finds a field matching the given name in this class or a parent class.
  • getMethod
    Finds a method matching the given name and parameters in this class or any parent class.
  • getField,
  • getMethod,
  • isInterface,
  • getNameWithoutPackage,
  • isScript,
  • getDeclaredMethod,
  • getGenericsTypes,
  • getDeclaredConstructors,
  • getModifiers,
  • getTypeClass

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 25 Plugins for Webstorm
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