com.bm.ejb3metadata.annotations
Class JMethod

java.lang.Object
  extended by com.bm.ejb3metadata.annotations.JMethod

public class JMethod
extends java.lang.Object

This class defines a Method object. It is not based on reflection but allows to build a JMethod based on java.lang.reflect.Method

Author:
Florent Benoit

Constructor Summary
JMethod(int access, java.lang.String name, java.lang.String descriptor, java.lang.String signature, java.lang.String[] exceptions)
          Constructor.
JMethod(java.lang.reflect.Method m)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 int getAccess()
          the access mode (see org.ejb3unit.asm.Opcodes).
 java.lang.String getDescriptor()
          method descriptor.
 java.lang.String[] getExceptions()
          method exceptions.
 java.lang.String getName()
          method name.
 java.lang.String getSignature()
          method signature.
 int hashCode()
          a hash code value for the object.
 java.lang.String toString()
          string representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMethod

public JMethod(int access,
               java.lang.String name,
               java.lang.String descriptor,
               java.lang.String signature,
               java.lang.String[] exceptions)
Constructor.

Parameters:
access - the access mode (see org.ejb3unit.asm.Opcodes)
name - the method's name.
descriptor - the method's descriptor (see Type).
signature - the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.
exceptions - the internal names of the method's exception classes (see getInternalName). May be null.

JMethod

public JMethod(java.lang.reflect.Method m)
Constructor.

Parameters:
m - Method method.
Method Detail

getAccess

public int getAccess()
the access mode (see org.ejb3unit.asm.Opcodes).

Returns:
the access mode (see org.ejb3unit.asm.Opcodes)

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - object to compare
Returns:
true if given object is equals

hashCode

public int hashCode()
a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for the object.

getDescriptor

public java.lang.String getDescriptor()
method descriptor.

Returns:
method descriptor

getExceptions

public java.lang.String[] getExceptions()
method exceptions.

Returns:
method exceptions

getName

public java.lang.String getName()
method name.

Returns:
method name

getSignature

public java.lang.String getSignature()
method signature. method signature

Returns:
method signature

toString

public java.lang.String toString()
string representation.

Overrides:
toString in class java.lang.Object
Returns:
string representation


Copyright © 2008. All Rights Reserved.