Interface MethodSignature
- All Superinterfaces:
TypeMember
The Method Signature interface contains simplified meta model for java method definition. Each method MUST be defined
by name, return type, parameters and access modifier. Additionally method MAY contain associated annotations and a
comment. By contract if method does not contain any comments or annotation definitions the
TypeMember.getComment()
SHOULD rather return empty string and TypeMember.getAnnotations()
SHOULD rather return empty list than null
values.
The defining Type contains the reference to Generated Type that declares Method Signature.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The Parameter interface is designed to hold the information of method Parameter(s).static enum
Method return type mechanics. -
Method Summary
Modifier and TypeMethodDescription@NonNull MethodSignature.ValueMechanics
Return the mechanics associated with this method.Returns the List of parameters that method declare.boolean
Returnstrue
if the method signature is defined as abstract.boolean
Returnstrue
if this method is ainterface default
method.Methods inherited from interface org.opendaylight.yangtools.binding.model.api.TypeMember
getAccessModifier, getAnnotations, getComment, getName, getReturnType, isFinal, isStatic
-
Method Details
-
isAbstract
boolean isAbstract()Returnstrue
if the method signature is defined as abstract.By default in java all method declarations in interface are defined as abstract, but the user does not need necessarily to declare abstract keyword in front of each method. The abstract methods are allowed in Class definitions but only when the class is declared as abstract.
- Returns:
true
if the method signature is defined as abstract.
-
isDefault
boolean isDefault()Returnstrue
if this method is ainterface default
method.- Returns:
true
if the method signature is defined as default.
-
getParameters
List<MethodSignature.Parameter> getParameters()Returns the List of parameters that method declare. If the method does not contain any parameters, the method will return empty List.- Returns:
- the List of parameters that method declare.
-
getMechanics
@NonNull MethodSignature.ValueMechanics getMechanics()Return the mechanics associated with this method.- Returns:
- Associated mechanics
-