org.codehaus.aspectwerkz.joinpoint.impl
Class ConstructorRttiImpl

java.lang.Object
  extended by org.codehaus.aspectwerkz.joinpoint.impl.ConstructorRttiImpl
All Implemented Interfaces:
CodeRtti, ConstructorRtti, MemberRtti, Rtti

public class ConstructorRttiImpl
extends Object
implements ConstructorRtti

Implementation for the constructor RTTI.

Author:
Jonas BonŽr

Constructor Summary
ConstructorRttiImpl(ConstructorSignatureImpl signature, Object thisInstance, Object targetInstance)
          Creates a new constructor RTTI.
 
Method Summary
 Rtti cloneFor(Object thisInstance, Object targetInstance)
          Clones the RTTI instance.
 Constructor getConstructor()
          Returns the constructor.
 Class getDeclaringType()
          Returns the declaring class.
 Class[] getExceptionTypes()
          Returns the exception types declared by the code block.
 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.
 Object[] getParameterValues()
          Returns the values of the parameters.
 Object getTarget()
          Returns the target instance.
 Object getThis()
          Returns the instance currently executing.
 void setParameterValues(Object[] parameterValues)
          Sets the values of the parameters.
 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

ConstructorRttiImpl

public ConstructorRttiImpl(ConstructorSignatureImpl signature,
                           Object thisInstance,
                           Object targetInstance)
Creates a new constructor RTTI.

Parameters:
signature -
thisInstance -
targetInstance -
Method Detail

cloneFor

public Rtti cloneFor(Object thisInstance,
                     Object targetInstance)
Clones the RTTI instance.

Specified by:
cloneFor in interface Rtti
Parameters:
thisInstance -
targetInstance -
Returns:

getTarget

public Object getTarget()
Returns the target instance.

Specified by:
getTarget in interface Rtti
Returns:
the target instance

getThis

public Object getThis()
Returns the instance currently executing.

Specified by:
getThis in interface Rtti
Returns:
the instance currently executing

getConstructor

public Constructor getConstructor()
Returns the constructor.

Specified by:
getConstructor in interface ConstructorRtti
Returns:
the constructor

getDeclaringType

public Class getDeclaringType()
Returns the declaring class.

Specified by:
getDeclaringType in interface Rtti
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 Rtti
Returns:
the mofifiers

getName

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

Specified by:
getName in interface Rtti
Returns:

getExceptionTypes

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

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

getParameterTypes

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

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

setParameterValues

public void setParameterValues(Object[] parameterValues)
Sets the values of the parameters.

Specified by:
setParameterValues in interface CodeRtti
Parameters:
parameterValues -

getParameterValues

public Object[] getParameterValues()
Returns the values of the parameters.

Specified by:
getParameterValues in interface CodeRtti
Returns:
the values of the parameters

toString

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

Overrides:
toString in class Object
Returns:
a string representation


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