public class JParameter extends JVariable implements HasEnclosingMethod
HasName.Util
Constructor and Description |
---|
JParameter(SourceInfo info,
String name,
JType type,
boolean isFinal,
boolean isThis,
JMethod enclosingMethod) |
Modifier and Type | Method and Description |
---|---|
static JParameter |
create(SourceInfo info,
String name,
JType type,
boolean isFinal,
boolean isThis,
JMethod enclosingMethod) |
JMethod |
getEnclosingMethod() |
boolean |
isThis()
Returns
true if this parameter is the this parameter of a
static impl method. |
void |
setInitializer(JDeclarationStatement declStmt) |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getConstInitializer, getDeclarationStatement, getInitializer, getName, getType, hasInitializer, isFinal, setFinal, setName, setType
getSourceInfo, setSourceInfo, toSource, toString
public JParameter(SourceInfo info, String name, JType type, boolean isFinal, boolean isThis, JMethod enclosingMethod)
public static JParameter create(SourceInfo info, String name, JType type, boolean isFinal, boolean isThis, JMethod enclosingMethod)
public JMethod getEnclosingMethod()
getEnclosingMethod
in interface HasEnclosingMethod
public boolean isThis()
true
if this parameter is the this parameter of a
static impl method.public void setInitializer(JDeclarationStatement declStmt)
setInitializer
in interface CanHaveInitializer
public void traverse(JVisitor visitor, Context ctx)
JVisitable
traverse
in interface JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.