|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavassist.expr.Expr
javassist.expr.NewArray
public class NewArray
Array creation.
This class does not provide methods for obtaining the initial values of array elements.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
protected |
NewArray(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m,
int op)
|
| Method Summary | |
|---|---|
CtClass |
getComponentType()
Returns the type of array components. |
int |
getCreatedDimensions()
Returns the number of dimensions of arrays to be created. |
int |
getDimension()
Returns the dimension of the created array. |
java.lang.String |
getFileName()
Returns the source file containing the array creation. |
int |
getLineNumber()
Returns the line number of the source line containing the array creation. |
CtClass[] |
mayThrow()
Returns the list of exceptions that the expression may throw. |
void |
replace(java.lang.String statement)
Replaces the array creation with the bytecode derived from the given source text. |
CtBehavior |
where()
Returns the method or constructor containing the array creation represented by this object. |
| Methods inherited from class javassist.expr.Expr |
|---|
edited, getConstPool, getEnclosingClass, indexOfBytecode, locals, replace, replace0, runEditor, stack, withinStatic |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected NewArray(int pos,
CodeIterator i,
CtClass declaring,
MethodInfo m,
int op)
| Method Detail |
|---|
public CtBehavior where()
where in class Exprpublic int getLineNumber()
getLineNumber in class Exprpublic java.lang.String getFileName()
getFileName in class Exprpublic CtClass[] mayThrow()
mayThrow in class Expr
public CtClass getComponentType()
throws NotFoundException
NotFoundExceptionpublic int getDimension()
public int getCreatedDimensions()
public void replace(java.lang.String statement)
throws CannotCompileException
$0 is available even if the called method is static. If the field access is writing, $_ is available but the value of $_ is ignored.
replace in class Exprstatement - a Java statement except try-catch.
CannotCompileException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||