public abstract class AbstractProperty extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProperty(Class<?> declaringType,
String name,
Type type,
Class<?>[] params) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Class<?> |
getDeclaringType()
Return the declaring type of the property
|
String |
getDeclaringTypeCanonicalName()
Return the declaring type of the property
|
String |
getDeclaringTypeSimpleName()
Return the declaring type of the property
|
String |
getName()
Return the name of the property
|
Class<?> |
getType()
Return the type of the property
|
String |
getTypeCanonicalName()
Return the canonical name of the type
|
Class<?> |
getTypeParameter(int n)
Return the nth type parameter or throw
IllegalArgumentException if there is no nth type parameter |
List<Class<?>> |
getTypeParameters()
Return the collection of type paramaters or an empty
List if this property is not generic |
String |
getTypeSimpleName()
Return the canonical name of the type
|
boolean |
hasAnyTypeParameters(Class<?>... types) |
int |
hashCode() |
boolean |
hasName(String name)
Test the name of the property to see if it matches the supplied name
|
boolean |
hasTypeParameter(Class<?> type) |
boolean |
isArray()
Test if the property is an array
|
boolean |
isBoolean()
Test if the property is an
Boolean or boolean |
boolean |
isByte()
Test if the property is an
Byte or char |
boolean |
isCharacter()
Test if the property is an
Character or char |
boolean |
isCollection()
Test if the property implements
Collection |
boolean |
isDate()
Test if the property is an
Date or long |
boolean |
isDouble()
Test if the property is an
Double or double |
boolean |
isEnum()
Test if the property is an enum
|
boolean |
isFloat()
Test if the property is an
Float or float |
boolean |
isGeneric()
Test if the property is a generic type
|
boolean |
isInteger()
Test if the property is an
Integer or int |
boolean |
isIterable()
Test if the property implements
Iterable |
boolean |
isList()
Test if the property implements
List |
boolean |
isLong()
Test if the property is an
Long or long |
boolean |
isMap()
Test if the property implements
Map |
boolean |
isPrimitive()
Test if the property is primitive
|
boolean |
isSet()
Test if the property implements
Set |
boolean |
isShort()
Test if the property is an
Short or short |
boolean |
isString()
Test if the property is a
String |
boolean |
isType(Class<?>... types)
Test if the property type is assignable from any one of the supplied types
|
boolean |
isType(Class<?> type)
Test if the property type is assignable from the supplied type
|
String |
toString() |
public String getName()
public boolean hasName(String name)
public Class<?> getDeclaringType()
public String getDeclaringTypeCanonicalName()
public String getDeclaringTypeSimpleName()
public Class<?> getType()
public String getTypeCanonicalName()
public String getTypeSimpleName()
public Class<?> getTypeParameter(int n)
IllegalArgumentException if there is no nth type parameterpublic List<Class<?>> getTypeParameters()
List if this property is not genericpublic boolean hasAnyTypeParameters(Class<?>... types)
public boolean hasTypeParameter(Class<?> type)
public boolean isIterable()
Iterablepublic boolean isType(Class<?> type)
type - any type to check to see if this properties type is assignable to itpublic boolean isType(Class<?>... types)
types - types to check to see if this properties type is assignable to itpublic boolean isGeneric()
public boolean isPrimitive()
public boolean isArray()
public boolean isString()
Stringpublic boolean isCharacter()
Character or charpublic boolean isByte()
Byte or charpublic boolean isInteger()
Integer or intpublic boolean isDouble()
Double or doublepublic boolean isFloat()
Float or floatpublic boolean isShort()
Short or shortpublic boolean isLong()
Long or longpublic boolean isBoolean()
Boolean or booleanpublic boolean isDate()
Date or longpublic boolean isMap()
Mappublic boolean isList()
Listpublic boolean isSet()
Setpublic boolean isCollection()
Collectionpublic boolean isEnum()
Copyright © 2015. All rights reserved.