Package org.jibx.binding.model
Class PropertyAttributes
- java.lang.Object
-
- org.jibx.binding.model.AttributeBase
-
- org.jibx.binding.model.PropertyAttributes
-
public class PropertyAttributes extends AttributeBase
Model component for property attribute group in binding definition.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]FLAG_METHOD_SIGNATURESprivate static java.lang.String[]GET_METHOD_SIGNATURESprivate java.lang.Stringm_declaredTypeProperty type name.private IClassItemm_fieldItemProperty field information.private java.lang.Stringm_fieldNameProperty field name.private IClassItemm_flagItemFlag method information.private java.lang.Stringm_flagNameFlag method name.private IClassItemm_getItemGet method information.private java.lang.Stringm_getNameGet method name.private IClassm_getTypeType for value loaded on stack.private booleanm_isImplicitFlag for no actual property definition.private IClassItemm_setItemSet method information.private java.lang.Stringm_setNameSet method name.private IClassm_setTypeType for value stored from stack.private IClassItemm_testItemTest method information.private java.lang.Stringm_testNameTest method name.private IClassm_typeProperty type information.private intm_usageUsage type code.private java.lang.Stringm_usageNameUsage name.static intOPTIONAL_IN_USAGEstatic intOPTIONAL_OUT_USAGEstatic intOPTIONAL_USAGEstatic intREQUIRED_USAGEstatic StringArrays_allowedAttributesEnumeration of allowed attribute namesprivate static EnumSets_usageEnumprivate static java.lang.String[]TEST_METHOD_SIGNATURES
-
Constructor Summary
Constructors Constructor Description PropertyAttributes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDeclaredType()Get declared type name.IClassItemgetField()Get field information.java.lang.StringgetFieldName()Get field name.IClassItemgetFlag()Get flag method information.java.lang.StringgetFlagName()Get flag method name.IClassItemgetGet()Get get method information.java.lang.StringgetGetName()Get get method name.IClassgetGetType()Get type for value loaded to stack.IClassItemgetSet()Get set method information.java.lang.StringgetSetName()Get set method name.IClassgetSetType()Get type for value stored from stack.IClassItemgetTest()Get test method information.java.lang.StringgetTestName()Get test method name.IClassgetType()Get type information.intgetUsage()Get usage value.java.lang.StringgetUsageName()Get usage name.booleanhasProperty()Check if property is defined.booleanisFlagOnly()Check if property consists only of flag.booleanisImplicit()Check if empty property definition.voidprevalidate(ValidationContext vctx)Prevalidate attribute information.voidsetDeclaredType(java.lang.String type)Set declared type name.voidsetFieldName(java.lang.String field)Set field name.voidsetFlagName(java.lang.String flag)Set flag method name.voidsetGetName(java.lang.String get)Set get method name.voidsetSetName(java.lang.String set)Set set method name.voidsetTestName(java.lang.String test)Set test method name.voidsetUsage(int use)Set usage value.voidsetUsageName(java.lang.String name)Set usage name.-
Methods inherited from class org.jibx.binding.model.AttributeBase
validate
-
-
-
-
Field Detail
-
s_allowedAttributes
public static final StringArray s_allowedAttributes
Enumeration of allowed attribute names
-
TEST_METHOD_SIGNATURES
private static final java.lang.String[] TEST_METHOD_SIGNATURES
-
FLAG_METHOD_SIGNATURES
private static final java.lang.String[] FLAG_METHOD_SIGNATURES
-
GET_METHOD_SIGNATURES
private static final java.lang.String[] GET_METHOD_SIGNATURES
-
REQUIRED_USAGE
public static final int REQUIRED_USAGE
- See Also:
- Constant Field Values
-
OPTIONAL_USAGE
public static final int OPTIONAL_USAGE
- See Also:
- Constant Field Values
-
OPTIONAL_IN_USAGE
public static final int OPTIONAL_IN_USAGE
- See Also:
- Constant Field Values
-
OPTIONAL_OUT_USAGE
public static final int OPTIONAL_OUT_USAGE
- See Also:
- Constant Field Values
-
s_usageEnum
private static final EnumSet s_usageEnum
-
m_usage
private int m_usage
Usage type code.
-
m_usageName
private java.lang.String m_usageName
Usage name.
-
m_declaredType
private java.lang.String m_declaredType
Property type name.
-
m_fieldName
private java.lang.String m_fieldName
Property field name.
-
m_testName
private java.lang.String m_testName
Test method name.
-
m_flagName
private java.lang.String m_flagName
Flag method name.
-
m_getName
private java.lang.String m_getName
Get method name.
-
m_setName
private java.lang.String m_setName
Set method name.
-
m_getType
private IClass m_getType
Type for value loaded on stack.
-
m_setType
private IClass m_setType
Type for value stored from stack.
-
m_type
private IClass m_type
Property type information.
-
m_fieldItem
private IClassItem m_fieldItem
Property field information.
-
m_testItem
private IClassItem m_testItem
Test method information.
-
m_flagItem
private IClassItem m_flagItem
Flag method information.
-
m_getItem
private IClassItem m_getItem
Get method information.
-
m_setItem
private IClassItem m_setItem
Set method information.
-
m_isImplicit
private boolean m_isImplicit
Flag for no actual property definition.
-
-
Method Detail
-
getUsageName
public java.lang.String 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
public void setUsageName(java.lang.String name)
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
public java.lang.String getDeclaredType()
Get declared type name.- Returns:
- declared type name (or
nullif none)
-
setDeclaredType
public void setDeclaredType(java.lang.String type)
Set declared type name.- Parameters:
type- declared type name (ornullif none)
-
getFieldName
public java.lang.String getFieldName()
Get field name.- Returns:
- field name (or
nullif none)
-
getField
public IClassItem getField()
Get field information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- field information (or
nullif none)
-
setFieldName
public void setFieldName(java.lang.String field)
Set field name.- Parameters:
field- field name (ornullif none)
-
getTestName
public java.lang.String getTestName()
Get test method name.- Returns:
- test method name (or
nullif none)
-
getTest
public IClassItem getTest()
Get test method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- test method information (or
nullif none)
-
setTestName
public void setTestName(java.lang.String test)
Set test method name.- Parameters:
test- test method name (ornullif none)
-
getFlagName
public java.lang.String getFlagName()
Get flag method name.- Returns:
- flag method name (or
nullif none)
-
getFlag
public IClassItem getFlag()
Get flag method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- flag method information (or
nullif none)
-
setFlagName
public void setFlagName(java.lang.String flag)
Set flag method name.- Parameters:
flag- flag method name (ornullif none)
-
getGetName
public java.lang.String getGetName()
Get get method name.- Returns:
- get method name (or
nullif none)
-
getGet
public IClassItem getGet()
Get get method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- get method information (or
nullif none)
-
getGetType
public IClass 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
public void setGetName(java.lang.String get)
Set get method name.- Parameters:
get- get method name (ornullif none)
-
getSetName
public java.lang.String getSetName()
Get set method name.- Returns:
- set method name (or
nullif none)
-
getSet
public IClassItem getSet()
Get set method information. This method is only usable after a call toprevalidate(ValidationContext).- Returns:
- set method information (or
nullif none)
-
getSetType
public IClass 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
public void setSetName(java.lang.String set)
Set set method name.- Parameters:
set- set method name (ornullif none)
-
getType
public IClass 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
public void prevalidate(ValidationContext vctx)
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
-
-