org.codehaus.aspectwerkz.joinpoint.impl
Class ConstructorRttiImpl

java.lang.Object
  extended byorg.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.
 ConstructorTuple getConstructorTuple()
          Returns the constructor tuple.
 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).
 Object getNewInstance()
          Returns the new instance created by the constructor.
 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 setNewInstance(Object newInstance)
          Sets the new instance created by the constructor.
 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

getConstructorTuple

public ConstructorTuple getConstructorTuple()
Returns the constructor tuple.

Returns:
the constructor tuple

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

getNewInstance

public Object getNewInstance()
Returns the new instance created by the constructor.

Specified by:
getNewInstance in interface ConstructorRtti
Returns:
the new instance

setNewInstance

public void setNewInstance(Object newInstance)
Sets the new instance created by the constructor.

Parameters:
newInstance -

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.

Returns:
a string representation


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