Package net.sf.rej.java

Examples of net.sf.rej.java.ClassFactory


        }
      } catch(Exception ioe) {
        ioe.printStackTrace();
      }
    } else {
      ClassFactory factory = new ClassFactory();
      IReferenceType rt = sf.location().declaringType();
      String superClass = null;
      if (!"java.lang.Object".equals(rt.name())) {
        superClass = rt.getSuperClassName();
      }
      ClassFile cf = factory.createClass(rt.name(), superClass);
      ConstantPool cp = cf.getPool();
      FieldFactory fieldFactory = new FieldFactory();
      for (IField field : rt.visibleFields()) {
        AccessFlags flags = new AccessFlags(field.modifiers());
        Field fieldToAdd = fieldFactory.createField(cf, flags, cp.optionalAddUtf8(field.name()), cp.optionalAddUtf8(field.signature()));
View Full Code Here

TOP

Related Classes of net.sf.rej.java.ClassFactory

Copyright © 2018 www.massapicom. 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.