public enum PropertyTypeId extends java.lang.Enum<PropertyTypeId>
type
attribute, which acts as a mnemonic for the type
of the property that should be built. The mapping between the values of this attribute
and the concrete property that is built is encoded in the constants of this enum.PropertyDescriptorExternalBuilder
Enum Constant | Description |
---|---|
BOOLEAN |
|
BOOLEAN_LIST |
|
CHARACTER |
|
CHARACTER_LIST |
|
CLASS |
|
CLASS_LIST |
|
DOUBLE |
|
DOUBLE_LIST |
|
FLOAT |
|
FLOAT_LIST |
|
INTEGER |
|
INTEGER_LIST |
|
LONG |
|
LONG_LIST |
|
REGEX |
|
STRING |
|
STRING_LIST |
Modifier and Type | Method | Description |
---|---|---|
static PropertyDescriptorExternalBuilder<?> |
factoryFor(java.lang.String stringId) |
Gets the factory for the descriptor identified by the string id.
|
PropertyDescriptorExternalBuilder<?> |
getFactory() |
Gets the factory associated to the type id, that can build the
property from strings extracted from the XML.
|
java.lang.String |
getStringId() |
Gets the value of the type attribute represented by this constant.
|
ValueParser<?> |
getValueParser() |
Gets the object used to parse the values of this property from a string.
|
boolean |
isPropertyMultivalue() |
Returns true if the property corresponding to this factory takes
lists of values as its value.
|
boolean |
isPropertyNumeric() |
Returns true if the property corresponding to this factory is numeric,
which means it can be safely cast to a
NumericPropertyDescriptor . |
boolean |
isPropertyPackaged() |
Returns true if the property corresponding to this factory is packaged,
which means it can be safely cast to a
PackagedPropertyDescriptor . |
static PropertyTypeId |
lookupMnemonic(java.lang.String stringId) |
Gets the enum constant corresponding to the given mnemonic.
|
java.lang.Class<?> |
propertyValueType() |
Returns the value type of the property corresponding to this factory.
|
static java.lang.String |
typeIdFor(java.lang.Class<?> valueType,
boolean multiValue) |
Gets the string representation of this type, as it should be given
when defining a descriptor in the xml.
|
static java.util.Map<java.lang.String,PropertyTypeId> |
typeIdsToConstants() |
Returns the full mappings from type ids to enum constants.
|
static PropertyTypeId |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static PropertyTypeId[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PropertyTypeId BOOLEAN
public static final PropertyTypeId BOOLEAN_LIST
public static final PropertyTypeId STRING
public static final PropertyTypeId STRING_LIST
public static final PropertyTypeId CHARACTER
public static final PropertyTypeId CHARACTER_LIST
public static final PropertyTypeId REGEX
public static final PropertyTypeId INTEGER
public static final PropertyTypeId INTEGER_LIST
public static final PropertyTypeId LONG
public static final PropertyTypeId LONG_LIST
public static final PropertyTypeId FLOAT
public static final PropertyTypeId FLOAT_LIST
public static final PropertyTypeId DOUBLE
public static final PropertyTypeId DOUBLE_LIST
public static final PropertyTypeId CLASS
public static final PropertyTypeId CLASS_LIST
public static PropertyTypeId[] values()
for (PropertyTypeId c : PropertyTypeId.values()) System.out.println(c);
public static PropertyTypeId valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getStringId()
public PropertyDescriptorExternalBuilder<?> getFactory()
public boolean isPropertyNumeric()
NumericPropertyDescriptor
.public boolean isPropertyPackaged()
PackagedPropertyDescriptor
.public boolean isPropertyMultivalue()
public java.lang.Class<?> propertyValueType()
public ValueParser<?> getValueParser()
ValueParserConstants.multi(ValueParser, char)
.public static java.util.Map<java.lang.String,PropertyTypeId> typeIdsToConstants()
public static PropertyDescriptorExternalBuilder<?> factoryFor(java.lang.String stringId)
stringId
- The identifier of the typepublic static PropertyTypeId lookupMnemonic(java.lang.String stringId)
stringId
- A mnemonic for the property typepublic static java.lang.String typeIdFor(java.lang.Class<?> valueType, boolean multiValue)
valueType
- The type to look formultiValue
- Whether the descriptor is multivalued or notCopyright © 2002–2018 PMD. All rights reserved.