- All Superinterfaces:
Member
@OVLInaccessible public interface Method extends Member
This interface represents a method defined in OVL code.
- Author:
- Dr. Peter Droste, Omix Visualization
-
Method Summary
Modifier and Type Method Description ClassType[]
getExceptionTypes()
Returns the types of the exceptions thrown by this method.ClassType[]
getParameterTypes()
Returns the types of the method parameters.ClassType
getReturnType()
Returns the return type of this method.@IsVarType Object
invoke(Object @IsVarType ... params)
This method invokes the OVL method and returns its return value (null
if method isvoid
).boolean
isAbstract()
Returnstrue
if this method was definedabstract
.boolean
isFinal()
Returnstrue
if this method was definedfinal
.boolean
isPrivate()
Returnstrue
if this method was definedprivate
.boolean
isProtected()
Returnstrue
if this method was definedprotected
.boolean
isPublic()
Returnstrue
if this method was definedpublic
.Methods inherited from interface omix.lang.reflect.Member
getAnnotation, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, getName, getNamespace, isAnnotationPresent
-
Method Details
-
getReturnType
ClassType getReturnType()Returns the return type of this method.- Returns:
- return types
-
getParameterTypes
ClassType[] getParameterTypes()Returns the types of the method parameters.- Returns:
- parameter types
-
getExceptionTypes
ClassType[] getExceptionTypes()Returns the types of the exceptions thrown by this method.- Returns:
- exception types
-
isFinal
boolean isFinal()Returnstrue
if this method was definedfinal
.- Returns:
- has final modifier?
-
isPrivate
boolean isPrivate()Returnstrue
if this method was definedprivate
.- Returns:
- has private modifier?
-
isProtected
boolean isProtected()Returnstrue
if this method was definedprotected
.- Returns:
- has protected modifier?
-
isPublic
boolean isPublic()Returnstrue
if this method was definedpublic
.- Returns:
- has public modifier?
-
isAbstract
boolean isAbstract()Returnstrue
if this method was definedabstract
.- Returns:
- has abstract modifier?
-
invoke
@IsVarType Object invoke(Object @IsVarType ... params) throws IllegalAccessException, IllegalArgumentException, InvocationTargetExceptionThis method invokes the OVL method and returns its return value (null
if method isvoid
).- Parameters:
params
- a list of parameters matching togetParameterTypes()
- Returns:
- the return value of the method
- Throws:
IllegalAccessException
- if this method is inaccessibleIllegalArgumentException
- if the number or type of arguments is invalidInvocationTargetException
- nesting one ofgetExceptionTypes()
-