@Override public void visitConstantPool(ConstantPool obj) { super.visitConstantPool(obj); Constant[] constant_pool = obj.getConstantPool(); for (int i = 1; i < constant_pool.length; i++) { constant_pool[i].accept(this); byte tag = constant_pool[i].getTag(); if ((tag == Const.CONSTANT_Double) || (tag == Const.CONSTANT_Long)) { i++; } } }
public void visitConstantPool(ConstantPool cp) { stack.push(cp); cp.accept(visitor); Constant[] constants = cp.getConstantPool(); for(int i=1; i < constants.length; i++) { if(constants[i] != null) constants[i].accept(this); } stack.pop(); }
@Override public void visitConstantPool(final ConstantPool cp) { stack.push(cp); cp.accept(visitor); final Constant[] constants = cp.getConstantPool(); for (int i = 1; i < constants.length; i++) { if (constants[i] != null) { constants[i].accept(this); } } stack.pop(); }
@Override public void visitConstantPool(ConstantPool obj) { super.visitConstantPool(obj); Constant[] constant_pool = obj.getConstantPool(); for (int i = 1; i < constant_pool.length; i++) { constant_pool[i].accept(this); byte tag = constant_pool[i].getTag(); if ((tag == CONSTANT_Double) || (tag == CONSTANT_Long)) { i++; } } }
c.accept(new EmptyVisitor()
@Override public void visitJavaClass(JavaClass obj) { current = javaClassDao.getJavaClass(obj.getClassName()); int major = obj.getMajor(); int minor = obj.getMinor(); current.setMajorVersion(major); current.setMinorVersion(minor); current.addResource(resource); current.setPackageName(obj.getPackageName()); for (String interfaceName : obj.getInterfaceNames()) { org.jboss.windup.graph.model.resource.JavaClass interfaceClass = javaClassDao.getJavaClass(interfaceName); // then we make the connection. current.addImplements(interfaceClass); } // process the pool. Constant[] pool = obj.getConstantPool().getConstantPool(); for (Constant c : pool) { if (c == null) continue; c.accept(this); } String superClz = obj.getSuperclassName(); org.jboss.windup.graph.model.resource.JavaClass superJavaClass = javaClassDao.getJavaClass(superClz); current.setExtends(superJavaClass); }