public static final class FunctionSignature.Builder extends Object
FunctionSignature
.Modifier and Type | Method and Description |
---|---|
FunctionSignature |
build()
Builds instance of
FunctionSignature with the parameters specified in this
builder. |
FunctionSignature.Builder |
constraint(FunctionConstraint constraint)
Sets the function constraint.
|
FunctionSignature.Builder |
freeType(FreeType... types)
Adds free types.
|
FunctionSignature.Builder |
freeType(String... types)
Adds free types.
|
FunctionSignature.Builder |
freeTypeBound(FreeType freeType,
Type type)
Adds a free type upper bound.
|
FunctionSignature.Builder |
metadata(Map<String,String> metadata)
Adds metadata
|
FunctionSignature.Builder |
modifiers(Collection<Modifier> modifiers)
Adds given modifiers.
|
FunctionSignature.Builder |
op(Operation operation)
Sets the operation.
|
FunctionSignature.Builder |
param(SignatureParameter... params)
Adds parameters.
|
FunctionSignature.Builder |
param(Type... types)
Adds parameters.
|
FunctionSignature.Builder |
param(Type type,
String name)
Adds named parameter.
|
FunctionSignature.Builder |
paramVariadic(Type type)
Adds variadic parameter.
|
FunctionSignature.Builder |
paramVariadic(Type type,
String name)
Adds named variadic parameter.
|
FunctionSignature.Builder |
returns(Type returnType)
Sets return type.
|
FunctionSignature.Builder |
setAbstract(boolean isAbstract)
Sets the "abstract" flag.
|
FunctionSignature.Builder |
setConstructor(boolean isConstructor)
Sets the constructor flag.
|
FunctionSignature.Builder |
setDeprecated(boolean deprecated)
Sets deprecated modifier.
|
FunctionSignature.Builder |
setExtensionMethod(boolean extension)
Sets the extension modifier.
|
FunctionSignature.Builder |
setMethod(boolean isMethod)
Sets the method flag.
|
FunctionSignature.Builder |
setSideEffect(boolean sideEffect)
Sets side-effect modifier.
|
FunctionSignature.Builder |
setStatic(boolean isStatic)
Sets the static flag.
|
FunctionSignature.Builder |
setVisibility(Visibility visibility)
Sets private modifier.
|
public FunctionSignature build()
FunctionSignature
with the parameters specified in this
builder.FunctionSignature
public FunctionSignature.Builder returns(Type returnType)
returnType
- public FunctionSignature.Builder op(Operation operation)
operation
- public FunctionSignature.Builder setStatic(boolean isStatic)
isStatic
- public FunctionSignature.Builder setVisibility(Visibility visibility)
visibility
- public FunctionSignature.Builder modifiers(Collection<Modifier> modifiers)
modifiers
- public FunctionSignature.Builder param(Type... types)
types
- public FunctionSignature.Builder param(SignatureParameter... params)
params
- public FunctionSignature.Builder paramVariadic(Type type)
type
- public FunctionSignature.Builder param(Type type, String name)
type
- name
- public FunctionSignature.Builder paramVariadic(Type type, String name)
type
- name
- public FunctionSignature.Builder freeType(FreeType... types)
types
- public FunctionSignature.Builder freeType(String... types)
types
- public FunctionSignature.Builder constraint(FunctionConstraint constraint)
constraint
- public FunctionSignature.Builder metadata(Map<String,String> metadata)
metadata
- public FunctionSignature.Builder freeTypeBound(FreeType freeType, Type type)
freeType
- type
- public FunctionSignature.Builder setMethod(boolean isMethod)
isMethod
- public FunctionSignature.Builder setConstructor(boolean isConstructor)
isConstructor
- public FunctionSignature.Builder setAbstract(boolean isAbstract)
isAbstract
- public FunctionSignature.Builder setDeprecated(boolean deprecated)
deprecated
- public FunctionSignature.Builder setSideEffect(boolean sideEffect)
sideEffect
- public FunctionSignature.Builder setExtensionMethod(boolean extension)
extension
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.