org.springframework.roo.classpath.details.annotations.populator
Class AbstractAnnotationValues
java.lang.Object
org.springframework.roo.classpath.details.annotations.populator.AbstractAnnotationValues
public abstract class AbstractAnnotationValues
- extends Object
Abstract class that provides a convenience parser and holder for annotation values. Useful if an add-on
needs to share annotation parsing outcomes between its provider and metadata instances.
- Since:
- 1.0
- Author:
- Ben Alex
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classParsed
protected boolean classParsed
- Indicates whether the class was able to be parsed at all (ie the metadata was properly formed)
annotationMetadata
protected AnnotationMetadata annotationMetadata
governorTypeDetails
protected ClassOrInterfaceTypeDetails governorTypeDetails
AbstractAnnotationValues
public AbstractAnnotationValues(PhysicalTypeMetadata governorPhysicalTypeMetadata,
org.springframework.roo.model.JavaType annotationType)
- Parses the
PhysicalTypeMetadata
for the requested annotation JavaType
. If found, makes
the annotation available via the annotationMetadata
field. Subclasses will then generally use
AutoPopulationUtils.populate(Object, AnnotationMetadata)
to complete the configuration of the
subclass (we don't invoke AutoPopulationUtils
from this constructor because the subclass is
likely to have set default values for each field, and these will be overwritten when the control flow
returns to the subclass constructor).
If the PhysicalTypeMetadata
cannot be parsed or does not internally contain a
ClassOrInterfaceTypeDetails
, no attempt will be made to populate the values.
- Parameters:
governorPhysicalTypeMetadata
- to parse (required)annotationType
- to locate and parse (required)
getGovernorTypeDetails
public ClassOrInterfaceTypeDetails getGovernorTypeDetails()
- Returns:
- the type which declared the annotation (ie the governor; never returns null)
isClassParsed
public boolean isClassParsed()
isAnnotationFound
public boolean isAnnotationFound()
Copyright © 2009-2010 VMware, Inc. All Rights Reserved.