org.reflext.api
Interface MethodInfo

All Superinterfaces:
Annotated, GenericDeclarationInfo

public interface MethodInfo
extends GenericDeclarationInfo, Annotated

Version:
$Revision$
Author:
Julien Viet

Method Summary
 AccessScope getAccess()
          Returns the access scope of this method.
 java.lang.String getName()
          Returns the method name.
 ClassTypeInfo getOwner()
          Returns the class type owning this method.
 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.
 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
 

Method Detail

unwrap

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

Returns:
the wrapped method

getName

java.lang.String getName()
Returns the method name.

Returns:
the method name

getOwner

ClassTypeInfo getOwner()
Returns the class type owning this method.

Returns:
the class type

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

getAccess

AccessScope getAccess()
Returns the access scope of this method.

Returns:
the access scope

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

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()

getType

MethodType getType()
Returns the method type.

Returns:
the method type


Copyright © 2010 eXo Platform SAS. All Rights Reserved.