Package org.cojen.classfile

Examples of org.cojen.classfile.RuntimeClassFile.addInterface()


            if (cf == null) {
                cf = new RuntimeClassFile(prefix, null, objectType.getClassLoader());
                cf.setSourceFile(QuickConstructorGenerator.class.getName());
                cf.setTarget("1.5");
                cf.addInterface(factory);
                cf.markSynthetic();
                cf.addDefaultConstructor();
            }

            // Now define the method that constructs the object.
View Full Code Here


        try {
            cf.setTarget(System.getProperty("java.specification.version"));
        } catch (Exception e) {
        }

        cf.addInterface(Comparator.class);
        cf.addInterface(Serializable.class);

        // Define fields to hold usage comparator and collator.
        TypeDesc comparatorType = TypeDesc.forClass(Comparator.class);
        TypeDesc comparatorArrayType = comparatorType.toArrayType();
View Full Code Here

            cf.setTarget(System.getProperty("java.specification.version"));
        } catch (Exception e) {
        }

        cf.addInterface(Comparator.class);
        cf.addInterface(Serializable.class);

        // Define fields to hold usage comparator and collator.
        TypeDesc comparatorType = TypeDesc.forClass(Comparator.class);
        TypeDesc comparatorArrayType = comparatorType.toArrayType();
        cf.addField(Modifiers.PRIVATE,
View Full Code Here

        }
    }

    private Class<T> createWrapper() {
        RuntimeClassFile cf = new RuntimeClassFile(mType.getName());
        cf.addInterface(mType);
        cf.markSynthetic();
        cf.setSourceFile(BelatedCreator.class.getName());
        cf.setTarget("1.5");

        final TypeDesc atomicRefType = TypeDesc.forClass(AtomicReference.class);
View Full Code Here

        try {
            cf.setTarget(System.getProperty("java.specification.version"));
        } catch (Exception e) {
        }

        cf.addInterface(Comparator.class);
        cf.addInterface(Serializable.class);

        // Define fields to hold usage comparator and collator.
        TypeDesc comparatorType = TypeDesc.forClass(Comparator.class);
        TypeDesc comparatorArrayType = comparatorType.toArrayType();
View Full Code Here

            cf.setTarget(System.getProperty("java.specification.version"));
        } catch (Exception e) {
        }

        cf.addInterface(Comparator.class);
        cf.addInterface(Serializable.class);

        // Define fields to hold usage comparator and collator.
        TypeDesc comparatorType = TypeDesc.forClass(Comparator.class);
        TypeDesc comparatorArrayType = comparatorType.toArrayType();
        cf.addField(Modifiers.PRIVATE,
View Full Code Here

        }
    }

    private Class<T> createWrapper() {
        RuntimeClassFile cf = new RuntimeClassFile(mType.getName());
        cf.addInterface(mType);
        cf.markSynthetic();
        cf.setSourceFile(BelatedCreator.class.getName());
        cf.setTarget("1.5");

        final TypeDesc atomicRefType = TypeDesc.forClass(AtomicReference.class);
View Full Code Here

            if (cf == null) {
                cf = new RuntimeClassFile(prefix, null, objectType.getClassLoader());
                cf.setSourceFile(QuickConstructorGenerator.class.getName());
                cf.setTarget("1.5");
                cf.addInterface(factory);
                cf.markSynthetic();
                cf.addDefaultConstructor();
            }

            // Now define the method that constructs the object.
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.