Examples of makeArray()


Examples of org.allspice.bytecode.TypeName.makeArray()

      }
      if (t == null) {
        return context.makeTypeRef(new TypeName("Object[]"));
      }
      TypeName tn = TypeName.valueOf(t) ;
      return context.makeTypeRef(tn.makeArray());
    }
 
    @Override
    public ConstObj getConst(ArrayOfExpr t, EvaluationContext context) {
      return null ;
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

    private static ClassNode makeArray(ClassNode base, List<Expression> sizeExpression) {
        ClassNode ret = base.makeArray();
        if (sizeExpression == null) return ret;
        int size = sizeExpression.size();
        for (int i = 1; i < size; i++) {
            ret = ret.makeArray();
        }
        return ret;
    }

    public ArrayExpression(ClassNode elementType, List<Expression> expressions, List<Expression> sizeExpression) {
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

    private static ClassNode makeArray(ClassNode base, List<Expression> sizeExpression) {
        ClassNode ret = base.makeArray();
        if (sizeExpression == null) return ret;
        int size = sizeExpression.size();
        for (int i = 1; i < size; i++) {
            ret = ret.makeArray();
        }
        return ret;
    }

    public ArrayExpression(ClassNode elementType, List<Expression> expressions, List<Expression> sizeExpression) {
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

    private static ClassNode makeArray(ClassNode base, List sizeExpression) {
      ClassNode ret = base.makeArray();
      if (sizeExpression==null) return ret;
      int size = sizeExpression.size();
      for (int i=1; i<size; i++) {
        ret = ret.makeArray();
      }
      return ret;
    }
   
    public ArrayExpression(ClassNode elementType, List expressions, List sizeExpression) {
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

        if (!isAic) {
            ClassNode enumRef = enumClass.getPlainNodeReference();

            // create values field
            values = new FieldNode("$VALUES", PRIVATE_FS | Opcodes.ACC_SYNTHETIC, enumRef.makeArray(), enumClass, null);
            values.setSynthetic(true);

            addMethods(enumClass, values);
            checkForAbstractMethods(enumClass);
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

        ClassNode enumRef = enumClass.getPlainNodeReference();

        {
            // create values() method
            MethodNode valuesMethod = new MethodNode("values", PUBLIC_FS, enumRef.makeArray(), new Parameter[0], ClassNode.EMPTY_ARRAY, null);
            valuesMethod.setSynthetic(true);
            BlockStatement code = new BlockStatement();
            MethodCallExpression cloneCall = new MethodCallExpression(new FieldExpression(values), "clone", MethodCallExpression.NO_ARGUMENTS);
            cloneCall.setMethodTarget(values.getType().getMethod("clone", Parameter.EMPTY_ARRAY));
            code.addStatement(new ReturnStatement(cloneCall));
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

        // }
        declaringClass.addMethod(
                new MethodNode(
                        "getVetoableChangeListeners",
                        ACC_PUBLIC,
                        vclClassNode.makeArray(),
                        Parameter.EMPTY_ARRAY,
                        ClassNode.EMPTY_ARRAY,
                        returnS(callX(fieldX(vcsField), "getVetoableChangeListeners"))));

        // add method:
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

        // }
        declaringClass.addMethod(
                new MethodNode(
                        "getVetoableChangeListeners",
                        ACC_PUBLIC,
                        vclClassNode.makeArray(),
                        params(param(ClassHelper.STRING_TYPE, "name")),
                        ClassNode.EMPTY_ARRAY,
                        returnS(callX(fieldX(vcsField), "getVetoableChangeListeners", args(varX("name", ClassHelper.STRING_TYPE))))));
    }
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

        // }
        declaringClass.addMethod(
                new MethodNode(
                        "getPropertyChangeListeners",
                        ACC_PUBLIC,
                        pclClassNode.makeArray(),
                        Parameter.EMPTY_ARRAY,
                        ClassNode.EMPTY_ARRAY,
                        returnS(callX(fieldX(pcsField), "getPropertyChangeListeners"))));

        // add method:
View Full Code Here

Examples of org.codehaus.groovy.ast.ClassNode.makeArray()

        // }
        declaringClass.addMethod(
                new MethodNode(
                        "getPropertyChangeListeners",
                        ACC_PUBLIC,
                        pclClassNode.makeArray(),
                        params(param(ClassHelper.STRING_TYPE, "name")),
                        ClassNode.EMPTY_ARRAY,
                        returnS(callX(fieldX(pcsField), "getPropertyChangeListeners", args(varX("name", ClassHelper.STRING_TYPE))))));
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.