|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TransformField
A field defined by (or created within) a ClassTransformation,
allowing the details of the field to be
accessed or modified.
| Method Summary | ||
|---|---|---|
void |
claim(Object tag)
Claims the field so as to ensure that only a single annotation is applied to any single field. |
|
FieldAccess |
getAccess()
Returns an object that can be used to access the value of the field for read and update. |
|
int |
getModifiers()
Returns the modifiers for the field. |
|
String |
getName()
Returns the name of the field. |
|
String |
getSignature()
Returns the field's fully qualified generic type, or null if not defined. |
|
String |
getType()
Returns the field's type, either a primitive name (such as "int" or "boolean") or a fully qualified class name, or an array type name (in Java source syntax, i.e., "java.lang.String[]"). |
|
void |
inject(Object value)
Converts this field into a read only field whose value is the provided value. |
|
|
injectIndirect(ComponentValueProvider<T> provider)
Like inject(Object), except that the value to be injected is obtained
from a ComponentValueProvider. |
|
void |
replaceAccess(ComponentValueProvider<FieldValueConduit> conduitProvider)
Replaces read and write field access with a conduit. |
|
void |
replaceAccess(FieldValueConduit conduit)
Replaces read and write field access with a conduit. |
|
void |
replaceAccess(TransformField conduitField)
Replaces read and write field access with a conduit. |
|
| Methods inherited from interface org.apache.tapestry5.ioc.AnnotationProvider |
|---|
getAnnotation |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
String getName()
String getType()
String getSignature()
void claim(Object tag)
tag - a non-null object that represents why the field is being tagged (this is typically
a specific annotation on the field)
IllegalStateException - if the field is already claimed for some other tagvoid replaceAccess(ComponentValueProvider<FieldValueConduit> conduitProvider)
conduitProvider - provides the actual conduit at class instantiation timevoid replaceAccess(TransformField conduitField)
conduitField - identifies the field containing (via injection) an instance of FieldValueConduitvoid replaceAccess(FieldValueConduit conduit)
conduit - used to replace read and write access to the fieldint getModifiers()
Field.getModifiers()void inject(Object value)
value - the value provided by the field<T> void injectIndirect(ComponentValueProvider<T> provider)
inject(Object), except that the value to be injected is obtained
from a ComponentValueProvider. It is assumed that the provider will return an object
assignable to the field.
T - type of fieldprovider - provides the value to be assigned to the fieldFieldAccess getAccess()
FieldValueConduit that has been applied to the field.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||