Examples of DescendingVisitor


Examples of org.apache.bcel.classfile.DescendingVisitor

    private InnerClassDetector(){} // Don't use.
    /** Constructs an InnerClassDetector working on the JavaClass _jc. */
    public InnerClassDetector(JavaClass _jc){
      jc = _jc;
      cp = jc.getConstantPool();
      (new DescendingVisitor(jc, this)).visit();
    }
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

                return;
   
            ConstantPool pool = javaClass.getConstantPool();
            processConstantPool(pool);
            VisitorImpl visitor = new VisitorImpl(pool, this, d, task.getLocation());
            DescendingVisitor desc = new DescendingVisitor(javaClass, visitor);
            desc.visit();
        } catch(BuildException e) {
            log(Design.getWrapperMsg(originalClassOrJarFile, e.getMessage()), Project.MSG_ERR);
            designErrors.addElement(e);        
        }
    }
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

    public synchronized Collection getAllReferencedClassNamesInInternalForm() {
        if (classNames == null) {
            classNames = new HashSet<String>();//lazy instantiation
            logger.logp(Level.FINER, myClassName, "getAllReferencedClassNames", // NOI18N
                    "Starting to visit"); // NOI18N
            jc.accept(new DescendingVisitor(jc, new Visitor(this)));
            logger.logp(Level.FINER, myClassName, "getAllReferencedClassNames", // NOI18N
                    "Finished visting"); // NOI18N
            classNames = Collections.unmodifiableSet(classNames);
        }
        return classNames;
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

                        parser = new ClassParser(container.getPath(),
                            classname.replace('.', '/') + ".class");
                    }

                    JavaClass javaClass = parser.parse();
                    DescendingVisitor traverser
                         = new DescendingVisitor(javaClass, dependencyVisitor);
                    traverser.visit();
                } catch (IOException ioe) {
                    // ignore
                }
            }
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

     * visitors.
     * @param aJavaClass the root of the tree.
     */
    public void walk(JavaClass aJavaClass)
    {
        DescendingVisitor visitor =
            new DescendingVisitor(aJavaClass, mVisitor);
        aJavaClass.accept(visitor);
    }
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

                        parser = new ClassParser(container.getPath(),
                            classname.replace('.', '/') + ".class");
                    }

                    JavaClass javaClass = parser.parse();
                    DescendingVisitor traverser
                         = new DescendingVisitor(javaClass, dependencyVisitor);
                    traverser.visit();
                } catch (IOException ioe) {
                    // ignore
                }
            }
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

    private void processClasses(List classes) {
        segmentHeader.setClass_count(classes.size());
        for (Iterator iterator = classes.iterator(); iterator.hasNext();) {
            JavaClass javaClass = (JavaClass) iterator.next();
            new DescendingVisitor(javaClass, this).visit();
        }
    }
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

      throw new RuntimeException(e);
    }
  }
  public TypeDeclaration parse()
  {
    DescendingVisitor classWalker= new DescendingVisitor(jc, new EmptyVisitor()
    {
      public void visitConstantClass(ConstantClass obj)
      {
        ConstantPool cp= jc.getConstantPool();
        String bytes= obj.getBytes(cp);
        fileUnit.addDependency(bytes.replace("/", "."));
      }
    });
    classWalker.visit();

    org.apache.bcel.classfile.Method[] bcelMethods= jc.getMethods();

    ObjectType type= new ObjectType(jc.getClassName());
    Map<String, String> annotationsValues= getAnnotationsValues(jc.getAttributes());
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

                        parser = new ClassParser(container.getPath(),
                            classname.replace('.', '/') + ".class");
                    }

                    JavaClass javaClass = parser.parse();
                    DescendingVisitor traverser
                         = new DescendingVisitor(javaClass, dependencyVisitor);
                    traverser.visit();
                } catch (IOException ioe) {
                    // ignore
                }
            }
View Full Code Here

Examples of org.apache.bcel.classfile.DescendingVisitor

                        parser = new ClassParser(container.getPath(),
                            classname.replace('.', '/') + ".class");
                    }

                    JavaClass javaClass = parser.parse();
                    DescendingVisitor traverser
                         = new DescendingVisitor(javaClass, dependencyVisitor);
                    traverser.visit();
                } catch (IOException ioe) {
                    // ignore
                }
            }
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.