Codota Logo
ClassNode.addObjectInitializerStatements
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain ClassNode
private void myMethod () {
ClassNode c =
  • Codota IconExpression expression;expression.getType()
  • Codota IconMethodNode methodNode;methodNode.getReturnType()
  • Codota IconString name;ClassHelper.make(name)
  • Smart code suggestions by Codota
}
origin: org.codehaus.groovy/groovy

protected void objectInit(AST init) {
  BlockStatement code = (BlockStatement) statementList(init);
  classNode.addObjectInitializerStatements(code);
}
origin: org.codehaus.groovy/groovy

private void addInitContextClassLoaderIfNeeded(ClassNode classNode) {
  if (initContextClassLoader) {
    Statement initStatement = stmt(callX(
            callX(THREAD_CLASSNODE, "currentThread"),
            "setContextClassLoader",
            callX(callThisX("getClass"), "getClassLoader")
        )
    );
    classNode.addObjectInitializerStatements(initStatement);
  }
}
origin: org.codehaus.groovy/groovy

              Statement stmt = stmt(assignX(varX(fieldNode.getName(), fieldNode.getType()), mce));
              if (isStatic == 0) {
                cNode.addObjectInitializerStatements(stmt);
              } else {
                List<Statement> staticStatements = new ArrayList<Statement>();
cNode.addObjectInitializerStatements(new ExpressionStatement(
    new MethodCallExpression(
        new ClassExpression(helperClassNode),
origin: org.kohsuke.droovy/groovy

protected void objectInit(AST init) {        
  BlockStatement code = (BlockStatement) statementList(init);
  classNode.addObjectInitializerStatements(code);
}

origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

protected void objectInit(AST init) {
  BlockStatement code = (BlockStatement) statementList(init);
  classNode.addObjectInitializerStatements(code);
}
origin: org.codehaus.groovy/groovy-all-minimal

protected void objectInit(AST init) {        
  BlockStatement code = (BlockStatement) statementList(init);
  classNode.addObjectInitializerStatements(code);
}

origin: org.codehaus.groovy/groovy-jdk14

protected void objectInit(AST init) {        
  BlockStatement code = (BlockStatement) statementList(init);
  classNode.addObjectInitializerStatements(code);
}

origin: org.codehaus.griffon/griffon-groovy-compile

private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) {
  BlockStatement body = new BlockStatement();
  body.addStatement(stmnt(
    call(
      call(THIS, propertyName + "Property", NO_ARGS),
      "addListener",
      args
    )
  ));
  classNode.addObjectInitializerStatements(body);
}
origin: org.codehaus.griffon/griffon-groovy-compile

private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) {
  BlockStatement body = new BlockStatement();
  body.addStatement(stmnt(
    call(
      call(THIS, propertyName + "Property", NO_ARGS),
      "addListener",
      args
    )
  ));
  classNode.addObjectInitializerStatements(body);
}
origin: org.codehaus.griffon/griffon-groovy-compile

private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) {
  BlockStatement body = new BlockStatement();
  body.addStatement(stmnt(
    call(
      call(THIS, propertyName + "Property", NO_ARGS),
      "addListener",
      args
    )
  ));
  classNode.addObjectInitializerStatements(body);
}
origin: org.codehaus.griffon/griffon-groovy-compile

  private static void addListenerStatement(ClassNode classNode, ArgumentListExpression args) {
    BlockStatement body = new BlockStatement();
    body.addStatement(new ExpressionStatement(
      new MethodCallExpression(
        VariableExpression.THIS_EXPRESSION,
        "addPropertyChangeListener",
        args
      )
    ));

    classNode.addObjectInitializerStatements(body);
  }
}
origin: org.codehaus.griffon/griffon-groovy-compile

private static void addListenerStatement(ClassNode classNode, String propertyName, ArgumentListExpression args) {
  BlockStatement body = new BlockStatement();
  body.addStatement(stmnt(
    call(
      call(THIS, propertyName + "Property", NO_ARGS),
      "addListener",
      args
    )
  ));
  classNode.addObjectInitializerStatements(body);
}
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

private void addInitContextClassLoaderIfNeeded(ClassNode classNode) {
  if (initContextClassLoader) {
    Statement initStatement = new ExpressionStatement(
        new MethodCallExpression(
            new StaticMethodCallExpression(THREAD_CLASSNODE, "currentThread", ArgumentListExpression.EMPTY_ARGUMENTS),
            "setContextClassLoader",
            new MethodCallExpression(
                new MethodCallExpression(VariableExpression.THIS_EXPRESSION, "getClass", MethodCallExpression.NO_ARGUMENTS),
                "getClassLoader",
                ArgumentListExpression.EMPTY_ARGUMENTS
            )
        )
    );
    classNode.addObjectInitializerStatements(initStatement);
  }
}
org.codehaus.groovy.astClassNodeaddObjectInitializerStatements

Javadoc

Adds a statement to the object initializer.

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

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • IsNull (org.hamcrest.core)
    Is the value null?
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