org.reflext.api
Interface MethodInfo

All Superinterfaces:
Annotated, GenericDeclarationInfo, MemberInfo

public interface MethodInfo
extends GenericDeclarationInfo, Annotated, MemberInfo

Version:
$Revision$
Author:
Julien Viet

Method Summary
 java.util.List<java.lang.String> getParameterNames()
          Returns the parameter names of the method or null if the parameter names cannot be determined.
 java.util.List<TypeInfo> getParameterTypes()
          Returns the list of type parameter of this method.
 TypeInfo getReturnType()
          Returns the return type.
 MethodSignature getSignature()
          Returns the method signature.
 MethodSignature getSignature(ClassTypeInfo context)
          Resolves a type signature with a provided class type context.
 java.util.List<ClassTypeInfo> getThrownTypes()
           
 MethodType getType()
          Returns the method type.
 boolean isAbstract()
          Returns true when the method getType() returns the value MethodType.ABSTRACT.
 boolean isConcrete()
          Returns true when the method getType() returns the value MethodType.CONCRETE.
 boolean isFinal()
          Returns true if method is final, otheriwse false.
 boolean isNative()
          Returns true when the method getType() returns the value MethodType.NATIVE.
 boolean isStatic()
          Returns true if method is static, otherwise false.
 java.lang.Object unwrap()
          Unwraps the method underlying object and returns it.
 
Methods inherited from interface org.reflext.api.GenericDeclarationInfo
getTypeParameters
 
Methods inherited from interface org.reflext.api.annotation.Annotated
getDeclaredAnnotation
 
Methods inherited from interface org.reflext.api.MemberInfo
getAccess, getName, getOwner
 

Method Detail

unwrap

java.lang.Object unwrap()
Unwraps the method underlying object and returns it.

Returns:
the wrapped method

getReturnType

TypeInfo getReturnType()
Returns the return type.

Returns:
the return type

getParameterTypes

java.util.List<TypeInfo> getParameterTypes()
Returns the list of type parameter of this method.

Returns:
the parameter types

getParameterNames

java.util.List<java.lang.String> getParameterNames()
Returns the parameter names of the method or null if the parameter names cannot be determined.

Returns:
the method parameter names

getSignature

MethodSignature getSignature()
Returns the method signature.

Returns:
the method signature

getSignature

MethodSignature getSignature(ClassTypeInfo context)

Resolves a type signature with a provided class type context.

For instance, let's consider the following class: public class A implements java.util.List { ... public boolean add(String e) { ... } ... } Whenever you resolve the method List.add(Object) from the List interface within the context of the A class, you will obtain the signature add(String e) instead of the add(Object e) signature.

Parameters:
context - the class type context
Returns:
the signature with respect to the provided context

isAbstract

boolean isAbstract()
Returns true when the method getType() returns the value MethodType.ABSTRACT.

Returns:
true when the method is abstract
See Also:
getType()

isNative

boolean isNative()
Returns true when the method getType() returns the value MethodType.NATIVE.

Returns:
true when the method is native
See Also:
getType()

isConcrete

boolean isConcrete()
Returns true when the method getType() returns the value MethodType.CONCRETE.

Returns:
true when the method is concrete
See Also:
getType()

isStatic

boolean isStatic()
Returns true if method is static, otherwise false.

Returns:
true when the method is static

isFinal

boolean isFinal()
Returns true if method is final, otheriwse false.

Returns:
true when the method is final

getType

MethodType getType()
Returns the method type.

Returns:
the method type

getThrownTypes

java.util.List<ClassTypeInfo> getThrownTypes()
Returns:


Copyright © 2011 eXo Platform SAS. All Rights Reserved.