public class PropertyGenModel extends Object
TypeElement
.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getCapitalizedName() |
String |
getJavadocLinkTag()
Returns the javadoc link tag that links back this properties getter method.
|
String |
getJavaIdentifier() |
String |
getJsonName()
Returns the name of this poroperty as specified with
JsonProperty |
String |
getMethodName()
Returns the getter method name for this property.
|
String |
getName() |
static String |
getPropertyName(ExecutableElement propertyMethod)
Returns the property name of the given property method.
|
com.squareup.javapoet.TypeName |
getType() |
com.squareup.javapoet.TypeName |
getTypeArgument(int index) |
int |
hashCode() |
boolean |
hasSameType(Class<?> clazz)
Returns true if the qualified name of this type is equal to the canonical name of the given class.
|
boolean |
isDeprecated() |
boolean |
isOptional() |
static PropertyGenModel |
of(ExecutableElement getterMethod)
Creates an instance from the given getter method.
|
static PropertyGenModel |
of(String name,
String jsonName,
TypeMirror type,
String javaDocLinkTag,
boolean optional,
boolean useReference) |
com.squareup.javapoet.TypeName |
replaceParameterizedType(Class<?> replacementType)
Replaces the parameterized type of this type with the given replacement type.
|
String |
toString() |
public String getName()
public String getCapitalizedName()
public String getJsonName()
JsonProperty
JsonProperty
isn't presentpublic String getJavaIdentifier()
public com.squareup.javapoet.TypeName getType()
public String getMethodName()
public String getJavadocLinkTag()
public boolean isOptional()
public boolean isDeprecated()
public boolean hasSameType(Class<?> clazz)
clazz
- the classpublic com.squareup.javapoet.TypeName getTypeArgument(int index)
public com.squareup.javapoet.TypeName replaceParameterizedType(Class<?> replacementType)
This is useful to replace a reference type Reference<Example>
with a
referenceable type .
replacementType
- the replacement typepublic static PropertyGenModel of(ExecutableElement getterMethod)
getterMethod
- the getter methodpublic static PropertyGenModel of(String name, String jsonName, TypeMirror type, String javaDocLinkTag, boolean optional, boolean useReference)
public static String getPropertyName(ExecutableElement propertyMethod)
propertyMethod
- the getter method