|
RichFaces CDK Generator 4.2.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.richfaces.cdk.apt.AptSourceUtils
public class AptSourceUtils
Implementation to use in annotation processor.
| Nested Class Summary | |
|---|---|
protected class |
AptSourceUtils.AptBeanProperty
|
| Nested classes/interfaces inherited from interface org.richfaces.cdk.apt.SourceUtils |
|---|
SourceUtils.ACCESS_TYPE, SourceUtils.BeanProperty, SourceUtils.SuperTypeVisitor |
| Constructor Summary | |
|---|---|
AptSourceUtils(ProcessingEnvironment processingEnv)
|
|
| Method Summary | ||
|---|---|---|
TypeElement |
asTypeElement(TypeMirror mirror)
Converts TypeMirror into corresponding TypeElement |
|
Set<SourceUtils.BeanProperty> |
getAbstractBeanProperties(TypeElement type)
|
|
AnnotationMirror |
getAnnotationMirror(Element element,
Class<? extends Annotation> annotationType)
Get model representation of the annotation for given model element |
|
|
getAnnotationValue(AnnotationMirror annotation,
String propertyName,
Class<T> expectedType)
|
|
|
getAnnotationValues(AnnotationMirror annotation,
String propertyName,
Class<T> expectedType)
|
|
Set<SourceUtils.BeanProperty> |
getBeanPropertiesAnnotatedWith(Class<? extends Annotation> annotation,
TypeElement type)
Get all fields and bean properties that are annotated with given annotation. |
|
SourceUtils.BeanProperty |
getBeanProperty(ClassName type,
String name)
Get bean property descriptor for particular type. |
|
SourceUtils.BeanProperty |
getBeanProperty(TypeElement type,
String name)
Get bean property descriptor for particular type. |
|
Object |
getConstant(TypeElement componentElement,
String name)
|
|
String |
getDocComment(Element componentElement)
Get JavaDoc comments associated with given element. |
|
boolean |
isAnnotationPresent(Element element,
Class<? extends Annotation> annotationType)
Check model element for presense of annotation. |
|
boolean |
isAnnotationPropertyPresent(AnnotationMirror annotation,
String propertyName)
|
|
boolean |
isClassExists(ClassName type)
|
|
boolean |
isDefaultValue(AnnotationMirror annotation,
String propertyName)
Check annotation proprrty for default value. |
|
void |
setModelProperty(Object model,
AnnotationMirror annotation,
String modelProperty)
Set model property to the corresponding annotation attribute, if annotation attribute set to non-default value. |
|
void |
setModelProperty(Object model,
AnnotationMirror annotation,
String modelProperty,
String annotationAttribute)
Set model property to the corresponding annotation attribute, if annotation attribute set to non-default value. |
|
void |
visitSupertypes(TypeElement type,
SourceUtils.SuperTypeVisitor visitor)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AptSourceUtils(ProcessingEnvironment processingEnv)
processingEnv - | Method Detail |
|---|
public Set<SourceUtils.BeanProperty> getBeanPropertiesAnnotatedWith(Class<? extends Annotation> annotation,
TypeElement type)
Get all fields and bean properties that are annotated with given annotation.
getBeanPropertiesAnnotatedWith in interface SourceUtilsannotation - type -
public Set<SourceUtils.BeanProperty> getAbstractBeanProperties(TypeElement type)
SourceUtils
getAbstractBeanProperties in interface SourceUtils
public SourceUtils.BeanProperty getBeanProperty(ClassName type,
String name)
SourceUtilsGet bean property descriptor for particular type.
getBeanProperty in interface SourceUtils
public SourceUtils.BeanProperty getBeanProperty(TypeElement type,
String name)
SourceUtilsGet bean property descriptor for particular type.
getBeanProperty in interface SourceUtilspublic String getDocComment(Element componentElement)
SourceUtilsGet JavaDoc comments associated with given element.
getDocComment in interface SourceUtils
public AnnotationMirror getAnnotationMirror(Element element,
Class<? extends Annotation> annotationType)
SourceUtilsGet model representation of the annotation for given model element
getAnnotationMirror in interface SourceUtils
public boolean isAnnotationPresent(Element element,
Class<? extends Annotation> annotationType)
SourceUtilsCheck model element for presense of annotation.
isAnnotationPresent in interface SourceUtils
public boolean isAnnotationPropertyPresent(AnnotationMirror annotation,
String propertyName)
SourceUtils
isAnnotationPropertyPresent in interface SourceUtils
public boolean isDefaultValue(AnnotationMirror annotation,
String propertyName)
SourceUtilsCheck annotation proprrty for default value.
isDefaultValue in interface SourceUtils
public <T> T getAnnotationValue(AnnotationMirror annotation,
String propertyName,
Class<T> expectedType)
SourceUtils
getAnnotationValue in interface SourceUtils
public <T> Iterable<T> getAnnotationValues(AnnotationMirror annotation,
String propertyName,
Class<T> expectedType)
SourceUtils
getAnnotationValues in interface SourceUtils
public void setModelProperty(Object model,
AnnotationMirror annotation,
String modelProperty)
Set model property to the corresponding annotation attribute, if annotation attribute set to non-default value.
setModelProperty in interface SourceUtilsmodel - Model object.annotation - annotation to copy property from.modelProperty - bean attribute name in the model and annotation.
public void setModelProperty(Object model,
AnnotationMirror annotation,
String modelProperty,
String annotationAttribute)
Set model property to the corresponding annotation attribute, if annotation attribute set to non-default value.
setModelProperty in interface SourceUtilsmodel - Model object.annotation - annotation to copy property from.modelProperty - bean attribute name in model.annotationAttribute - annotation attribute name.
public Object getConstant(TypeElement componentElement,
String name)
SourceUtils
getConstant in interface SourceUtils
public void visitSupertypes(TypeElement type,
SourceUtils.SuperTypeVisitor visitor)
SourceUtils
visitSupertypes in interface SourceUtilspublic boolean isClassExists(ClassName type)
SourceUtils
isClassExists in interface SourceUtilspublic TypeElement asTypeElement(TypeMirror mirror)
SourceUtilsConverts TypeMirror into corresponding TypeElement
asTypeElement in interface SourceUtils
|
RichFaces CDK Generator 4.2.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||