+++ /dev/null
-/*
- * Copyright 2000-2009 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.tomcat.util.bcel.classfile;
-
-/**
- * Visitor with empty method bodies, can be extended and used in conjunction
- * with the DescendingVisitor class, e.g. By courtesy of David Spencer.
- *
- * @see DescendingVisitor
- * @version $Id$
- */
-public class EmptyVisitor implements Visitor
-{
- protected EmptyVisitor()
- {
- }
-
- public void visitAnnotation(Annotations obj)
- {
- }
-
- public void visitParameterAnnotation(ParameterAnnotations obj)
- {
- }
-
- public void visitAnnotationEntry(AnnotationEntry obj)
- {
- }
-
- public void visitAnnotationDefault(AnnotationDefault obj)
- {
- }
-
- public void visitCode(Code obj)
- {
- }
-
- public void visitCodeException(CodeException obj)
- {
- }
-
- public void visitConstantClass(ConstantClass obj)
- {
- }
-
- public void visitConstantDouble(ConstantDouble obj)
- {
- }
-
- public void visitConstantFieldref(ConstantFieldref obj)
- {
- }
-
- public void visitConstantFloat(ConstantFloat obj)
- {
- }
-
- public void visitConstantInteger(ConstantInteger obj)
- {
- }
-
- public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)
- {
- }
-
- public void visitConstantLong(ConstantLong obj)
- {
- }
-
- public void visitConstantMethodref(ConstantMethodref obj)
- {
- }
-
- public void visitConstantNameAndType(ConstantNameAndType obj)
- {
- }
-
- public void visitConstantPool(ConstantPool obj)
- {
- }
-
- public void visitConstantString(ConstantString obj)
- {
- }
-
- public void visitConstantUtf8(ConstantUtf8 obj)
- {
- }
-
- public void visitConstantValue(ConstantValue obj)
- {
- }
-
- public void visitDeprecated(Deprecated obj)
- {
- }
-
- public void visitExceptionTable(ExceptionTable obj)
- {
- }
-
- public void visitField(Field obj)
- {
- }
-
- public void visitInnerClass(InnerClass obj)
- {
- }
-
- public void visitInnerClasses(InnerClasses obj)
- {
- }
-
- public void visitJavaClass(JavaClass obj)
- {
- }
-
- public void visitLineNumber(LineNumber obj)
- {
- }
-
- public void visitLineNumberTable(LineNumberTable obj)
- {
- }
-
- public void visitLocalVariable(LocalVariable obj)
- {
- }
-
- public void visitLocalVariableTable(LocalVariableTable obj)
- {
- }
-
- public void visitMethod(Method obj)
- {
- }
-
- public void visitSignature(Signature obj)
- {
- }
-
- public void visitSourceFile(SourceFile obj)
- {
- }
-
- public void visitSynthetic(Synthetic obj)
- {
- }
-
- public void visitUnknown(Unknown obj)
- {
- }
-
- public void visitStackMap(StackMap obj)
- {
- }
-
- public void visitStackMapEntry(StackMapEntry obj)
- {
- }
-
- public void visitStackMapTable(StackMapTable obj)
- {
- }
-
- public void visitStackMapTableEntry(StackMapTableEntry obj)
- {
- }
-
- public void visitEnclosingMethod(EnclosingMethod obj)
- {
- }
-
- public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
- {
- }
-}
public AALOAD() {
super(org.apache.tomcat.util.bcel.Constants.AALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitAALOAD(this);
- }
}
public AASTORE() {
super(org.apache.tomcat.util.bcel.Constants.AASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitAASTORE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.NULL;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitPushInstruction(this);
- v.visitTypedInstruction(this);
- v.visitACONST_NULL(this);
- }
}
public ALOAD(int n) {
super(org.apache.tomcat.util.bcel.Constants.ALOAD, org.apache.tomcat.util.bcel.Constants.ALOAD_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitALOAD(this);
- }
}
}
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitLoadClass(this);
- v.visitAllocationInstruction(this);
- v.visitExceptionThrower(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitCPInstruction(this);
- v.visitANEWARRAY(this);
- }
-
-
public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
Type t = getType(cpg);
if (t instanceof ArrayType) {
public ARETURN() {
super(org.apache.tomcat.util.bcel.Constants.ARETURN);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitReturnInstruction(this);
- v.visitARETURN(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitStackProducer(this);
- v.visitARRAYLENGTH(this);
- }
}
public ASTORE(int n) {
super(org.apache.tomcat.util.bcel.Constants.ASTORE, org.apache.tomcat.util.bcel.Constants.ASTORE_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitASTORE(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.THROWABLE
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitUnconditionalBranch(this);
- v.visitExceptionThrower(this);
- v.visitATHROW(this);
- }
}
public BALOAD() {
super(org.apache.tomcat.util.bcel.Constants.BALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitBALOAD(this);
- }
}
public BASTORE() {
super(org.apache.tomcat.util.bcel.Constants.BASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitBASTORE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.BYTE;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitPushInstruction(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitConstantPushInstruction(this);
- v.visitBIPUSH(this);
- }
}
public BREAKPOINT() {
super(org.apache.tomcat.util.bcel.Constants.BREAKPOINT, (short) 1);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitBREAKPOINT(this);
- }
}
public CALOAD() {
super(org.apache.tomcat.util.bcel.Constants.CALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitCALOAD(this);
- }
}
public CASTORE() {
super(org.apache.tomcat.util.bcel.Constants.CASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitCASTORE(this);
- }
}
}
return (t instanceof ObjectType) ? (ObjectType) t : null;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitLoadClass(this);
- v.visitExceptionThrower(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitTypedInstruction(this);
- v.visitCPInstruction(this);
- v.visitCHECKCAST(this);
- }
}
public D2F() {
super(org.apache.tomcat.util.bcel.Constants.D2F);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitD2F(this);
- }
}
public D2I() {
super(org.apache.tomcat.util.bcel.Constants.D2I);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitD2I(this);
- }
}
public D2L() {
super(org.apache.tomcat.util.bcel.Constants.D2L);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitD2L(this);
- }
}
public DADD() {
super(org.apache.tomcat.util.bcel.Constants.DADD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitDADD(this);
- }
}
public DALOAD() {
super(org.apache.tomcat.util.bcel.Constants.DALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitDALOAD(this);
- }
}
public DASTORE() {
super(org.apache.tomcat.util.bcel.Constants.DASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitDASTORE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.DOUBLE;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitDCMPG(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.DOUBLE;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitDCMPL(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.DOUBLE;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitPushInstruction(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitConstantPushInstruction(this);
- v.visitDCONST(this);
- }
}
public DDIV() {
super(org.apache.tomcat.util.bcel.Constants.DDIV);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitDDIV(this);
- }
}
public DLOAD(int n) {
super(org.apache.tomcat.util.bcel.Constants.DLOAD, org.apache.tomcat.util.bcel.Constants.DLOAD_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitDLOAD(this);
- }
}
public DMUL() {
super(org.apache.tomcat.util.bcel.Constants.DMUL);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitDMUL(this);
- }
}
public DNEG() {
super(org.apache.tomcat.util.bcel.Constants.DNEG);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitDNEG(this);
- }
}
public DREM() {
super(org.apache.tomcat.util.bcel.Constants.DREM);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitDREM(this);
- }
}
public DRETURN() {
super(org.apache.tomcat.util.bcel.Constants.DRETURN);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitReturnInstruction(this);
- v.visitDRETURN(this);
- }
}
public DSTORE(int n) {
super(org.apache.tomcat.util.bcel.Constants.DSTORE, org.apache.tomcat.util.bcel.Constants.DSTORE_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitDSTORE(this);
- }
}
public DSUB() {
super(org.apache.tomcat.util.bcel.Constants.DSUB);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitDSUB(this);
- }
}
public DUP() {
super(org.apache.tomcat.util.bcel.Constants.DUP);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitPushInstruction(this);
- v.visitStackInstruction(this);
- v.visitDUP(this);
- }
}
public DUP2() {
super(org.apache.tomcat.util.bcel.Constants.DUP2);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitPushInstruction(this);
- v.visitStackInstruction(this);
- v.visitDUP2(this);
- }
}
public DUP2_X1() {
super(org.apache.tomcat.util.bcel.Constants.DUP2_X1);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackInstruction(this);
- v.visitDUP2_X1(this);
- }
}
public DUP2_X2() {
super(org.apache.tomcat.util.bcel.Constants.DUP2_X2);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackInstruction(this);
- v.visitDUP2_X2(this);
- }
}
public DUP_X1() {
super(org.apache.tomcat.util.bcel.Constants.DUP_X1);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackInstruction(this);
- v.visitDUP_X1(this);
- }
}
public DUP_X2() {
super(org.apache.tomcat.util.bcel.Constants.DUP_X2);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackInstruction(this);
- v.visitDUP_X2(this);
- }
}
+++ /dev/null
-/*
- * Copyright 2000-2009 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/**
- * Supplies empty method bodies to be overridden by subclasses.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class EmptyVisitor implements Visitor {
-
- public void visitStackInstruction( StackInstruction obj ) {
- }
-
-
- public void visitLocalVariableInstruction( LocalVariableInstruction obj ) {
- }
-
-
- public void visitBranchInstruction( BranchInstruction obj ) {
- }
-
-
- public void visitLoadClass( LoadClass obj ) {
- }
-
-
- public void visitFieldInstruction( FieldInstruction obj ) {
- }
-
-
- public void visitIfInstruction( IfInstruction obj ) {
- }
-
-
- public void visitConversionInstruction( ConversionInstruction obj ) {
- }
-
-
- public void visitPopInstruction( PopInstruction obj ) {
- }
-
-
- public void visitJsrInstruction( JsrInstruction obj ) {
- }
-
-
- public void visitGotoInstruction( GotoInstruction obj ) {
- }
-
-
- public void visitStoreInstruction( StoreInstruction obj ) {
- }
-
-
- public void visitTypedInstruction( TypedInstruction obj ) {
- }
-
-
- public void visitSelect( Select obj ) {
- }
-
-
- public void visitUnconditionalBranch( UnconditionalBranch obj ) {
- }
-
-
- public void visitPushInstruction( PushInstruction obj ) {
- }
-
-
- public void visitArithmeticInstruction( ArithmeticInstruction obj ) {
- }
-
-
- public void visitCPInstruction( CPInstruction obj ) {
- }
-
-
- public void visitInvokeInstruction( InvokeInstruction obj ) {
- }
-
-
- public void visitArrayInstruction( ArrayInstruction obj ) {
- }
-
-
- public void visitAllocationInstruction( AllocationInstruction obj ) {
- }
-
-
- public void visitReturnInstruction( ReturnInstruction obj ) {
- }
-
-
- public void visitFieldOrMethod( FieldOrMethod obj ) {
- }
-
-
- public void visitConstantPushInstruction( ConstantPushInstruction obj ) {
- }
-
-
- public void visitExceptionThrower( ExceptionThrower obj ) {
- }
-
-
- public void visitLoadInstruction( LoadInstruction obj ) {
- }
-
-
- public void visitVariableLengthInstruction( VariableLengthInstruction obj ) {
- }
-
-
- public void visitStackProducer( StackProducer obj ) {
- }
-
-
- public void visitStackConsumer( StackConsumer obj ) {
- }
-
-
- public void visitACONST_NULL( ACONST_NULL obj ) {
- }
-
-
- public void visitGETSTATIC( GETSTATIC obj ) {
- }
-
-
- public void visitIF_ICMPLT( IF_ICMPLT obj ) {
- }
-
-
- public void visitMONITOREXIT( MONITOREXIT obj ) {
- }
-
-
- public void visitIFLT( IFLT obj ) {
- }
-
-
- public void visitLSTORE( LSTORE obj ) {
- }
-
-
- public void visitPOP2( POP2 obj ) {
- }
-
-
- public void visitBASTORE( BASTORE obj ) {
- }
-
-
- public void visitISTORE( ISTORE obj ) {
- }
-
-
- public void visitCHECKCAST( CHECKCAST obj ) {
- }
-
-
- public void visitFCMPG( FCMPG obj ) {
- }
-
-
- public void visitI2F( I2F obj ) {
- }
-
-
- public void visitATHROW( ATHROW obj ) {
- }
-
-
- public void visitDCMPL( DCMPL obj ) {
- }
-
-
- public void visitARRAYLENGTH( ARRAYLENGTH obj ) {
- }
-
-
- public void visitDUP( DUP obj ) {
- }
-
-
- public void visitINVOKESTATIC( INVOKESTATIC obj ) {
- }
-
-
- public void visitLCONST( LCONST obj ) {
- }
-
-
- public void visitDREM( DREM obj ) {
- }
-
-
- public void visitIFGE( IFGE obj ) {
- }
-
-
- public void visitCALOAD( CALOAD obj ) {
- }
-
-
- public void visitLASTORE( LASTORE obj ) {
- }
-
-
- public void visitI2D( I2D obj ) {
- }
-
-
- public void visitDADD( DADD obj ) {
- }
-
-
- public void visitINVOKESPECIAL( INVOKESPECIAL obj ) {
- }
-
-
- public void visitIAND( IAND obj ) {
- }
-
-
- public void visitPUTFIELD( PUTFIELD obj ) {
- }
-
-
- public void visitILOAD( ILOAD obj ) {
- }
-
-
- public void visitDLOAD( DLOAD obj ) {
- }
-
-
- public void visitDCONST( DCONST obj ) {
- }
-
-
- public void visitNEW( NEW obj ) {
- }
-
-
- public void visitIFNULL( IFNULL obj ) {
- }
-
-
- public void visitLSUB( LSUB obj ) {
- }
-
-
- public void visitL2I( L2I obj ) {
- }
-
-
- public void visitISHR( ISHR obj ) {
- }
-
-
- public void visitTABLESWITCH( TABLESWITCH obj ) {
- }
-
-
- public void visitIINC( IINC obj ) {
- }
-
-
- public void visitDRETURN( DRETURN obj ) {
- }
-
-
- public void visitFSTORE( FSTORE obj ) {
- }
-
-
- public void visitDASTORE( DASTORE obj ) {
- }
-
-
- public void visitIALOAD( IALOAD obj ) {
- }
-
-
- public void visitDDIV( DDIV obj ) {
- }
-
-
- public void visitIF_ICMPGE( IF_ICMPGE obj ) {
- }
-
-
- public void visitLAND( LAND obj ) {
- }
-
-
- public void visitIDIV( IDIV obj ) {
- }
-
-
- public void visitLOR( LOR obj ) {
- }
-
-
- public void visitCASTORE( CASTORE obj ) {
- }
-
-
- public void visitFREM( FREM obj ) {
- }
-
-
- public void visitLDC( LDC obj ) {
- }
-
-
- public void visitBIPUSH( BIPUSH obj ) {
- }
-
-
- public void visitDSTORE( DSTORE obj ) {
- }
-
-
- public void visitF2L( F2L obj ) {
- }
-
-
- public void visitFMUL( FMUL obj ) {
- }
-
-
- public void visitLLOAD( LLOAD obj ) {
- }
-
-
- public void visitJSR( JSR obj ) {
- }
-
-
- public void visitFSUB( FSUB obj ) {
- }
-
-
- public void visitSASTORE( SASTORE obj ) {
- }
-
-
- public void visitALOAD( ALOAD obj ) {
- }
-
-
- public void visitDUP2_X2( DUP2_X2 obj ) {
- }
-
-
- public void visitRETURN( RETURN obj ) {
- }
-
-
- public void visitDALOAD( DALOAD obj ) {
- }
-
-
- public void visitSIPUSH( SIPUSH obj ) {
- }
-
-
- public void visitDSUB( DSUB obj ) {
- }
-
-
- public void visitL2F( L2F obj ) {
- }
-
-
- public void visitIF_ICMPGT( IF_ICMPGT obj ) {
- }
-
-
- public void visitF2D( F2D obj ) {
- }
-
-
- public void visitI2L( I2L obj ) {
- }
-
-
- public void visitIF_ACMPNE( IF_ACMPNE obj ) {
- }
-
-
- public void visitPOP( POP obj ) {
- }
-
-
- public void visitI2S( I2S obj ) {
- }
-
-
- public void visitIFEQ( IFEQ obj ) {
- }
-
-
- public void visitSWAP( SWAP obj ) {
- }
-
-
- public void visitIOR( IOR obj ) {
- }
-
-
- public void visitIREM( IREM obj ) {
- }
-
-
- public void visitIASTORE( IASTORE obj ) {
- }
-
-
- public void visitNEWARRAY( NEWARRAY obj ) {
- }
-
-
- public void visitINVOKEINTERFACE( INVOKEINTERFACE obj ) {
- }
-
-
- public void visitINEG( INEG obj ) {
- }
-
-
- public void visitLCMP( LCMP obj ) {
- }
-
-
- public void visitJSR_W( JSR_W obj ) {
- }
-
-
- public void visitMULTIANEWARRAY( MULTIANEWARRAY obj ) {
- }
-
-
- public void visitDUP_X2( DUP_X2 obj ) {
- }
-
-
- public void visitSALOAD( SALOAD obj ) {
- }
-
-
- public void visitIFNONNULL( IFNONNULL obj ) {
- }
-
-
- public void visitDMUL( DMUL obj ) {
- }
-
-
- public void visitIFNE( IFNE obj ) {
- }
-
-
- public void visitIF_ICMPLE( IF_ICMPLE obj ) {
- }
-
-
- public void visitLDC2_W( LDC2_W obj ) {
- }
-
-
- public void visitGETFIELD( GETFIELD obj ) {
- }
-
-
- public void visitLADD( LADD obj ) {
- }
-
-
- public void visitNOP( NOP obj ) {
- }
-
-
- public void visitFALOAD( FALOAD obj ) {
- }
-
-
- public void visitINSTANCEOF( INSTANCEOF obj ) {
- }
-
-
- public void visitIFLE( IFLE obj ) {
- }
-
-
- public void visitLXOR( LXOR obj ) {
- }
-
-
- public void visitLRETURN( LRETURN obj ) {
- }
-
-
- public void visitFCONST( FCONST obj ) {
- }
-
-
- public void visitIUSHR( IUSHR obj ) {
- }
-
-
- public void visitBALOAD( BALOAD obj ) {
- }
-
-
- public void visitDUP2( DUP2 obj ) {
- }
-
-
- public void visitIF_ACMPEQ( IF_ACMPEQ obj ) {
- }
-
-
- public void visitIMPDEP1( IMPDEP1 obj ) {
- }
-
-
- public void visitMONITORENTER( MONITORENTER obj ) {
- }
-
-
- public void visitLSHL( LSHL obj ) {
- }
-
-
- public void visitDCMPG( DCMPG obj ) {
- }
-
-
- public void visitD2L( D2L obj ) {
- }
-
-
- public void visitIMPDEP2( IMPDEP2 obj ) {
- }
-
-
- public void visitL2D( L2D obj ) {
- }
-
-
- public void visitRET( RET obj ) {
- }
-
-
- public void visitIFGT( IFGT obj ) {
- }
-
-
- public void visitIXOR( IXOR obj ) {
- }
-
-
- public void visitINVOKEVIRTUAL( INVOKEVIRTUAL obj ) {
- }
-
-
- public void visitFASTORE( FASTORE obj ) {
- }
-
-
- public void visitIRETURN( IRETURN obj ) {
- }
-
-
- public void visitIF_ICMPNE( IF_ICMPNE obj ) {
- }
-
-
- public void visitFLOAD( FLOAD obj ) {
- }
-
-
- public void visitLDIV( LDIV obj ) {
- }
-
-
- public void visitPUTSTATIC( PUTSTATIC obj ) {
- }
-
-
- public void visitAALOAD( AALOAD obj ) {
- }
-
-
- public void visitD2I( D2I obj ) {
- }
-
-
- public void visitIF_ICMPEQ( IF_ICMPEQ obj ) {
- }
-
-
- public void visitAASTORE( AASTORE obj ) {
- }
-
-
- public void visitARETURN( ARETURN obj ) {
- }
-
-
- public void visitDUP2_X1( DUP2_X1 obj ) {
- }
-
-
- public void visitFNEG( FNEG obj ) {
- }
-
-
- public void visitGOTO_W( GOTO_W obj ) {
- }
-
-
- public void visitD2F( D2F obj ) {
- }
-
-
- public void visitGOTO( GOTO obj ) {
- }
-
-
- public void visitISUB( ISUB obj ) {
- }
-
-
- public void visitF2I( F2I obj ) {
- }
-
-
- public void visitDNEG( DNEG obj ) {
- }
-
-
- public void visitICONST( ICONST obj ) {
- }
-
-
- public void visitFDIV( FDIV obj ) {
- }
-
-
- public void visitI2B( I2B obj ) {
- }
-
-
- public void visitLNEG( LNEG obj ) {
- }
-
-
- public void visitLREM( LREM obj ) {
- }
-
-
- public void visitIMUL( IMUL obj ) {
- }
-
-
- public void visitIADD( IADD obj ) {
- }
-
-
- public void visitLSHR( LSHR obj ) {
- }
-
-
- public void visitLOOKUPSWITCH( LOOKUPSWITCH obj ) {
- }
-
-
- public void visitDUP_X1( DUP_X1 obj ) {
- }
-
-
- public void visitFCMPL( FCMPL obj ) {
- }
-
-
- public void visitI2C( I2C obj ) {
- }
-
-
- public void visitLMUL( LMUL obj ) {
- }
-
-
- public void visitLUSHR( LUSHR obj ) {
- }
-
-
- public void visitISHL( ISHL obj ) {
- }
-
-
- public void visitLALOAD( LALOAD obj ) {
- }
-
-
- public void visitASTORE( ASTORE obj ) {
- }
-
-
- public void visitANEWARRAY( ANEWARRAY obj ) {
- }
-
-
- public void visitFRETURN( FRETURN obj ) {
- }
-
-
- public void visitFADD( FADD obj ) {
- }
-
-
- public void visitBREAKPOINT( BREAKPOINT obj ) {
- }
-}
public F2D() {
super(org.apache.tomcat.util.bcel.Constants.F2D);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitF2D(this);
- }
}
public F2I() {
super(org.apache.tomcat.util.bcel.Constants.F2I);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitF2I(this);
- }
}
public F2L() {
super(org.apache.tomcat.util.bcel.Constants.F2L);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitF2L(this);
- }
}
public FADD() {
super(org.apache.tomcat.util.bcel.Constants.FADD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitFADD(this);
- }
}
public FALOAD() {
super(org.apache.tomcat.util.bcel.Constants.FALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitFALOAD(this);
- }
}
public FASTORE() {
super(org.apache.tomcat.util.bcel.Constants.FASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitFASTORE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.FLOAT;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitFCMPG(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.FLOAT;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitFCMPL(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.FLOAT;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitPushInstruction(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitConstantPushInstruction(this);
- v.visitFCONST(this);
- }
}
public FDIV() {
super(org.apache.tomcat.util.bcel.Constants.FDIV);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitFDIV(this);
- }
}
public FLOAD(int n) {
super(org.apache.tomcat.util.bcel.Constants.FLOAD, org.apache.tomcat.util.bcel.Constants.FLOAD_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitFLOAD(this);
- }
}
public FMUL() {
super(org.apache.tomcat.util.bcel.Constants.FMUL);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitFMUL(this);
- }
}
public FNEG() {
super(org.apache.tomcat.util.bcel.Constants.FNEG);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitFNEG(this);
- }
}
public FREM() {
super(org.apache.tomcat.util.bcel.Constants.FREM);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitFREM(this);
- }
}
public FRETURN() {
super(org.apache.tomcat.util.bcel.Constants.FRETURN);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitReturnInstruction(this);
- v.visitFRETURN(this);
- }
}
public FSTORE(int n) {
super(org.apache.tomcat.util.bcel.Constants.FSTORE, org.apache.tomcat.util.bcel.Constants.FSTORE_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitFSTORE(this);
- }
}
public FSUB() {
super(org.apache.tomcat.util.bcel.Constants.FSUB);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitFSUB(this);
- }
}
cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitStackConsumer(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitFieldInstruction(this);
- v.visitGETFIELD(this);
- }
}
cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitPushInstruction(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitFieldInstruction(this);
- v.visitGETSTATIC(this);
- }
}
}
return 0;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitVariableLengthInstruction(this);
- v.visitUnconditionalBranch(this);
- v.visitBranchInstruction(this);
- v.visitGotoInstruction(this);
- v.visitGOTO(this);
- }
}
index = bytes.readInt();
length = 5;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitUnconditionalBranch(this);
- v.visitBranchInstruction(this);
- v.visitGotoInstruction(this);
- v.visitGOTO_W(this);
- }
}
public I2B() {
super(org.apache.tomcat.util.bcel.Constants.I2B);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitI2B(this);
- }
}
public I2C() {
super(org.apache.tomcat.util.bcel.Constants.I2C);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitI2C(this);
- }
}
public I2D() {
super(org.apache.tomcat.util.bcel.Constants.I2D);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitI2D(this);
- }
}
public I2F() {
super(org.apache.tomcat.util.bcel.Constants.I2F);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitI2F(this);
- }
}
public I2L() {
super(org.apache.tomcat.util.bcel.Constants.I2L);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitI2L(this);
- }
}
public I2S() {
super(org.apache.tomcat.util.bcel.Constants.I2S);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitI2S(this);
- }
}
public IADD() {
super(org.apache.tomcat.util.bcel.Constants.IADD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIADD(this);
- }
}
public IALOAD() {
super(org.apache.tomcat.util.bcel.Constants.IALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitIALOAD(this);
- }
}
public IAND() {
super(org.apache.tomcat.util.bcel.Constants.IAND);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIAND(this);
- }
}
public IASTORE() {
super(org.apache.tomcat.util.bcel.Constants.IASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitIASTORE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.INT;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitPushInstruction(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitConstantPushInstruction(this);
- v.visitICONST(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIDIV(this);
- }
}
public IfInstruction negate() {
return new IFNE(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFEQ(this);
- }
}
public IfInstruction negate() {
return new IFLT(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFGE(this);
- }
}
public IfInstruction negate() {
return new IFLE(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFGT(this);
- }
}
public IfInstruction negate() {
return new IFGT(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFLE(this);
- }
}
public IfInstruction negate() {
return new IFGE(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFLT(this);
- }
}
public IfInstruction negate() {
return new IFEQ(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFNE(this);
- }
}
public IfInstruction negate() {
return new IFNULL(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFNONNULL(this);
- }
}
public IfInstruction negate() {
return new IFNONNULL(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIFNULL(this);
- }
}
public IfInstruction negate() {
return new IF_ACMPNE(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ACMPEQ(this);
- }
}
public IfInstruction negate() {
return new IF_ACMPEQ(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ACMPNE(this);
- }
}
public IfInstruction negate() {
return new IF_ICMPNE(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ICMPEQ(this);
- }
}
public IfInstruction negate() {
return new IF_ICMPLT(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ICMPGE(this);
- }
}
public IfInstruction negate() {
return new IF_ICMPLE(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ICMPGT(this);
- }
}
public IfInstruction negate() {
return new IF_ICMPGT(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ICMPLE(this);
- }
}
public IfInstruction negate() {
return new IF_ICMPGE(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ICMPLT(this);
- }
}
public IfInstruction negate() {
return new IF_ICMPEQ(target);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitBranchInstruction(this);
- v.visitIfInstruction(this);
- v.visitIF_ICMPNE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.INT;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitLocalVariableInstruction(this);
- v.visitIINC(this);
- }
}
public ILOAD(int n) {
super(org.apache.tomcat.util.bcel.Constants.ILOAD, org.apache.tomcat.util.bcel.Constants.ILOAD_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitILOAD(this);
- }
}
public IMPDEP1() {
super(org.apache.tomcat.util.bcel.Constants.IMPDEP1, (short) 1);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitIMPDEP1(this);
- }
}
public IMPDEP2() {
super(org.apache.tomcat.util.bcel.Constants.IMPDEP2, (short) 1);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitIMPDEP2(this);
- }
}
public IMUL() {
super(org.apache.tomcat.util.bcel.Constants.IMUL);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIMUL(this);
- }
}
public INEG() {
super(org.apache.tomcat.util.bcel.Constants.INEG);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitINEG(this);
- }
}
}
return (t instanceof ObjectType) ? (ObjectType) t : null;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitLoadClass(this);
- v.visitExceptionThrower(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitTypedInstruction(this);
- v.visitCPInstruction(this);
- v.visitINSTANCEOF(this);
- }
}
cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitStackProducer(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitInvokeInstruction(this);
- v.visitINVOKEINTERFACE(this);
- }
}
cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitStackProducer(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitInvokeInstruction(this);
- v.visitINVOKESPECIAL(this);
- }
}
cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitStackProducer(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitInvokeInstruction(this);
- v.visitINVOKESTATIC(this);
- }
}
cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitStackProducer(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitInvokeInstruction(this);
- v.visitINVOKEVIRTUAL(this);
- }
}
public IOR() {
super(org.apache.tomcat.util.bcel.Constants.IOR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIOR(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIREM(this);
- }
}
public IRETURN() {
super(org.apache.tomcat.util.bcel.Constants.IRETURN);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitReturnInstruction(this);
- v.visitIRETURN(this);
- }
}
public ISHL() {
super(org.apache.tomcat.util.bcel.Constants.ISHL);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitISHL(this);
- }
}
public ISHR() {
super(org.apache.tomcat.util.bcel.Constants.ISHR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitISHR(this);
- }
}
public ISTORE(int n) {
super(org.apache.tomcat.util.bcel.Constants.ISTORE, org.apache.tomcat.util.bcel.Constants.ISTORE_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitISTORE(this);
- }
}
public ISUB() {
super(org.apache.tomcat.util.bcel.Constants.ISUB);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitISUB(this);
- }
}
public IUSHR() {
super(org.apache.tomcat.util.bcel.Constants.IUSHR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIUSHR(this);
- }
}
public IXOR() {
super(org.apache.tomcat.util.bcel.Constants.IXOR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitIXOR(this);
- }
}
}
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public abstract void accept( Visitor v );
-
-
/** Get Comparator object used in the equals() method to determine
* equality of instructions.
*
}
return attributes.values();
}
-
-
- /** Convenience method, simply calls accept() on the contained instruction.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- instruction.accept(v);
- }
}
}
return 0;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitVariableLengthInstruction(this);
- v.visitBranchInstruction(this);
- v.visitJsrInstruction(this);
- v.visitJSR(this);
- }
}
index = bytes.readInt();
length = 5;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitBranchInstruction(this);
- v.visitJsrInstruction(this);
- v.visitJSR_W(this);
- }
}
public L2D() {
super(org.apache.tomcat.util.bcel.Constants.L2D);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitL2D(this);
- }
}
public L2F() {
super(org.apache.tomcat.util.bcel.Constants.L2F);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitL2F(this);
- }
}
public L2I() {
super(org.apache.tomcat.util.bcel.Constants.L2I);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitConversionInstruction(this);
- v.visitL2I(this);
- }
}
public LADD() {
super(org.apache.tomcat.util.bcel.Constants.LADD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLADD(this);
- }
}
public LALOAD() {
super(org.apache.tomcat.util.bcel.Constants.LALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitLALOAD(this);
- }
}
public LAND() {
super(org.apache.tomcat.util.bcel.Constants.LAND);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLAND(this);
- }
}
public LASTORE() {
super(org.apache.tomcat.util.bcel.Constants.LASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitLASTORE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.LONG;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitLCMP(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.LONG;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitPushInstruction(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitConstantPushInstruction(this);
- v.visitLCONST(this);
- }
}
public Class[] getExceptions() {
return org.apache.tomcat.util.bcel.ExceptionConstants.EXCS_STRING_RESOLUTION;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitPushInstruction(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitCPInstruction(this);
- v.visitLDC(this);
- }
}
throw new RuntimeException("Unknown or invalid constant type at " + index);
}
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitPushInstruction(this);
- v.visitTypedInstruction(this);
- v.visitCPInstruction(this);
- v.visitLDC2_W(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLDIV(this);
- }
}
public LLOAD(int n) {
super(org.apache.tomcat.util.bcel.Constants.LLOAD, org.apache.tomcat.util.bcel.Constants.LLOAD_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitLLOAD(this);
- }
}
public LMUL() {
super(org.apache.tomcat.util.bcel.Constants.LMUL);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLMUL(this);
- }
}
public LNEG() {
super(org.apache.tomcat.util.bcel.Constants.LNEG);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLNEG(this);
- }
}
indices[i] = bytes.readInt();
}
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitVariableLengthInstruction(this);
- v.visitStackProducer(this);
- v.visitBranchInstruction(this);
- v.visitSelect(this);
- v.visitLOOKUPSWITCH(this);
- }
}
public LOR() {
super(org.apache.tomcat.util.bcel.Constants.LOR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLOR(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLREM(this);
- }
}
public LRETURN() {
super(org.apache.tomcat.util.bcel.Constants.LRETURN);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitReturnInstruction(this);
- v.visitLRETURN(this);
- }
}
public LSHL() {
super(org.apache.tomcat.util.bcel.Constants.LSHL);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLSHL(this);
- }
}
public LSHR() {
super(org.apache.tomcat.util.bcel.Constants.LSHR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLSHR(this);
- }
}
public LSTORE(int n) {
super(org.apache.tomcat.util.bcel.Constants.LSTORE, org.apache.tomcat.util.bcel.Constants.LSTORE_0, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- super.accept(v);
- v.visitLSTORE(this);
- }
}
public LSUB() {
super(org.apache.tomcat.util.bcel.Constants.LSUB);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLSUB(this);
- }
}
public LUSHR() {
super(org.apache.tomcat.util.bcel.Constants.LUSHR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLUSHR(this);
- }
}
public LXOR() {
super(org.apache.tomcat.util.bcel.Constants.LXOR);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitTypedInstruction(this);
- v.visitStackProducer(this);
- v.visitStackConsumer(this);
- v.visitArithmeticInstruction(this);
- v.visitLXOR(this);
- }
}
protected LoadInstruction(short opcode, short c_tag, int n) {
super(opcode, c_tag, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitPushInstruction(this);
- v.visitTypedInstruction(this);
- v.visitLocalVariableInstruction(this);
- v.visitLoadInstruction(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitStackConsumer(this);
- v.visitMONITORENTER(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitStackConsumer(this);
- v.visitMONITOREXIT(this);
- }
}
}
return (t instanceof ObjectType) ? (ObjectType) t : null;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitLoadClass(this);
- v.visitAllocationInstruction(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitCPInstruction(this);
- v.visitMULTIANEWARRAY(this);
- }
}
public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
return (ObjectType) getType(cpg);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitLoadClass(this);
- v.visitAllocationInstruction(this);
- v.visitExceptionThrower(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitCPInstruction(this);
- v.visitNEW(this);
- }
}
org.apache.tomcat.util.bcel.ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION
};
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitAllocationInstruction(this);
- v.visitExceptionThrower(this);
- v.visitStackProducer(this);
- v.visitNEWARRAY(this);
- }
}
public NOP() {
super(org.apache.tomcat.util.bcel.Constants.NOP, (short) 1);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitNOP(this);
- }
}
public POP() {
super(org.apache.tomcat.util.bcel.Constants.POP);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitPopInstruction(this);
- v.visitStackInstruction(this);
- v.visitPOP(this);
- }
}
public POP2() {
super(org.apache.tomcat.util.bcel.Constants.POP2);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitPopInstruction(this);
- v.visitStackInstruction(this);
- v.visitPOP2(this);
- }
}
cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitStackConsumer(this);
- v.visitPopInstruction(this);
- v.visitTypedInstruction(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitFieldInstruction(this);
- v.visitPUTFIELD(this);
- }
}
cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
return cs;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitStackConsumer(this);
- v.visitPopInstruction(this);
- v.visitTypedInstruction(this);
- v.visitLoadClass(this);
- v.visitCPInstruction(this);
- v.visitFieldOrMethod(this);
- v.visitFieldInstruction(this);
- v.visitPUTSTATIC(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return ReturnaddressType.NO_TARGET;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitRET(this);
- }
}
public RETURN() {
super(org.apache.tomcat.util.bcel.Constants.RETURN);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitStackConsumer(this);
- v.visitReturnInstruction(this);
- v.visitRETURN(this);
- }
}
public SALOAD() {
super(org.apache.tomcat.util.bcel.Constants.SALOAD);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackProducer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitSALOAD(this);
- }
}
public SASTORE() {
super(org.apache.tomcat.util.bcel.Constants.SASTORE);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitExceptionThrower(this);
- v.visitTypedInstruction(this);
- v.visitArrayInstruction(this);
- v.visitSASTORE(this);
- }
}
public Type getType( ConstantPoolGen cp ) {
return Type.SHORT;
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitPushInstruction(this);
- v.visitStackProducer(this);
- v.visitTypedInstruction(this);
- v.visitConstantPushInstruction(this);
- v.visitSIPUSH(this);
- }
}
public SWAP() {
super(org.apache.tomcat.util.bcel.Constants.SWAP);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitStackProducer(this);
- v.visitStackInstruction(this);
- v.visitSWAP(this);
- }
}
protected StoreInstruction(short opcode, short c_tag, int n) {
super(opcode, c_tag, n);
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitStackConsumer(this);
- v.visitPopInstruction(this);
- v.visitTypedInstruction(this);
- v.visitLocalVariableInstruction(this);
- v.visitStoreInstruction(this);
- }
}
indices[i] = bytes.readInt();
}
}
-
-
- /**
- * Call corresponding visitor method(s). The order is:
- * Call visitor methods of implemented interfaces first, then
- * call methods according to the class hierarchy in descending order,
- * i.e., the most specific visitXXX() call comes last.
- *
- * @param v Visitor object
- */
- public void accept( Visitor v ) {
- v.visitVariableLengthInstruction(this);
- v.visitStackProducer(this);
- v.visitBranchInstruction(this);
- v.visitSelect(this);
- v.visitTABLESWITCH(this);
- }
}
+++ /dev/null
-/*
- * Copyright 2000-2009 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/**
- * Interface implementing the Visitor pattern programming style.
- * I.e., a class that implements this interface can handle all types of
- * instructions with the properly typed methods just by calling the accept()
- * method.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface Visitor {
-
- public void visitStackInstruction( StackInstruction obj );
-
-
- public void visitLocalVariableInstruction( LocalVariableInstruction obj );
-
-
- public void visitBranchInstruction( BranchInstruction obj );
-
-
- public void visitLoadClass( LoadClass obj );
-
-
- public void visitFieldInstruction( FieldInstruction obj );
-
-
- public void visitIfInstruction( IfInstruction obj );
-
-
- public void visitConversionInstruction( ConversionInstruction obj );
-
-
- public void visitPopInstruction( PopInstruction obj );
-
-
- public void visitStoreInstruction( StoreInstruction obj );
-
-
- public void visitTypedInstruction( TypedInstruction obj );
-
-
- public void visitSelect( Select obj );
-
-
- public void visitJsrInstruction( JsrInstruction obj );
-
-
- public void visitGotoInstruction( GotoInstruction obj );
-
-
- public void visitUnconditionalBranch( UnconditionalBranch obj );
-
-
- public void visitPushInstruction( PushInstruction obj );
-
-
- public void visitArithmeticInstruction( ArithmeticInstruction obj );
-
-
- public void visitCPInstruction( CPInstruction obj );
-
-
- public void visitInvokeInstruction( InvokeInstruction obj );
-
-
- public void visitArrayInstruction( ArrayInstruction obj );
-
-
- public void visitAllocationInstruction( AllocationInstruction obj );
-
-
- public void visitReturnInstruction( ReturnInstruction obj );
-
-
- public void visitFieldOrMethod( FieldOrMethod obj );
-
-
- public void visitConstantPushInstruction( ConstantPushInstruction obj );
-
-
- public void visitExceptionThrower( ExceptionThrower obj );
-
-
- public void visitLoadInstruction( LoadInstruction obj );
-
-
- public void visitVariableLengthInstruction( VariableLengthInstruction obj );
-
-
- public void visitStackProducer( StackProducer obj );
-
-
- public void visitStackConsumer( StackConsumer obj );
-
-
- public void visitACONST_NULL( ACONST_NULL obj );
-
-
- public void visitGETSTATIC( GETSTATIC obj );
-
-
- public void visitIF_ICMPLT( IF_ICMPLT obj );
-
-
- public void visitMONITOREXIT( MONITOREXIT obj );
-
-
- public void visitIFLT( IFLT obj );
-
-
- public void visitLSTORE( LSTORE obj );
-
-
- public void visitPOP2( POP2 obj );
-
-
- public void visitBASTORE( BASTORE obj );
-
-
- public void visitISTORE( ISTORE obj );
-
-
- public void visitCHECKCAST( CHECKCAST obj );
-
-
- public void visitFCMPG( FCMPG obj );
-
-
- public void visitI2F( I2F obj );
-
-
- public void visitATHROW( ATHROW obj );
-
-
- public void visitDCMPL( DCMPL obj );
-
-
- public void visitARRAYLENGTH( ARRAYLENGTH obj );
-
-
- public void visitDUP( DUP obj );
-
-
- public void visitINVOKESTATIC( INVOKESTATIC obj );
-
-
- public void visitLCONST( LCONST obj );
-
-
- public void visitDREM( DREM obj );
-
-
- public void visitIFGE( IFGE obj );
-
-
- public void visitCALOAD( CALOAD obj );
-
-
- public void visitLASTORE( LASTORE obj );
-
-
- public void visitI2D( I2D obj );
-
-
- public void visitDADD( DADD obj );
-
-
- public void visitINVOKESPECIAL( INVOKESPECIAL obj );
-
-
- public void visitIAND( IAND obj );
-
-
- public void visitPUTFIELD( PUTFIELD obj );
-
-
- public void visitILOAD( ILOAD obj );
-
-
- public void visitDLOAD( DLOAD obj );
-
-
- public void visitDCONST( DCONST obj );
-
-
- public void visitNEW( NEW obj );
-
-
- public void visitIFNULL( IFNULL obj );
-
-
- public void visitLSUB( LSUB obj );
-
-
- public void visitL2I( L2I obj );
-
-
- public void visitISHR( ISHR obj );
-
-
- public void visitTABLESWITCH( TABLESWITCH obj );
-
-
- public void visitIINC( IINC obj );
-
-
- public void visitDRETURN( DRETURN obj );
-
-
- public void visitFSTORE( FSTORE obj );
-
-
- public void visitDASTORE( DASTORE obj );
-
-
- public void visitIALOAD( IALOAD obj );
-
-
- public void visitDDIV( DDIV obj );
-
-
- public void visitIF_ICMPGE( IF_ICMPGE obj );
-
-
- public void visitLAND( LAND obj );
-
-
- public void visitIDIV( IDIV obj );
-
-
- public void visitLOR( LOR obj );
-
-
- public void visitCASTORE( CASTORE obj );
-
-
- public void visitFREM( FREM obj );
-
-
- public void visitLDC( LDC obj );
-
-
- public void visitBIPUSH( BIPUSH obj );
-
-
- public void visitDSTORE( DSTORE obj );
-
-
- public void visitF2L( F2L obj );
-
-
- public void visitFMUL( FMUL obj );
-
-
- public void visitLLOAD( LLOAD obj );
-
-
- public void visitJSR( JSR obj );
-
-
- public void visitFSUB( FSUB obj );
-
-
- public void visitSASTORE( SASTORE obj );
-
-
- public void visitALOAD( ALOAD obj );
-
-
- public void visitDUP2_X2( DUP2_X2 obj );
-
-
- public void visitRETURN( RETURN obj );
-
-
- public void visitDALOAD( DALOAD obj );
-
-
- public void visitSIPUSH( SIPUSH obj );
-
-
- public void visitDSUB( DSUB obj );
-
-
- public void visitL2F( L2F obj );
-
-
- public void visitIF_ICMPGT( IF_ICMPGT obj );
-
-
- public void visitF2D( F2D obj );
-
-
- public void visitI2L( I2L obj );
-
-
- public void visitIF_ACMPNE( IF_ACMPNE obj );
-
-
- public void visitPOP( POP obj );
-
-
- public void visitI2S( I2S obj );
-
-
- public void visitIFEQ( IFEQ obj );
-
-
- public void visitSWAP( SWAP obj );
-
-
- public void visitIOR( IOR obj );
-
-
- public void visitIREM( IREM obj );
-
-
- public void visitIASTORE( IASTORE obj );
-
-
- public void visitNEWARRAY( NEWARRAY obj );
-
-
- public void visitINVOKEINTERFACE( INVOKEINTERFACE obj );
-
-
- public void visitINEG( INEG obj );
-
-
- public void visitLCMP( LCMP obj );
-
-
- public void visitJSR_W( JSR_W obj );
-
-
- public void visitMULTIANEWARRAY( MULTIANEWARRAY obj );
-
-
- public void visitDUP_X2( DUP_X2 obj );
-
-
- public void visitSALOAD( SALOAD obj );
-
-
- public void visitIFNONNULL( IFNONNULL obj );
-
-
- public void visitDMUL( DMUL obj );
-
-
- public void visitIFNE( IFNE obj );
-
-
- public void visitIF_ICMPLE( IF_ICMPLE obj );
-
-
- public void visitLDC2_W( LDC2_W obj );
-
-
- public void visitGETFIELD( GETFIELD obj );
-
-
- public void visitLADD( LADD obj );
-
-
- public void visitNOP( NOP obj );
-
-
- public void visitFALOAD( FALOAD obj );
-
-
- public void visitINSTANCEOF( INSTANCEOF obj );
-
-
- public void visitIFLE( IFLE obj );
-
-
- public void visitLXOR( LXOR obj );
-
-
- public void visitLRETURN( LRETURN obj );
-
-
- public void visitFCONST( FCONST obj );
-
-
- public void visitIUSHR( IUSHR obj );
-
-
- public void visitBALOAD( BALOAD obj );
-
-
- public void visitDUP2( DUP2 obj );
-
-
- public void visitIF_ACMPEQ( IF_ACMPEQ obj );
-
-
- public void visitIMPDEP1( IMPDEP1 obj );
-
-
- public void visitMONITORENTER( MONITORENTER obj );
-
-
- public void visitLSHL( LSHL obj );
-
-
- public void visitDCMPG( DCMPG obj );
-
-
- public void visitD2L( D2L obj );
-
-
- public void visitIMPDEP2( IMPDEP2 obj );
-
-
- public void visitL2D( L2D obj );
-
-
- public void visitRET( RET obj );
-
-
- public void visitIFGT( IFGT obj );
-
-
- public void visitIXOR( IXOR obj );
-
-
- public void visitINVOKEVIRTUAL( INVOKEVIRTUAL obj );
-
-
- public void visitFASTORE( FASTORE obj );
-
-
- public void visitIRETURN( IRETURN obj );
-
-
- public void visitIF_ICMPNE( IF_ICMPNE obj );
-
-
- public void visitFLOAD( FLOAD obj );
-
-
- public void visitLDIV( LDIV obj );
-
-
- public void visitPUTSTATIC( PUTSTATIC obj );
-
-
- public void visitAALOAD( AALOAD obj );
-
-
- public void visitD2I( D2I obj );
-
-
- public void visitIF_ICMPEQ( IF_ICMPEQ obj );
-
-
- public void visitAASTORE( AASTORE obj );
-
-
- public void visitARETURN( ARETURN obj );
-
-
- public void visitDUP2_X1( DUP2_X1 obj );
-
-
- public void visitFNEG( FNEG obj );
-
-
- public void visitGOTO_W( GOTO_W obj );
-
-
- public void visitD2F( D2F obj );
-
-
- public void visitGOTO( GOTO obj );
-
-
- public void visitISUB( ISUB obj );
-
-
- public void visitF2I( F2I obj );
-
-
- public void visitDNEG( DNEG obj );
-
-
- public void visitICONST( ICONST obj );
-
-
- public void visitFDIV( FDIV obj );
-
-
- public void visitI2B( I2B obj );
-
-
- public void visitLNEG( LNEG obj );
-
-
- public void visitLREM( LREM obj );
-
-
- public void visitIMUL( IMUL obj );
-
-
- public void visitIADD( IADD obj );
-
-
- public void visitLSHR( LSHR obj );
-
-
- public void visitLOOKUPSWITCH( LOOKUPSWITCH obj );
-
-
- public void visitDUP_X1( DUP_X1 obj );
-
-
- public void visitFCMPL( FCMPL obj );
-
-
- public void visitI2C( I2C obj );
-
-
- public void visitLMUL( LMUL obj );
-
-
- public void visitLUSHR( LUSHR obj );
-
-
- public void visitISHL( ISHL obj );
-
-
- public void visitLALOAD( LALOAD obj );
-
-
- public void visitASTORE( ASTORE obj );
-
-
- public void visitANEWARRAY( ANEWARRAY obj );
-
-
- public void visitFRETURN( FRETURN obj );
-
-
- public void visitFADD( FADD obj );
-
-
- public void visitBREAKPOINT( BREAKPOINT obj );
-}
+++ /dev/null
-/*
- * Copyright 2000-2009 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.tomcat.util.bcel.util;
-
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.tomcat.util.bcel.Constants;
-import org.apache.tomcat.util.bcel.classfile.Utility;
-import org.apache.tomcat.util.bcel.generic.AllocationInstruction;
-import org.apache.tomcat.util.bcel.generic.ArrayInstruction;
-import org.apache.tomcat.util.bcel.generic.ArrayType;
-import org.apache.tomcat.util.bcel.generic.BranchHandle;
-import org.apache.tomcat.util.bcel.generic.BranchInstruction;
-import org.apache.tomcat.util.bcel.generic.CHECKCAST;
-import org.apache.tomcat.util.bcel.generic.CPInstruction;
-import org.apache.tomcat.util.bcel.generic.CodeExceptionGen;
-import org.apache.tomcat.util.bcel.generic.ConstantPoolGen;
-import org.apache.tomcat.util.bcel.generic.ConstantPushInstruction;
-import org.apache.tomcat.util.bcel.generic.EmptyVisitor;
-import org.apache.tomcat.util.bcel.generic.FieldInstruction;
-import org.apache.tomcat.util.bcel.generic.IINC;
-import org.apache.tomcat.util.bcel.generic.INSTANCEOF;
-import org.apache.tomcat.util.bcel.generic.Instruction;
-import org.apache.tomcat.util.bcel.generic.InstructionConstants;
-import org.apache.tomcat.util.bcel.generic.InstructionHandle;
-import org.apache.tomcat.util.bcel.generic.InvokeInstruction;
-import org.apache.tomcat.util.bcel.generic.LDC;
-import org.apache.tomcat.util.bcel.generic.LDC2_W;
-import org.apache.tomcat.util.bcel.generic.LocalVariableInstruction;
-import org.apache.tomcat.util.bcel.generic.MULTIANEWARRAY;
-import org.apache.tomcat.util.bcel.generic.MethodGen;
-import org.apache.tomcat.util.bcel.generic.NEWARRAY;
-import org.apache.tomcat.util.bcel.generic.ObjectType;
-import org.apache.tomcat.util.bcel.generic.RET;
-import org.apache.tomcat.util.bcel.generic.ReturnInstruction;
-import org.apache.tomcat.util.bcel.generic.Select;
-import org.apache.tomcat.util.bcel.generic.Type;
-
-/**
- * Factory creates il.append() statements, and sets instruction targets.
- * A helper class for BCELifier.
- *
- * @see BCELifier
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-class BCELFactory extends EmptyVisitor {
-
- private MethodGen _mg;
- private PrintWriter _out;
- private ConstantPoolGen _cp;
-
-
- BCELFactory(MethodGen mg, PrintWriter out) {
- _mg = mg;
- _cp = mg.getConstantPool();
- _out = out;
- }
-
- private Map branch_map = new HashMap(); // Map<Instruction, InstructionHandle>
-
-
- public void start() {
- if (!_mg.isAbstract() && !_mg.isNative()) {
- for (InstructionHandle ih = _mg.getInstructionList().getStart(); ih != null; ih = ih
- .getNext()) {
- Instruction i = ih.getInstruction();
- if (i instanceof BranchInstruction) {
- branch_map.put(i, ih); // memorize container
- }
- if (ih.hasTargeters()) {
- if (i instanceof BranchInstruction) {
- _out.println(" InstructionHandle ih_" + ih.getPosition() + ";");
- } else {
- _out.print(" InstructionHandle ih_" + ih.getPosition() + " = ");
- }
- } else {
- _out.print(" ");
- }
- if (!visitInstruction(i)) {
- i.accept(this);
- }
- }
- updateBranchTargets();
- updateExceptionHandlers();
- }
- }
-
-
- private boolean visitInstruction( Instruction i ) {
- short opcode = i.getOpcode();
- if ((InstructionConstants.INSTRUCTIONS[opcode] != null)
- && !(i instanceof ConstantPushInstruction) && !(i instanceof ReturnInstruction)) { // Handled below
- _out.println("il.append(InstructionConstants."
- + i.getName().toUpperCase(Locale.ENGLISH) + ");");
- return true;
- }
- return false;
- }
-
-
- public void visitLocalVariableInstruction( LocalVariableInstruction i ) {
- short opcode = i.getOpcode();
- Type type = i.getType(_cp);
- if (opcode == Constants.IINC) {
- _out.println("il.append(new IINC(" + i.getIndex() + ", " + ((IINC) i).getIncrement()
- + "));");
- } else {
- String kind = (opcode < Constants.ISTORE) ? "Load" : "Store";
- _out.println("il.append(_factory.create" + kind + "(" + BCELifier.printType(type)
- + ", " + i.getIndex() + "));");
- }
- }
-
-
- public void visitArrayInstruction( ArrayInstruction i ) {
- short opcode = i.getOpcode();
- Type type = i.getType(_cp);
- String kind = (opcode < Constants.IASTORE) ? "Load" : "Store";
- _out.println("il.append(_factory.createArray" + kind + "(" + BCELifier.printType(type)
- + "));");
- }
-
-
- public void visitFieldInstruction( FieldInstruction i ) {
- short opcode = i.getOpcode();
- String class_name = i.getClassName(_cp);
- String field_name = i.getFieldName(_cp);
- Type type = i.getFieldType(_cp);
- _out.println("il.append(_factory.createFieldAccess(\"" + class_name + "\", \"" + field_name
- + "\", " + BCELifier.printType(type) + ", " + "Constants."
- + Constants.OPCODE_NAMES[opcode].toUpperCase(Locale.ENGLISH) + "));");
- }
-
-
- public void visitInvokeInstruction( InvokeInstruction i ) {
- short opcode = i.getOpcode();
- String class_name = i.getClassName(_cp);
- String method_name = i.getMethodName(_cp);
- Type type = i.getReturnType(_cp);
- Type[] arg_types = i.getArgumentTypes(_cp);
- _out.println("il.append(_factory.createInvoke(\"" + class_name + "\", \"" + method_name
- + "\", " + BCELifier.printType(type) + ", "
- + BCELifier.printArgumentTypes(arg_types) + ", " + "Constants."
- + Constants.OPCODE_NAMES[opcode].toUpperCase(Locale.ENGLISH) + "));");
- }
-
-
- public void visitAllocationInstruction( AllocationInstruction i ) {
- Type type;
- if (i instanceof CPInstruction) {
- type = ((CPInstruction) i).getType(_cp);
- } else {
- type = ((NEWARRAY) i).getType();
- }
- short opcode = ((Instruction) i).getOpcode();
- int dim = 1;
- switch (opcode) {
- case Constants.NEW:
- _out.println("il.append(_factory.createNew(\"" + ((ObjectType) type).getClassName()
- + "\"));");
- break;
- case Constants.MULTIANEWARRAY:
- dim = ((MULTIANEWARRAY) i).getDimensions();
- /* FALL THRU */
- case Constants.ANEWARRAY:
- case Constants.NEWARRAY:
- if (type instanceof ArrayType) {
- type = ((ArrayType) type).getBasicType();
- }
- _out.println("il.append(_factory.createNewArray(" + BCELifier.printType(type)
- + ", (short) " + dim + "));");
- break;
- default:
- throw new RuntimeException("Oops: " + opcode);
- }
- }
-
-
- private void createConstant( Object value ) {
- String embed = value.toString();
- if (value instanceof String) {
- embed = '"' + Utility.convertString(embed) + '"';
- } else if (value instanceof Character) {
- embed = "(char)0x" + Integer.toHexString(((Character) value).charValue());
- } else if (value instanceof Float) {
- embed += "f";
- } else if (value instanceof Long) {
- embed += "L";
- }
- _out.println("il.append(new PUSH(_cp, " + embed + "));");
- }
-
-
- public void visitLDC( LDC i ) {
- createConstant(i.getValue(_cp));
- }
-
-
- public void visitLDC2_W( LDC2_W i ) {
- createConstant(i.getValue(_cp));
- }
-
-
- public void visitConstantPushInstruction( ConstantPushInstruction i ) {
- createConstant(i.getValue());
- }
-
-
- public void visitINSTANCEOF( INSTANCEOF i ) {
- Type type = i.getType(_cp);
- _out.println("il.append(new INSTANCEOF(_cp.addClass(" + BCELifier.printType(type) + ")));");
- }
-
-
- public void visitCHECKCAST( CHECKCAST i ) {
- Type type = i.getType(_cp);
- _out.println("il.append(_factory.createCheckCast(" + BCELifier.printType(type) + "));");
- }
-
-
- public void visitReturnInstruction( ReturnInstruction i ) {
- Type type = i.getType(_cp);
- _out.println("il.append(_factory.createReturn(" + BCELifier.printType(type) + "));");
- }
-
- // Memorize BranchInstructions that need an update
- private List branches = new ArrayList();
-
-
- public void visitBranchInstruction( BranchInstruction bi ) {
- BranchHandle bh = (BranchHandle) branch_map.get(bi);
- int pos = bh.getPosition();
- String name = bi.getName() + "_" + pos;
- if (bi instanceof Select) {
- Select s = (Select) bi;
- branches.add(bi);
- StringBuffer args = new StringBuffer("new int[] { ");
- int[] matchs = s.getMatchs();
- for (int i = 0; i < matchs.length; i++) {
- args.append(matchs[i]);
- if (i < matchs.length - 1) {
- args.append(", ");
- }
- }
- args.append(" }");
- _out.print("Select " + name + " = new " + bi.getName().toUpperCase(Locale.ENGLISH)
- + "(" + args + ", new InstructionHandle[] { ");
- for (int i = 0; i < matchs.length; i++) {
- _out.print("null");
- if (i < matchs.length - 1) {
- _out.print(", ");
- }
- }
- _out.println(" }, null);");
- } else {
- int t_pos = bh.getTarget().getPosition();
- String target;
- if (pos > t_pos) {
- target = "ih_" + t_pos;
- } else {
- branches.add(bi);
- target = "null";
- }
- _out.println(" BranchInstruction " + name + " = _factory.createBranchInstruction("
- + "Constants." + bi.getName().toUpperCase(Locale.ENGLISH) + ", " + target
- + ");");
- }
- if (bh.hasTargeters()) {
- _out.println(" ih_" + pos + " = il.append(" + name + ");");
- } else {
- _out.println(" il.append(" + name + ");");
- }
- }
-
-
- public void visitRET( RET i ) {
- _out.println("il.append(new RET(" + i.getIndex() + ")));");
- }
-
-
- private void updateBranchTargets() {
- for (Iterator i = branches.iterator(); i.hasNext();) {
- BranchInstruction bi = (BranchInstruction) i.next();
- BranchHandle bh = (BranchHandle) branch_map.get(bi);
- int pos = bh.getPosition();
- String name = bi.getName() + "_" + pos;
- int t_pos = bh.getTarget().getPosition();
- _out.println(" " + name + ".setTarget(ih_" + t_pos + ");");
- if (bi instanceof Select) {
- InstructionHandle[] ihs = ((Select) bi).getTargets();
- for (int j = 0; j < ihs.length; j++) {
- t_pos = ihs[j].getPosition();
- _out.println(" " + name + ".setTarget(" + j + ", ih_" + t_pos + ");");
- }
- }
- }
- }
-
-
- private void updateExceptionHandlers() {
- CodeExceptionGen[] handlers = _mg.getExceptionHandlers();
- for (int i = 0; i < handlers.length; i++) {
- CodeExceptionGen h = handlers[i];
- String type = (h.getCatchType() == null) ? "null" : BCELifier.printType(h
- .getCatchType());
- _out.println(" method.addExceptionHandler(" + "ih_" + h.getStartPC().getPosition()
- + ", " + "ih_" + h.getEndPC().getPosition() + ", " + "ih_"
- + h.getHandlerPC().getPosition() + ", " + type + ");");
- }
- }
-}
+++ /dev/null
-/*
- * Copyright 2000-2009 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.tomcat.util.bcel.util;
-
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.Locale;
-import org.apache.tomcat.util.bcel.Constants;
-import org.apache.tomcat.util.bcel.Repository;
-import org.apache.tomcat.util.bcel.classfile.ClassParser;
-import org.apache.tomcat.util.bcel.classfile.ConstantValue;
-import org.apache.tomcat.util.bcel.classfile.Field;
-import org.apache.tomcat.util.bcel.classfile.JavaClass;
-import org.apache.tomcat.util.bcel.classfile.Method;
-import org.apache.tomcat.util.bcel.classfile.Utility;
-import org.apache.tomcat.util.bcel.generic.ArrayType;
-import org.apache.tomcat.util.bcel.generic.ConstantPoolGen;
-import org.apache.tomcat.util.bcel.generic.MethodGen;
-import org.apache.tomcat.util.bcel.generic.Type;
-
-/**
- * This class takes a given JavaClass object and converts it to a
- * Java program that creates that very class using BCEL. This
- * gives new users of BCEL a useful example showing how things
- * are done with BCEL. It does not cover all features of BCEL,
- * but tries to mimic hand-written code as close as possible.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class BCELifier extends org.apache.tomcat.util.bcel.classfile.EmptyVisitor {
-
- private static final int FLAG_FOR_UNKNOWN = -1;
- private static final int FLAG_FOR_CLASS = 0;
- private static final int FLAG_FOR_METHOD = 1;
- private JavaClass _clazz;
- private PrintWriter _out;
- private ConstantPoolGen _cp;
-
-
- /** @param clazz Java class to "decompile"
- * @param out where to output Java program
- */
- public BCELifier(JavaClass clazz, OutputStream out) {
- _clazz = clazz;
- _out = new PrintWriter(out);
- _cp = new ConstantPoolGen(_clazz.getConstantPool());
- }
-
-
- /** Start Java code generation
- */
- public void start() {
- visitJavaClass(_clazz);
- _out.flush();
- }
-
-
- public void visitJavaClass( JavaClass clazz ) {
- String class_name = clazz.getClassName();
- String super_name = clazz.getSuperclassName();
- String package_name = clazz.getPackageName();
- String inter = Utility.printArray(clazz.getInterfaceNames(), false, true);
- if (!"".equals(package_name)) {
- class_name = class_name.substring(package_name.length() + 1);
- _out.println("package " + package_name + ";");
- _out.println();
- }
- _out.println("import org.apache.tomcat.util.bcel.generic.*;");
- _out.println("import org.apache.tomcat.util.bcel.classfile.*;");
- _out.println("import org.apache.tomcat.util.bcel.*;");
- _out.println("import java.io.*;");
- _out.println();
- _out.println("public class " + class_name + "Creator implements Constants {");
- _out.println(" private InstructionFactory _factory;");
- _out.println(" private ConstantPoolGen _cp;");
- _out.println(" private ClassGen _cg;");
- _out.println();
- _out.println(" public " + class_name + "Creator() {");
- _out.println(" _cg = new ClassGen(\""
- + (("".equals(package_name)) ? class_name : package_name + "." + class_name)
- + "\", \"" + super_name + "\", " + "\"" + clazz.getSourceFileName() + "\", "
- + printFlags(clazz.getAccessFlags(), FLAG_FOR_CLASS) + ", " + "new String[] { "
- + inter + " });");
- _out.println();
- _out.println(" _cp = _cg.getConstantPool();");
- _out.println(" _factory = new InstructionFactory(_cg, _cp);");
- _out.println(" }");
- _out.println();
- printCreate();
- Field[] fields = clazz.getFields();
- if (fields.length > 0) {
- _out.println(" private void createFields() {");
- _out.println(" FieldGen field;");
- for (int i = 0; i < fields.length; i++) {
- fields[i].accept(this);
- }
- _out.println(" }");
- _out.println();
- }
- Method[] methods = clazz.getMethods();
- for (int i = 0; i < methods.length; i++) {
- _out.println(" private void createMethod_" + i + "() {");
- methods[i].accept(this);
- _out.println(" }");
- _out.println();
- }
- printMain();
- _out.println("}");
- }
-
-
- private void printCreate() {
- _out.println(" public void create(OutputStream out) throws IOException {");
- Field[] fields = _clazz.getFields();
- if (fields.length > 0) {
- _out.println(" createFields();");
- }
- Method[] methods = _clazz.getMethods();
- for (int i = 0; i < methods.length; i++) {
- _out.println(" createMethod_" + i + "();");
- }
- _out.println(" _cg.getJavaClass().dump(out);");
- _out.println(" }");
- _out.println();
- }
-
-
- private void printMain() {
- String class_name = _clazz.getClassName();
- _out.println(" public static void main(String[] args) throws Exception {");
- _out.println(" " + class_name + "Creator creator = new " + class_name + "Creator();");
- _out.println(" creator.create(new FileOutputStream(\"" + class_name + ".class\"));");
- _out.println(" }");
- }
-
-
- public void visitField( Field field ) {
- _out.println();
- _out.println(" field = new FieldGen(" + printFlags(field.getAccessFlags()) + ", "
- + printType(field.getSignature()) + ", \"" + field.getName() + "\", _cp);");
- ConstantValue cv = field.getConstantValue();
- if (cv != null) {
- String value = cv.toString();
- _out.println(" field.setInitValue(" + value + ")");
- }
- _out.println(" _cg.addField(field.getField());");
- }
-
-
- public void visitMethod( Method method ) {
- MethodGen mg = new MethodGen(method, _clazz.getClassName(), _cp);
- Type result_type = mg.getReturnType();
- Type[] arg_types = mg.getArgumentTypes();
- _out.println(" InstructionList il = new InstructionList();");
- _out.println(" MethodGen method = new MethodGen("
- + printFlags(method.getAccessFlags(), FLAG_FOR_METHOD) + ", "
- + printType(result_type) + ", " + printArgumentTypes(arg_types) + ", "
- + "new String[] { " + Utility.printArray(mg.getArgumentNames(), false, true)
- + " }, \"" + method.getName() + "\", \"" + _clazz.getClassName() + "\", il, _cp);");
- _out.println();
- BCELFactory factory = new BCELFactory(mg, _out);
- factory.start();
- _out.println(" method.setMaxStack();");
- _out.println(" method.setMaxLocals();");
- _out.println(" _cg.addMethod(method.getMethod());");
- _out.println(" il.dispose();");
- }
-
-
- static String printFlags( int flags ) {
- return printFlags(flags, FLAG_FOR_UNKNOWN);
- }
-
-
- static String printFlags( int flags, int reason ) {
- if (flags == 0) {
- return "0";
- }
- StringBuffer buf = new StringBuffer();
- for (int i = 0, pow = 1; pow <= Constants.MAX_ACC_FLAG; i++) {
- if ((flags & pow) != 0) {
- if ((pow == Constants.ACC_SYNCHRONIZED) && (reason == FLAG_FOR_CLASS)) {
- buf.append("ACC_SUPER | ");
- } else if ((pow == Constants.ACC_VOLATILE) && (reason == FLAG_FOR_METHOD)) {
- buf.append("ACC_BRIDGE | ");
- } else if ((pow == Constants.ACC_TRANSIENT) && (reason == FLAG_FOR_METHOD)) {
- buf.append("ACC_VARARGS | ");
- } else {
- buf.append("ACC_")
- .append(Constants.ACCESS_NAMES[i].toUpperCase(Locale.ENGLISH)).append(
- " | ");
- }
- }
- pow <<= 1;
- }
- String str = buf.toString();
- return str.substring(0, str.length() - 3);
- }
-
-
- static String printArgumentTypes( Type[] arg_types ) {
- if (arg_types.length == 0) {
- return "Type.NO_ARGS";
- }
- StringBuffer args = new StringBuffer();
- for (int i = 0; i < arg_types.length; i++) {
- args.append(printType(arg_types[i]));
- if (i < arg_types.length - 1) {
- args.append(", ");
- }
- }
- return "new Type[] { " + args.toString() + " }";
- }
-
-
- static String printType( Type type ) {
- return printType(type.getSignature());
- }
-
-
- static String printType( String signature ) {
- Type type = Type.getType(signature);
- byte t = type.getType();
- if (t <= Constants.T_VOID) {
- return "Type." + Constants.TYPE_NAMES[t].toUpperCase(Locale.ENGLISH);
- } else if (type.toString().equals("java.lang.String")) {
- return "Type.STRING";
- } else if (type.toString().equals("java.lang.Object")) {
- return "Type.OBJECT";
- } else if (type.toString().equals("java.lang.StringBuffer")) {
- return "Type.STRINGBUFFER";
- } else if (type instanceof ArrayType) {
- ArrayType at = (ArrayType) type;
- return "new ArrayType(" + printType(at.getBasicType()) + ", " + at.getDimensions()
- + ")";
- } else {
- return "new ObjectType(\"" + Utility.signatureToString(signature, false) + "\")";
- }
- }
-
-
- /** Default main method
- */
- public static void main( String[] argv ) throws Exception {
- JavaClass java_class;
- String name = argv[0];
- if ((java_class = Repository.lookupClass(name)) == null) {
- java_class = new ClassParser(name).parse(); // May throw IOException
- }
- BCELifier bcelifier = new BCELifier(java_class, System.out);
- bcelifier.start();
- }
-}