|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SourceUtils
This class provides utility methods to analayze java classes. This implementation uses APT API to get information about Java code.
| Nested Class Summary | |
|---|---|
static interface |
SourceUtils.BeanProperty
|
static interface |
SourceUtils.SuperTypeVisitor
|
| 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)
|
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. |
void |
visitSupertypes(javax.lang.model.element.TypeElement type,
SourceUtils.SuperTypeVisitor visitor)
|
| Method Detail |
|---|
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.
annotation - type -
java.util.Set<SourceUtils.BeanProperty> getAbstractBeanProperties(javax.lang.model.element.TypeElement type)
type -
java.lang.String getDocComment(javax.lang.model.element.Element element)
Get JavaDoc comments associated with given element.
componentElement -
java.lang.Object getConstant(javax.lang.model.element.TypeElement element,
java.lang.String name)
componentElement - name -
void visitSupertypes(javax.lang.model.element.TypeElement type,
SourceUtils.SuperTypeVisitor visitor)
type - visitor - javax.lang.model.element.TypeElement asTypeElement(javax.lang.model.type.TypeMirror mirror)
Converts TypeMirror into corresponding TypeElement
mirror -
javax.lang.model.element.TypeElement asTypeElement(ClassName type)
type -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||