Examples of IReferenceType


Examples of net.sf.rej.gui.debug.wrappers.IReferenceType

      } 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()));
        cf.add(fieldToAdd);
      }
     
      MethodFactory methodFactory = new MethodFactory();
      for (IMethod method : rt.visibleMethods()) {
        AccessFlags flags = new AccessFlags(method.modifiers());
        net.sf.rej.java.Method methodToAdd = methodFactory.createMethod(cf, flags, cp.optionalAddUtf8(method.name()), cp.optionalAddUtf8(method.signature()), cp.optionalAddUtf8("Code"), 0, 0, cp.optionalAddUtf8("Exceptions"), new ArrayList<ExceptionDescriptor>());
        cf.add(methodToAdd);
      }
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.