diff options
Diffstat (limited to 'src/main/javassist/expr/Instanceof.java')
-rw-r--r-- | src/main/javassist/expr/Instanceof.java | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/main/javassist/expr/Instanceof.java b/src/main/javassist/expr/Instanceof.java index 6d9cdc94..a046ddbc 100644 --- a/src/main/javassist/expr/Instanceof.java +++ b/src/main/javassist/expr/Instanceof.java @@ -16,9 +16,23 @@ package javassist.expr; -import javassist.*; -import javassist.bytecode.*; -import javassist.compiler.*; +import javassist.CannotCompileException; +import javassist.ClassPool; +import javassist.CtBehavior; +import javassist.CtClass; +import javassist.NotFoundException; +import javassist.bytecode.BadBytecode; +import javassist.bytecode.Bytecode; +import javassist.bytecode.CodeAttribute; +import javassist.bytecode.CodeIterator; +import javassist.bytecode.ConstPool; +import javassist.bytecode.MethodInfo; +import javassist.bytecode.Opcode; +import javassist.compiler.CompileError; +import javassist.compiler.Javac; +import javassist.compiler.JvstCodeGen; +import javassist.compiler.JvstTypeChecker; +import javassist.compiler.ProceedHandler; import javassist.compiler.ast.ASTList; /** @@ -37,6 +51,7 @@ public class Instanceof extends Expr { * Returns the method or constructor containing the instanceof * expression represented by this object. */ + @Override public CtBehavior where() { return super.where(); } /** @@ -45,6 +60,7 @@ public class Instanceof extends Expr { * * @return -1 if this information is not available. */ + @Override public int getLineNumber() { return super.getLineNumber(); } @@ -55,6 +71,7 @@ public class Instanceof extends Expr { * * @return null if this information is not available. */ + @Override public String getFileName() { return super.getFileName(); } @@ -78,6 +95,7 @@ public class Instanceof extends Expr { * including the expression can catch and the exceptions that * the throws declaration allows the method to throw. */ + @Override public CtClass[] mayThrow() { return super.mayThrow(); } @@ -90,8 +108,10 @@ public class Instanceof extends Expr { * * @param statement a Java statement except try-catch. */ + @Override public void replace(String statement) throws CannotCompileException { thisClass.getClassFile(); // to call checkModify(). + @SuppressWarnings("unused") ConstPool constPool = getConstPool(); int pos = currentPos; int index = iterator.u16bitAt(pos + 1); @@ -146,6 +166,7 @@ public class Instanceof extends Expr { index = i; } + @Override public void doit(JvstCodeGen gen, Bytecode bytecode, ASTList args) throws CompileError { @@ -160,6 +181,7 @@ public class Instanceof extends Expr { gen.setType(CtClass.booleanType); } + @Override public void setReturnType(JvstTypeChecker c, ASTList args) throws CompileError { |