public class ModelProperty extends ModelEntity<Element> implements ModelElement, ModelWithAnnotation
| Type | Property and Description |
|---|---|
boolean |
is
Gets the value of the property property.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ModelProperty.TypeAdapter |
| Modifier and Type | Field and Description |
|---|---|
protected List<ModelAnnotation> |
annotations |
protected boolean |
fieldWithGetter |
protected boolean |
fieldWithIs |
protected boolean |
fieldWithSetter |
protected WeakReference<ModelEntity> |
parent |
protected ModelType |
propertyType |
protected boolean |
publicField |
ModelProperty.TypeAdapter |
typeAdapter |
element, name| Constructor and Description |
|---|
ModelProperty(ModelEntity<?> entity,
Element element,
List<ModelAnnotation> modelAnnotations) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ModelElementVisitor visitor) |
void |
addAnnotation(ModelAnnotation annotation) |
protected String |
detectRealtType(Element element,
String adapterClazz) |
boolean |
equals(Object obj) |
ModelAnnotation |
getAnnotation(Class<? extends Annotation> value) |
ModelEntity |
getParent() |
ModelType |
getPropertyType() |
boolean |
hasAnnotation(Class<? extends Annotation> annotationClazz) |
int |
hashCode() |
boolean |
hasTypeAdapter() |
boolean |
isFieldWithGetter() |
boolean |
isFieldWithIs() |
boolean |
isFieldWithSetter() |
boolean |
isProperty()
Gets the value of the property property.
|
boolean |
isPublicField() |
boolean |
isType(Type... types) |
boolean |
isType(com.squareup.javapoet.TypeName value) |
void |
setFieldWithGetter(boolean fieldWithGetter) |
void |
setFieldWithIs(boolean fieldWithIs) |
void |
setFieldWithSetter(boolean fieldWithSetter) |
getElement, getNameclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetElementprotected WeakReference<ModelEntity> parent
protected List<ModelAnnotation> annotations
protected ModelType propertyType
public ModelProperty.TypeAdapter typeAdapter
protected boolean publicField
protected boolean fieldWithGetter
protected boolean fieldWithSetter
protected boolean fieldWithIs
public ModelProperty(ModelEntity<?> entity, Element element, List<ModelAnnotation> modelAnnotations)
public ModelEntity getParent()
public int hashCode()
hashCode in class ModelEntity<Element>public boolean equals(Object obj)
equals in class ModelEntity<Element>public void addAnnotation(ModelAnnotation annotation)
addAnnotation in interface ModelWithAnnotationpublic ModelAnnotation getAnnotation(Class<? extends Annotation> value)
getAnnotation in interface ModelWithAnnotationpublic boolean hasAnnotation(Class<? extends Annotation> annotationClazz)
hasAnnotation in interface ModelWithAnnotationpublic ModelType getPropertyType()
public boolean isFieldWithGetter()
public void setFieldWithGetter(boolean fieldWithGetter)
fieldWithGetter - the fieldWithGetter to setpublic boolean isFieldWithSetter()
public void setFieldWithSetter(boolean fieldWithSetter)
fieldWithSetter - the fieldWithSetter to setpublic boolean isFieldWithIs()
public void setFieldWithIs(boolean fieldWithIs)
fieldWithIs - the fieldWithIs to setpublic boolean isProperty()
public boolean isPublicField()
public void accept(ModelElementVisitor visitor) throws Exception
accept in interface ModelElementExceptionpublic boolean isType(com.squareup.javapoet.TypeName value)
public boolean isType(Type... types)
public boolean hasTypeAdapter()
Copyright © 2017. All rights reserved.