|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.richfaces.cdk.apt.ReflectionUtils
public class ReflectionUtils
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.richfaces.cdk.apt.SourceUtils |
|---|
SourceUtils.BeanProperty, SourceUtils.SuperTypeVisitor |
| Constructor Summary | |
|---|---|
ReflectionUtils()
|
|
| Method Summary | ||
|---|---|---|
javax.lang.model.element.TypeElement |
asTypeElement(ClassName type)
|
|
javax.lang.model.element.TypeElement |
asTypeElement(javax.lang.model.type.TypeMirror mirror)
Converts TypeMirror into corresponding TypeElement |
|
java.util.Set<SourceUtils.BeanProperty> |
getAbstractBeanProperties(javax.lang.model.element.TypeElement type)
|
|
javax.lang.model.element.AnnotationMirror |
getAnnotationMirror(javax.lang.model.element.Element element,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Get model representation of the annotation for given model element |
|
|
getAnnotationValue(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName,
java.lang.Class<T> expectedType)
|
|
|
getAnnotationValues(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName,
java.lang.Class<T> expectedType)
|
|
java.util.Set<SourceUtils.BeanProperty> |
getBeanPropertiesAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
javax.lang.model.element.TypeElement type)
Get all fields and bean properties that are annotated with given annotation. |
|
java.lang.Object |
getConstant(javax.lang.model.element.TypeElement element,
java.lang.String name)
|
|
java.lang.String |
getDocComment(javax.lang.model.element.Element element)
Get JavaDoc comments associated with given element. |
|
boolean |
isAnnotationPresent(javax.lang.model.element.Element element,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Check model element for presense of annotation. |
|
boolean |
isAnnotationPropertyPresent(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName)
|
|
boolean |
isDefaultValue(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName)
Check annotation proprrty for default value. |
|
void |
setModelProperty(java.lang.Object model,
javax.lang.model.element.AnnotationMirror annotation,
java.lang.String modelProperty)
|
|
void |
setModelProperty(java.lang.Object model,
javax.lang.model.element.AnnotationMirror annotation,
java.lang.String modelProperty,
java.lang.String annotationAttribute)
|
|
void |
visitSupertypes(javax.lang.model.element.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 ReflectionUtils()
| Method Detail |
|---|
public javax.lang.model.element.TypeElement asTypeElement(javax.lang.model.type.TypeMirror mirror)
SourceUtilsConverts TypeMirror into corresponding TypeElement
asTypeElement in interface SourceUtilspublic javax.lang.model.element.TypeElement asTypeElement(ClassName type)
SourceUtils
asTypeElement in interface SourceUtilspublic java.util.Set<SourceUtils.BeanProperty> getAbstractBeanProperties(javax.lang.model.element.TypeElement type)
SourceUtils
getAbstractBeanProperties in interface SourceUtils
public java.util.Set<SourceUtils.BeanProperty> getBeanPropertiesAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotation,
javax.lang.model.element.TypeElement type)
SourceUtilsGet all fields and bean properties that are annotated with given annotation.
getBeanPropertiesAnnotatedWith in interface SourceUtils
public java.lang.Object getConstant(javax.lang.model.element.TypeElement element,
java.lang.String name)
SourceUtils
getConstant in interface SourceUtilspublic java.lang.String getDocComment(javax.lang.model.element.Element element)
SourceUtilsGet JavaDoc comments associated with given element.
getDocComment in interface SourceUtils
public void visitSupertypes(javax.lang.model.element.TypeElement type,
SourceUtils.SuperTypeVisitor visitor)
SourceUtils
visitSupertypes in interface SourceUtils
public javax.lang.model.element.AnnotationMirror getAnnotationMirror(javax.lang.model.element.Element element,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
SourceUtilsGet model representation of the annotation for given model element
getAnnotationMirror in interface SourceUtils
public boolean isAnnotationPresent(javax.lang.model.element.Element element,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
SourceUtilsCheck model element for presense of annotation.
isAnnotationPresent in interface SourceUtils
public <T> T getAnnotationValue(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName,
java.lang.Class<T> expectedType)
SourceUtils
getAnnotationValue in interface SourceUtils
public <T> java.util.List<T> getAnnotationValues(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName,
java.lang.Class<T> expectedType)
SourceUtils
getAnnotationValues in interface SourceUtils
public boolean isDefaultValue(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName)
SourceUtilsCheck annotation proprrty for default value.
isDefaultValue in interface SourceUtils
public boolean isAnnotationPropertyPresent(javax.lang.model.element.AnnotationMirror annotation,
java.lang.String propertyName)
isAnnotationPropertyPresent in interface SourceUtils
public void setModelProperty(java.lang.Object model,
javax.lang.model.element.AnnotationMirror annotation,
java.lang.String modelProperty,
java.lang.String annotationAttribute)
setModelProperty in interface SourceUtils
public void setModelProperty(java.lang.Object model,
javax.lang.model.element.AnnotationMirror annotation,
java.lang.String modelProperty)
setModelProperty in interface SourceUtils
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||