org.codehaus.aspectwerkz.joinpoint.impl
Class MethodSignatureImpl

java.lang.Object
  extended byorg.codehaus.aspectwerkz.joinpoint.impl.MethodSignatureImpl
All Implemented Interfaces:
CodeSignature, MemberSignature, MethodSignature, Serializable, Signature

public class MethodSignatureImpl
extends Object
implements MethodSignature

Implementation for the method signature.

Author:
Jonas Bonér
See Also:
Serialized Form

Constructor Summary
MethodSignatureImpl(Class declaringType, MethodTuple methodTuple)
           
 
Method Summary
 Annotation getAnnotation(String annotationName)
          Return the annotation with a specific name.
 List getAnnotationInfos()
          Return all the annotations

Each annotation is wrapped in AnnotationInfoinstance.

 List getAnnotations(String annotationName)
          Return a list with the annotations with a specific name.
 Class getDeclaringType()
          Returns the declaring class.
 Class[] getExceptionTypes()
          Returns the exception types declared by the code block.
 Method getMethod()
          Returns the method.
 MethodTuple getMethodTuple()
          Returns the method tuple.
 int getModifiers()
          Returns the modifiers for the signature.
 String getName()
          Returns the name (f.e. name of method of field).
 Class[] getParameterTypes()
          Returns the parameter types.
 Class getReturnType()
          Returns the return type.
 String toString()
          Returns a string representation of the signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodSignatureImpl

public MethodSignatureImpl(Class declaringType,
                           MethodTuple methodTuple)
Parameters:
declaringType -
methodTuple -
Method Detail

getMethodTuple

public MethodTuple getMethodTuple()
Returns the method tuple.

Returns:
the method tuple

getMethod

public Method getMethod()
Returns the method.

Specified by:
getMethod in interface MethodSignature
Returns:
the method

getDeclaringType

public Class getDeclaringType()
Returns the declaring class.

Specified by:
getDeclaringType in interface Signature
Returns:
the declaring class

getModifiers

public int getModifiers()
Returns the modifiers for the signature.

Could be used like this:

 boolean isPublic = java.lang.reflect.Modifier.isPublic(signature.getModifiers());
 

Specified by:
getModifiers in interface Signature
Returns:
the mofifiers

getName

public String getName()
Returns the name (f.e. name of method of field).

Specified by:
getName in interface Signature
Returns:

getExceptionTypes

public Class[] getExceptionTypes()
Returns the exception types declared by the code block.

Specified by:
getExceptionTypes in interface CodeSignature
Returns:
the exception types

getParameterTypes

public Class[] getParameterTypes()
Returns the parameter types.

Specified by:
getParameterTypes in interface CodeSignature
Returns:
the parameter types

getReturnType

public Class getReturnType()
Returns the return type.

Specified by:
getReturnType in interface MethodSignature
Returns:
the return type

getAnnotation

public Annotation getAnnotation(String annotationName)
Return the annotation with a specific name.

Specified by:
getAnnotation in interface MemberSignature
Parameters:
annotationName - the annotation name
Returns:
the annotation or null

getAnnotations

public List getAnnotations(String annotationName)
Return a list with the annotations with a specific name.

Specified by:
getAnnotations in interface MemberSignature
Parameters:
annotationName - the annotation name
Returns:
the annotations in a list (can be empty)

getAnnotationInfos

public List getAnnotationInfos()
Return all the annotations

Each annotation is wrapped in AnnotationInfoinstance.

Specified by:
getAnnotationInfos in interface MemberSignature
Returns:
a list with the annotations

toString

public String toString()
Returns a string representation of the signature.

Returns:
a string representation


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.