org.jibx.binding.model
Class PropertyAttributes

java.lang.Object
  extended by org.jibx.binding.model.AttributeBase
      extended by 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
static int OPTIONAL_IN_USAGE
           
static int OPTIONAL_OUT_USAGE
           
static int OPTIONAL_USAGE
           
static int REQUIRED_USAGE
           
static StringArray s_allowedAttributes
          Enumeration of allowed attribute names
 
Constructor Summary
PropertyAttributes()
           
 
Method Summary
 String getDeclaredType()
          Get declared type name.
 IClassItem getField()
          Get field information.
 String getFieldName()
          Get field name.
 IClassItem getFlag()
          Get flag method information.
 String getFlagName()
          Get flag method name.
 IClassItem getGet()
          Get get method information.
 String getGetName()
          Get get method name.
 IClass getGetType()
          Get type for value loaded to stack.
 IClassItem getSet()
          Get set method information.
 String getSetName()
          Get set method name.
 IClass getSetType()
          Get type for value stored from stack.
 IClassItem getTest()
          Get test method information.
 String getTestName()
          Get test method name.
 IClass getType()
          Get type information.
 int getUsage()
          Get usage value.
 String getUsageName()
          Get usage name.
 boolean hasProperty()
          Check if property is defined.
 boolean isFlagOnly()
          Check if property consists only of flag.
 boolean isImplicit()
          Check if empty property definition.
 void prevalidate(ValidationContext vctx)
          Prevalidate attribute information.
 void setDeclaredType(String type)
          Set declared type name.
 void setFieldName(String field)
          Set field name.
 void setFlagName(String flag)
          Set flag method name.
 void setGetName(String get)
          Set get method name.
 void setSetName(String set)
          Set set method name.
 void setTestName(String test)
          Set test method name.
 void setUsage(int use)
          Set usage value.
 void setUsageName(String name)
          Set usage name.
 
Methods inherited from class org.jibx.binding.model.AttributeBase
validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_allowedAttributes

public static final StringArray s_allowedAttributes
Enumeration of allowed attribute names


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
Constructor Detail

PropertyAttributes

public PropertyAttributes()
Method Detail

getUsageName

public String getUsageName()
Get usage name.

Returns:
usage name

getUsage

public int getUsage()
Get usage value. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
usage value

setUsageName

public void setUsageName(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 to prevalidate(ValidationContext).

Returns:
true if property defined, false if not

getDeclaredType

public String getDeclaredType()
Get declared type name.

Returns:
declared type name (or null if none)

setDeclaredType

public void setDeclaredType(String type)
Set declared type name.

Parameters:
type - declared type name (or null if none)

getFieldName

public String getFieldName()
Get field name.

Returns:
field name (or null if none)

getField

public IClassItem getField()
Get field information. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
field information (or null if none)

setFieldName

public void setFieldName(String field)
Set field name.

Parameters:
field - field name (or null if none)

getTestName

public String getTestName()
Get test method name.

Returns:
test method name (or null if none)

getTest

public IClassItem getTest()
Get test method information. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
test method information (or null if none)

setTestName

public void setTestName(String test)
Set test method name.

Parameters:
test - test method name (or null if none)

getFlagName

public String getFlagName()
Get flag method name.

Returns:
flag method name (or null if none)

getFlag

public IClassItem getFlag()
Get flag method information. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
flag method information (or null if none)

setFlagName

public void setFlagName(String flag)
Set flag method name.

Parameters:
flag - flag method name (or null if none)

getGetName

public String getGetName()
Get get method name.

Returns:
get method name (or null if none)

getGet

public IClassItem getGet()
Get get method information. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
get method information (or null if none)

getGetType

public IClass getGetType()
Get type for value loaded to stack. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
get value type (or null if none)

setGetName

public void setGetName(String get)
Set get method name.

Parameters:
get - get method name (or null if none)

getSetName

public String getSetName()
Get set method name.

Returns:
set method name (or null if none)

getSet

public IClassItem getSet()
Get set method information. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
set method information (or null if none)

getSetType

public IClass getSetType()
Get type for value stored from stack. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
set value type (or null if none)

setSetName

public void setSetName(String set)
Set set method name.

Parameters:
set - set method name (or null if none)

getType

public IClass getType()
Get type information. This method is only usable after a call to prevalidate(ValidationContext).

Returns:
type information (or null if 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:
true if implicit property, false if not

isFlagOnly

public boolean isFlagOnly()
Check if property consists only of flag. This call is only meaningful after prevalidation.

Returns:
true if flag property, false if not

prevalidate

public void prevalidate(ValidationContext vctx)
Description copied from class: AttributeBase
Prevalidate 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:
prevalidate in class AttributeBase
Parameters:
vctx - validation context


Copyright © 2005-2011 jibx.org. All Rights Reserved.