Package com.sun.codemodel

Examples of com.sun.codemodel.JDefinedClass.owner()


      if (jFieldVar.name().equals("coordinates")) {
        LOG.info("1+++ " + cc.implRef.name() + " " + jFieldVar.type().name() + " " + jFieldVar.name());

        final JDefinedClass candidateClass = cc.implClass;
        final JClass newInterfaceClass = candidateClass.owner().ref(interfaceClass).narrow(pool.getClassCoordinate());
        final JClass newCollectionClass = candidateClass.owner().ref(collectionClass).narrow(pool.getClassCoordinate());

        jFieldVar.type(newInterfaceClass);
        // Find original getter and setter methods to remove.
        final ArrayList<JMethod> methodsToRemove = new ArrayList<JMethod>();
View Full Code Here


      if (jFieldVar.name().equals("coordinates")) {
        LOG.info("1+++ " + cc.implRef.name() + " " + jFieldVar.type().name() + " " + jFieldVar.name());

        final JDefinedClass candidateClass = cc.implClass;
        final JClass newInterfaceClass = candidateClass.owner().ref(interfaceClass).narrow(pool.getClassCoordinate());
        final JClass newCollectionClass = candidateClass.owner().ref(collectionClass).narrow(pool.getClassCoordinate());

        jFieldVar.type(newInterfaceClass);
        // Find original getter and setter methods to remove.
        final ArrayList<JMethod> methodsToRemove = new ArrayList<JMethod>();
        for (final JMethod m : candidateClass.methods()) {
View Full Code Here

    @Override
    public boolean run(Outline arg0, Options arg1, ErrorHandler arg2) {
       
        for (ClassOutline classOutline : arg0.getClasses()) {
            JDefinedClass implClass = classOutline.implClass;
            JCodeModel codeModel = implClass.owner();
            JMethod dummyMethod =
                implClass.method(JMod.PUBLIC, codeModel.ref(String.class), "dummy");
            dummyMethod.body()._return(JExpr.lit("dummy"));
        }
        return true;
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.