Package oracle.toplink.libraries.asm

Examples of oracle.toplink.libraries.asm.ClassReader


  public static void main (final String[] args) throws Exception {
    if (args.length != 1) {
      printUsage();
    }
    ClassReader cr;
    if (args[0].endsWith(".class")) {
      cr = new ClassReader(new FileInputStream(args[0]));
    } else {
      cr = new ClassReader(args[0]);
    }
   
    TreeClassAdapter ca = new TreeClassAdapter(null);
    cr.accept(new CheckClassAdapter(ca), true);
   
    List methods = ca.classNode.methods;
    for (int i = 0; i < methods.size(); ++i) {
      MethodNode method = (MethodNode)methods.get(i);
      if (method.instructions.size() > 0) {
View Full Code Here


      skipDebug = false;
      if (args.length != 2) {
        printUsage();
      }
    }
    ClassReader cr;
    if (args[i].endsWith(".class")) {
      cr = new ClassReader(new FileInputStream(args[i]));
    } else {
      cr = new ClassReader(args[i]);
    }
    cr.accept(new TraceClassVisitor(
      null, new PrintWriter(System.out)), getDefaultAttributes(), skipDebug);
  }
View Full Code Here

        ClassReader cr = new ClassReader( readEntry( zis, ze));
        cr.accept( new TraceClassVisitor( null, new PrintWriter( os)), false);
      */
      boolean singleInputDocument = inRepresentation==SINGLE_XML;
      if( inRepresentation==BYTECODE) {  // read bytecode and process it with handler
        ClassReader cr = new ClassReader( readEntry( zis, ze));
        cr.accept( new SAXClassAdapter( handler, singleInputDocument), false);
     
      } else // read XML and process it with handler 
        XMLReader reader = XMLReaderFactory.createXMLReader();
        reader.setContentHandler( handler);       
        reader.parse( new InputSource( singleInputDocument ?
View Full Code Here

      skipDebug = false;
      if (args.length != 2) {
        printUsage();
      }
    }
    ClassReader cr;
    if (args[i].endsWith(".class")) {
      cr = new ClassReader(new FileInputStream(args[i]));
    } else {
      cr = new ClassReader(args[i]);
    }
    cr.accept(new ASMifierClassVisitor(
      new PrintWriter(System.out)), getDefaultAttributes(), skipDebug);
  }
View Full Code Here

TOP

Related Classes of oracle.toplink.libraries.asm.ClassReader

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.