Class BasicMethodLink
java.lang.Object
org.tudalgo.algoutils.tutor.general.reflections.BasicLink
org.tudalgo.algoutils.tutor.general.reflections.BasicMethodLink
- All Implemented Interfaces:
Identifiable,Stringifiable,Link,MethodLink,WithCtElement,WithModifiers,WithName,WithType,WithTypeList
A basic implementation of a
method link.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionspoon.reflect.declaration.CtMethod<?>Returns the CtElement associated with the element behind this link.Returns the identifier of this identifiable object.<T> TInvokes the method linked by this method link on the given instance with the given arguments.<T> TinvokeStatic(Object... args) Invokes the method linked by this method link with the given arguments.static BasicMethodLinkReturns the actual method behind this method link.Returns the return type of the method linked by this method link.type()Returns the type of this link.typeList()Returns the list of this link.Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tudalgo.algoutils.tutor.general.match.Identifiable
stringMethods inherited from interface org.tudalgo.algoutils.tutor.general.reflections.MethodLink
kind, modifiers, name
-
Method Details
-
of
-
typeList
Description copied from interface:WithTypeListReturns the list of this link.
- Specified by:
typeListin interfaceWithTypeList- Returns:
- the list of types
-
returnType
Description copied from interface:MethodLinkReturns the return type of the method linked by this method link.
- Specified by:
returnTypein interfaceMethodLink- Returns:
- the return type
-
identifier
Description copied from interface:IdentifiableReturns the identifier of this identifiable object.
- Specified by:
identifierin interfaceIdentifiable- Specified by:
identifierin interfaceWithName- Returns:
- the identifier
-
invokeStatic
Description copied from interface:MethodLinkInvokes the method linked by this method link with the given arguments.
- Specified by:
invokeStaticin interfaceMethodLink- Type Parameters:
T- the type of the return value- Parameters:
args- the arguments- Returns:
- the return value
- Throws:
Exception
-
invoke
Description copied from interface:MethodLinkInvokes the method linked by this method link on the given instance with the given arguments.
- Specified by:
invokein interfaceMethodLink- Type Parameters:
T- the type of the return value- Parameters:
instance- the instanceargs- the arguments- Returns:
- the return value
- Throws:
Exception
-
reflection
Description copied from interface:MethodLinkReturns the actual method behind this method link.- Specified by:
reflectionin interfaceLink- Specified by:
reflectionin interfaceMethodLink- Returns:
- the method
-
type
Description copied from interface:WithTypeReturns the type of this link.
-
getCtElement
public spoon.reflect.declaration.CtMethod<?> getCtElement()Description copied from interface:WithCtElementReturns the CtElement associated with the element behind this link.- Specified by:
getCtElementin interfaceWithCtElement- Returns:
- the CtElement
-