@Beta public interface MethodSignatureBuilder extends TypeMemberBuilder<MethodSignatureBuilder>
new
instance of Method Signature. MethodSignature
the Method in java MUST contain
Name, Return Type and Access Modifier. By default the Access Modifier can be
set to public. The Method Signature builder does not contain method for
addName due to enforce reason that MethodSignatureBuilder SHOULD be
instantiated only once with defined method name. TypeMemberBuilder.addAnnotation(String, String)
and
TypeMemberBuilder.setComment(String)
can be used as optional because not all methods
MUST contain annotation or comment definitions.MethodSignature
Modifier and Type | Method and Description |
---|---|
MethodSignatureBuilder |
addParameter(Type type,
String name)
Adds Parameter into the List of method parameters.
|
MethodSignatureBuilder |
setAbstract(boolean isAbstract)
Sets the flag for declaration of method as abstract or non abstract.
|
MethodSignature |
toInstance(Type definingType)
Returns
new immutable instance of Method Signature. |
addAnnotation, getAccessModifier, getName, setAccessModifier, setComment, setFinal, setReturnType, setStatic
MethodSignatureBuilder setAbstract(boolean isAbstract)
isAbstract == true
The instantiated Method
Signature MUST have return value for MethodSignature.isAbstract()
also equals to true
.isAbstract
- is abstract flagMethodSignatureBuilder addParameter(Type type, String name)
null
.
null
the
method SHOULD throw an IllegalArgumentException
type
- Parameter Typename
- Parameter NameMethodSignature toInstance(Type definingType)
new
immutable instance of Method Signature. definingType
param cannot be null
. The
every method in Java MUST be declared and defined inside the scope of
class
or interface
definition. In case that
defining Type will be passed as null
reference the method
SHOULD thrown IllegalArgumentException
.definingType
- Defining Type of Method Signaturenew
immutable instance of Method Signature.Copyright © 2019 OpenDaylight. All rights reserved.