Interface MethodLink
- All Superinterfaces:
Identifiable,Link,Stringifiable,WithModifiers,WithName,WithType,WithTypeList
- All Known Implementing Classes:
BasicMethodLink
An interface used to simply access methods.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<T> TInvokes the method linked by this method link on the given instance with the given arguments.<T> TinvokeStatic(Object... arguments) Invokes the method linked by this method link with the given arguments.default Link.Kindkind()default intReturn the bit representation of the modifiers of this link.default Stringname()Returns the name of this link.Returns the actual method behind this method link.Returns the return type of the method linked by this method link.Methods inherited from interface org.tudalgo.algoutils.tutor.general.match.Identifiable
stringMethods inherited from interface org.tudalgo.algoutils.tutor.general.reflections.WithName
identifierMethods inherited from interface org.tudalgo.algoutils.tutor.general.reflections.WithTypeList
typeList
-
Method Details
-
returnType
TypeLink returnType()Returns the return type of the method linked by this method link.
- Returns:
- the return type
-
invoke
Invokes the method linked by this method link on the given instance with the given arguments.
- Type Parameters:
T- the type of the return value- Parameters:
instance- the instancearguments- the arguments- Returns:
- the return value
- Throws:
Exception
-
invokeStatic
Invokes the method linked by this method link with the given arguments.
- Type Parameters:
T- the type of the return value- Parameters:
arguments- the arguments- Returns:
- the return value
- Throws:
Exception
-
kind
-
reflection
Method reflection()Returns the actual method behind this method link.- Specified by:
reflectionin interfaceLink- Returns:
- the method
-
name
Description copied from interface:WithNameReturns the name of this link.
-
modifiers
default int modifiers()Description copied from interface:WithModifiersReturn the bit representation of the modifiers of this link.
- Specified by:
modifiersin interfaceWithModifiers- Returns:
- the modifiers
-