org.codehaus.aspectwerkz.joinpoint.impl
Class FieldRttiImpl

java.lang.Object
  extended byorg.codehaus.aspectwerkz.joinpoint.impl.FieldRttiImpl
All Implemented Interfaces:
FieldRtti, MemberRtti, Rtti

public class FieldRttiImpl
extends Object
implements FieldRtti

Implementation for the field signature.

Author:
Jonas Bonér

Constructor Summary
FieldRttiImpl(FieldSignatureImpl signature, Object thisInstance, Object targetInstance)
          Creates a new field RTTI.
 
Method Summary
 Rtti cloneFor(Object thisInstance, Object targetInstance)
          Clones the RTTI instance.
 Class getDeclaringType()
          Returns the declaring class.
 Field getField()
          Returns the field.
 Class getFieldType()
          Returns the field type.
 Object getFieldValue()
          Returns the value of the field.
 int getModifiers()
          Returns the modifiers for the signature.
 String getName()
          Returns the name (f.e. name of method of field).
 Object[] getParameterValues()
          TODO: Needed for stupid JIT compiler.
 Object getTarget()
          Returns the target instance.
 Object getThis()
          Returns the instance currently executing.
 void setFieldValue(Object fieldValue)
          Sets the value of the field.
 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

FieldRttiImpl

public FieldRttiImpl(FieldSignatureImpl signature,
                     Object thisInstance,
                     Object targetInstance)
Creates a new field 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

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:
the name

getField

public Field getField()
Returns the field.

Specified by:
getField in interface FieldRtti
Returns:
the field

getFieldType

public Class getFieldType()
Returns the field type.

Specified by:
getFieldType in interface FieldRtti
Returns:
the field type

getFieldValue

public Object getFieldValue()
Returns the value of the field.

Specified by:
getFieldValue in interface FieldRtti
Returns:
the value of the field

setFieldValue

public void setFieldValue(Object fieldValue)
Sets the value of the field.

Specified by:
setFieldValue in interface FieldRtti
Parameters:
fieldValue - the value of the field

toString

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

Returns:
a string representation

getParameterValues

public Object[] getParameterValues()
TODO: Needed for stupid JIT compiler. Remove for 2.0.

Returns:


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