| java.lang.Object javassist.expr.Expr javassist.expr.NewExpr
NewExpr | public class NewExpr extends Expr (Code) | | Object creation (new expression).
|
Method Summary | |
public String | getClassName() Returns the class name of the created object. | public CtConstructor | getConstructor() Returns the constructor called for creating the object. | public String | getFileName() Returns the source file containing the new expression. | public int | getLineNumber() Returns the line number of the source line containing the
new expression. | public String | getSignature() Get the signature of the constructor
The signature is represented by a character string
called method descriptor, which is defined in the JVM specification. | public CtClass[] | mayThrow() Returns the list of exceptions that the expression may throw. | public void | replace(String statement) Replaces the new expression with the bytecode derived from
the given source text. | public CtBehavior | where() Returns the method or constructor containing the new
expression represented by this object. |
getClassName | public String getClassName()(Code) | | Returns the class name of the created object.
|
getFileName | public String getFileName()(Code) | | Returns the source file containing the new expression.
null if this information is not available. |
getLineNumber | public int getLineNumber()(Code) | | Returns the line number of the source line containing the
new expression.
-1 if this information is not available. |
mayThrow | public CtClass[] mayThrow()(Code) | | Returns the list of exceptions that the expression may throw.
This list includes both the exceptions that the try-catch statements
including the expression can catch and the exceptions that
the throws declaration allows the method to throw.
|
replace | public void replace(String statement) throws CannotCompileException(Code) | | Replaces the new expression with the bytecode derived from
the given source text.
$0 is available but the value is null.
Parameters: statement - a Java statement. |
where | public CtBehavior where()(Code) | | Returns the method or constructor containing the new
expression represented by this object.
|
|
|