Package org.jibx.binding.model
Class PropertyAttributes
java.lang.Object
org.jibx.binding.model.AttributeBase
org.jibx.binding.model.PropertyAttributes
Model component for property attribute group in binding definition.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]private static final String[]private StringProperty type name.private IClassItemProperty field information.private StringProperty field name.private IClassItemFlag method information.private StringFlag method name.private IClassItemGet method information.private StringGet method name.private IClassType for value loaded on stack.private booleanFlag for no actual property definition.private IClassItemSet method information.private StringSet method name.private IClassType for value stored from stack.private IClassItemTest method information.private StringTest method name.private IClassProperty type information.private intUsage type code.private StringUsage name.static final intstatic final intstatic final intstatic final intstatic final StringArrayEnumeration of allowed attribute namesprivate static final EnumSetprivate static final String[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet declared type name.getField()Get field information.Get field name.getFlag()Get flag method information.Get flag method name.getGet()Get get method information.Get get method name.Get type for value loaded to stack.getSet()Get set method information.Get set method name.Get type for value stored from stack.getTest()Get test method information.Get test method name.getType()Get type information.intgetUsage()Get usage value.Get usage name.booleanCheck if property is defined.booleanCheck if property consists only of flag.booleanCheck if empty property definition.voidprevalidate(ValidationContext vctx) Prevalidate attribute information.voidsetDeclaredType(String type) Set declared type name.voidsetFieldName(String field) Set field name.voidsetFlagName(String flag) Set flag method name.voidsetGetName(String get) Set get method name.voidsetSetName(String set) Set set method name.voidsetTestName(String test) Set test method name.voidsetUsage(int use) Set usage value.voidsetUsageName(String name) Set usage name.Methods inherited from class org.jibx.binding.model.AttributeBase
validate
-
Field Details
-
s_allowedAttributes
Enumeration of allowed attribute names -
TEST_METHOD_SIGNATURES
-
FLAG_METHOD_SIGNATURES
-
GET_METHOD_SIGNATURES
-
REQUIRED_USAGE
public static final int REQUIRED_USAGE- See Also:
-
OPTIONAL_USAGE
public static final int OPTIONAL_USAGE- See Also:
-
OPTIONAL_IN_USAGE
public static final int OPTIONAL_IN_USAGE- See Also:
-
OPTIONAL_OUT_USAGE
public static final int OPTIONAL_OUT_USAGE- See Also:
-
s_usageEnum
-
m_usage
private int m_usageUsage type code. -
m_usageName
Usage name. -
m_declaredType
Property type name. -
m_fieldName
Property field name. -
m_testName
Test method name. -
m_flagName
Flag method name. -
m_getName
Get method name. -
m_setName
Set method name. -
m_getType
Type for value loaded on stack. -
m_setType
Type for value stored from stack. -
m_type
Property type information. -
m_fieldItem
Property field information. -
m_testItem
Test method information. -
m_flagItem
Flag method information. -
m_getItem
Get method information. -
m_setItem
Set method information. -
m_isImplicit
private boolean m_isImplicitFlag for no actual property definition.
-
-
Constructor Details
-
PropertyAttributes
public PropertyAttributes()
-
-
Method Details
-
getUsageName
Get usage name.- Returns:
- usage name
-
getUsage
public int getUsage()Get usage value. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- usage value
-
setUsageName
Set usage name.- Parameters:
name- usage name
-
setUsage
public void setUsage(int use) Set usage value.- Parameters:
use- value
-
hasProperty
public boolean hasProperty()Check if property is defined. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
trueif property defined,falseif not
-
getDeclaredType
Get declared type name.- Returns:
- declared type name (or
nullif none)
-
setDeclaredType
Set declared type name.- Parameters:
type- declared type name (ornullif none)
-
getFieldName
Get field name.- Returns:
- field name (or
nullif none)
-
getField
Get field information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- field information (or
nullif none)
-
setFieldName
Set field name.- Parameters:
field- field name (ornullif none)
-
getTestName
Get test method name.- Returns:
- test method name (or
nullif none)
-
getTest
Get test method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- test method information (or
nullif none)
-
setTestName
Set test method name.- Parameters:
test- test method name (ornullif none)
-
getFlagName
Get flag method name.- Returns:
- flag method name (or
nullif none)
-
getFlag
Get flag method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- flag method information (or
nullif none)
-
setFlagName
Set flag method name.- Parameters:
flag- flag method name (ornullif none)
-
getGetName
Get get method name.- Returns:
- get method name (or
nullif none)
-
getGet
Get get method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- get method information (or
nullif none)
-
getGetType
Get type for value loaded to stack. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- get value type (or
nullif none)
-
setGetName
Set get method name.- Parameters:
get- get method name (ornullif none)
-
getSetName
Get set method name.- Returns:
- set method name (or
nullif none)
-
getSet
Get set method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- set method information (or
nullif none)
-
getSetType
Get type for value stored from stack. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- set value type (or
nullif none)
-
setSetName
Set set method name.- Parameters:
set- set method name (ornullif none)
-
getType
Get type information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- type information (or
nullif none)
-
isImplicit
public boolean isImplicit()Check if empty property definition. Empty property definitions occur because every collection, structure, and value element has associated property attributes but these may not actually reference a property (when using the containing object). This call is only meaningful after prevalidation.- Returns:
trueif implicit property,falseif not
-
isFlagOnly
public boolean isFlagOnly()Check if property consists only of flag. This call is only meaningful after prevalidation.- Returns:
trueif flag property,falseif not
-
prevalidate
Description copied from class:AttributeBasePrevalidate attribute information. The prevalidation step is used to check attribute values in isolation, such as the settings for enumerated values and class file information. This empty base class implementation should be overridden by each subclass that requires prevalidation handling.- Overrides:
prevalidatein classAttributeBase- Parameters:
vctx- validation context
-