public class SignatureParameter extends Object
Constructor and Description |
---|
SignatureParameter(SignatureParameter param)
Creates a new signature parameter from a given one.
|
SignatureParameter(Type type)
Creates a new unnamed signature parameter.
|
SignatureParameter(Type type,
boolean variadic)
Creates a new unnamed signature parameter.
|
SignatureParameter(Type type,
String name)
Creates a new signature parameter.
|
SignatureParameter(Type type,
String name,
boolean variadic,
boolean isRequired,
String defaultValue)
Creates a new signature parameter.
|
Modifier and Type | Method and Description |
---|---|
Expression |
getDefaultValueExpression(NamespaceModel namespaceModel)
Returns the parsed default value expression.
|
String |
getDefaultValueExpressionText()
Returns the text of default value expression.
|
String |
getName()
Returns the name of this parameter.
|
Type |
getType()
Returns type of this parameter
|
boolean |
isOptional()
Returns
true if the parameter is optional. |
boolean |
isRequired()
Returns
true if the parameter is required. |
boolean |
isVariadic()
Returns
true if this parameter is variadic, false otherwise. |
String |
toString()
Returns string representation of this signature parameter in the form
#paramType #paramName? . |
public SignatureParameter(Type type)
type
- type of parameterpublic SignatureParameter(Type type, boolean variadic)
type
- type of parametervariadic
- boolean specifying if this parameter is variadicpublic SignatureParameter(Type type, String name)
SignatureParameter(Type, String, boolean, boolean, String)
.type
- type of parametername
- string containing name of parameterpublic SignatureParameter(Type type, String name, boolean variadic, boolean isRequired, String defaultValue)
type
- a parameter typename
- a parameter namevariadic
- a flag specifying whether this parameter is variadicisRequired
- a flag specifying whether this parameter is requireddefaultValue
- a default value expression sourcepublic SignatureParameter(SignatureParameter param)
param
- public String getName()
public Type getType()
public boolean isVariadic()
true
if this parameter is variadic, false otherwise.true
if the parameter is variadic, false otherwisepublic boolean isRequired()
true
if the parameter is required.true
if the parameter is requiredpublic boolean isOptional()
true
if the parameter is optional.true
if the parameter is optionalpublic String toString()
#paramType #paramName?
.toString
in class Object
Object.toString()
public Expression getDefaultValueExpression(NamespaceModel namespaceModel)
namespaceModel
- the signature namespace modelpublic String getDefaultValueExpressionText()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.