org.objectweb.fractal.fraclet.annotation.generator.template
Class GetterSetterTemplate

java.lang.Object
  extended by org.objectweb.fractal.fraclet.annotation.generator.template.GetterSetterTemplate
All Implemented Interfaces:
spoon.template.Template

public class GetterSetterTemplate
extends Object
implements spoon.template.Template

A template to insert getter/setter to a given field

Author:
Nicolas Pessemier

Constructor Summary
GetterSetterTemplate(String fieldName, spoon.reflect.reference.CtTypeReference<?> typeRef)
          The constructor for the GetterSetterTemplate
 
Method Summary
 _T_ get__FractalField_()
          This method has been automatically injected by Spoon
 void set__FractalField_(_T_ value)
          This method has been automatically injected by Spoon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetterSetterTemplate

public GetterSetterTemplate(String fieldName,
                            spoon.reflect.reference.CtTypeReference<?> typeRef)
The constructor for the GetterSetterTemplate

Parameters:
fieldName - the name of the field to instrument
typeRef - a CtTypeReference of the type of the field (field.getType())
Method Detail

get__FractalField_

public _T_ get__FractalField_()
This method has been automatically injected by Spoon

Returns:
the reference of the field

set__FractalField_

public void set__FractalField_(_T_ value)
This method has been automatically injected by Spoon

Parameters:
value - the value to set to the field