@Immutable public enum PropertyType extends Enum<PropertyType>
Modifier and Type | Class and Description |
---|---|
protected static class |
PropertyType.ClassBasedTypeChecker |
protected static class |
PropertyType.DateCanonicalizer |
protected static class |
PropertyType.DoubleCanonicalizer |
protected static class |
PropertyType.LongCanonicalizer |
protected static class |
PropertyType.ObjectCanonicalizer |
Enum Constant and Description |
---|
BINARY |
BOOLEAN |
DATE |
DECIMAL |
DOUBLE |
LONG |
NAME |
OBJECT |
PATH |
REFERENCE |
SIMPLEREFERENCE |
STRING |
URI |
WEAKREFERENCE |
Modifier and Type | Method and Description |
---|---|
static PropertyType |
discoverType(Class<?> clazz)
Discover the most appropriate
PropertyType whose values can be assigned to variables or parameters of the supplied
type. |
static PropertyType |
discoverType(Object value) |
Object |
getCanonicalValue(Object value)
Obtain a value of this type in its canonical form.
|
Comparator<?> |
getComparator() |
String |
getName() |
Class<?> |
getValueClass() |
boolean |
isTypeFor(Class<?> clazz) |
boolean |
isTypeFor(Object value) |
boolean |
isTypeForEach(Iterable<?> values) |
boolean |
isTypeForEach(Iterator<?> values) |
static Iterator<PropertyType> |
iterator()
Return an iterator over all the property type enumeration literals.
|
int |
jcrType()
Returns the JCR numeric constant which represents the current type.
|
static PropertyType |
valueFor(int jcrPropertyType) |
static PropertyType |
valueFor(String typeNameInAnyCase) |
static PropertyType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PropertyType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PropertyType STRING
public static final PropertyType BINARY
public static final PropertyType LONG
public static final PropertyType DOUBLE
public static final PropertyType DECIMAL
public static final PropertyType DATE
public static final PropertyType BOOLEAN
public static final PropertyType NAME
public static final PropertyType PATH
public static final PropertyType REFERENCE
public static final PropertyType WEAKREFERENCE
public static final PropertyType SIMPLEREFERENCE
public static final PropertyType URI
public static final PropertyType OBJECT
public static PropertyType[] values()
for (PropertyType c : PropertyType.values()) System.out.println(c);
public static PropertyType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Class<?> getValueClass()
public String getName()
public Comparator<?> getComparator()
public Object getCanonicalValue(Object value)
Note that this method does not cast from one property type to another.
value
- the property valuepublic final boolean isTypeFor(Object value)
public final boolean isTypeFor(Class<?> clazz)
public final boolean isTypeForEach(Iterable<?> values)
public final boolean isTypeForEach(Iterator<?> values)
public final int jcrType()
int
valuePropertyType
public static PropertyType discoverType(Object value)
public static PropertyType discoverType(Class<?> clazz)
PropertyType
whose values can be assigned to variables or parameters of the supplied
type. This method does check whether the supplied Class
is an array, in which case it just evalutes the
component type
of the array.clazz
- the class representing the type of a value or parameter; may not be nullpublic static Iterator<PropertyType> iterator()
public static PropertyType valueFor(String typeNameInAnyCase)
public static PropertyType valueFor(int jcrPropertyType)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.