Package net.sf.joafip.store.service.bytecode

Examples of net.sf.joafip.store.service.bytecode.ClassDefiner$DefineClassMethodGetter


  }

  private void test() throws EnhanceException, IOException,
      InstantiationException, IllegalAccessException, ReflectException,
      ReflectInvalidClassException {
    final ClassDefiner classDefiner = new ClassDefiner(
        new ClassLoaderProvider());
    String className = "net.sf.joafip.java.util.PTreeMap$Joafip$";
    InputStream inputStream = new FileInputStream(
        "keil/net.sf.joafip.java.util.PTreeMap.class");
    int read;
    List<Byte> list = new LinkedList<Byte>();
    while ((read = inputStream.read()) != -1) {
      list.add((byte) read);
    }
    byte[] byteCode = new byte[list.size()];
    int index = 0;
    for (byte value : list) {
      byteCode[index++] = value;
    }
    final Class<?> clazz = classDefiner.defineClass(className, byteCode);
    // final Object object=clazz.newInstance();
    final Object object = helperReflect.newInstanceNoConstruction(clazz);

    // final IProxyCallBack proxyCallBack = (IProxyCallBack) object;
    final IProxyCallBack proxyCallBack = IProxyCallBack.class.cast(object);
View Full Code Here


    // FIXMELUC _test fail
    // if (buildMode) {
    // warnSkipped();
    // return;
    // }
    final ClassDefiner classDefiner = new ClassDefiner(null);
    final ObjectGraphCreator creator = ObjectGraphCreator.getInstance();
    final ObjectGraph graph = creator.create(classDefiner);
    creator.pathToObject(graph, null);
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.bytecode.ClassDefiner$DefineClassMethodGetter

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.