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. AnnotableTypeBuilder.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.
|
default MethodSignatureBuilder |
setDefault(boolean isDefault)
Sets the flag indicating whether this is a
default interface method. |
MethodSignature |
toInstance(Type definingType)
Returns
new immutable instance of Method Signature. |
getAccessModifier, getName, setAccessModifier, setComment, setFinal, setReturnType, setStatic
addAnnotation, addAnnotation
MethodSignatureBuilder setAbstract(boolean isAbstract)
isAbstract == true
the instantiated Method Signature MUST have return value for MethodSignature.isAbstract()
also equals to
true
.isAbstract
- is abstract flagdefault MethodSignatureBuilder setDefault(boolean isDefault)
default interface
method.isDefault
- true if this signature is to represent a default method.MethodSignatureBuilder 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
. 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.