public class JParameter extends JVariable
HasName.Util
BY_NAME_COMPARATOR
Constructor and Description |
---|
JParameter(SourceInfo info,
String name,
JType type,
boolean isFinal) |
Modifier and Type | Method and Description |
---|---|
JParameterRef |
createRef(SourceInfo info) |
boolean |
isOptional()
Returns
true if this parameter marked as optional. |
boolean |
isThis()
Returns
true if this parameter is the this parameter of a
static impl method. |
boolean |
isVarargs()
Returns
true if this parameter is a varargs parameter. |
JParameterRef |
makeRef(SourceInfo info) |
void |
setInitializer(JDeclarationStatement declStmt) |
void |
setOptional() |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getConstInitializer, getDeclarationStatement, getInitializer, getName, getSuppressedWarnings, getType, hasInitializer, isFinal, setFinal, setName, setSuppressedWarnings, setType
getSourceInfo, setSourceInfo, toSource, toString
public JParameter(SourceInfo info, String name, JType type, boolean isFinal)
public JParameterRef createRef(SourceInfo info)
public boolean isOptional()
true
if this parameter marked as optional.public boolean isThis()
true
if this parameter is the this parameter of a
static impl method.public boolean isVarargs()
true
if this parameter is a varargs parameter.public void setOptional()
public JParameterRef makeRef(SourceInfo info)
public void setInitializer(JDeclarationStatement declStmt)
Copyright © 2018. All rights reserved.