Package org.jibx.binding.generator
Class BindingMappingDetail
java.lang.Object
org.jibx.binding.generator.BindingMappingDetail
Holder for the details of how a class is going to be mapped. This information is needed in order to determine how to
reference the mapped class when it's used within another mapping definition.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MappingElementAbstract mapping definition (nullif none).private MappingElementBaseConcrete mapping definition (nullif none).private QNameConcrete mapping element name (nullif none).private StringConcrete mapping type extended by this one.private booleanFlag for class extended by other mapped class(es).private booleanFlag for mapping(s) has been generated.private MapMap from access method name to property customization information for properties covered by this mapping (including inherited ones).private final StringFully-qualified class name of mapped class.private final QNameAbstract mapping type name (nullif none).private booleanGenerate abstract mapping flag.private booleanGenerate concrete mapping flag. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBindingMappingDetail(String type, QName aname, QName cname, String stype) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the abstract <mapping> for the target class.Get map from access method name to property customization information for properties covered by this <mapping>.Get the concrete <mapping> for the target class.Get the element name used for a concrete mapping.Get the fully-qualified class name of the type extended by this <mapping>.getType()Get fully-qualified name of mapped class.Get the type name used for an abstract mapping.booleanCheck for target class extended by other mapped class(es).booleanCheck if this <mapping> has been generated.booleanCheck if an abstract <mapping> used for this class.booleanCheck if a concrete <mapping> used for this class.voidSet the abstract <mapping> for the target class.voidsetAccessMethodMap(Map map) Set map from access method name to property customization information for properties covered by this <mapping>.voidSet the concrete <mapping> for the target class.voidsetElementQName(QName qname) Set the element name used for a concrete mapping.voidsetExtended(boolean ext) Set target class extended by other mapped class(es).voidsetGenerated(boolean gen) Set flag for <mapping> generated.voidsetUseAbstract(boolean abs) Set flag for abstract <mapping> used for this class.voidsetUseConcrete(boolean con) Set flag for concrete <mapping> used for this class.
-
Field Details
-
m_type
Fully-qualified class name of mapped class. -
m_useAbstract
private boolean m_useAbstractGenerate abstract mapping flag. -
m_useConcrete
private boolean m_useConcreteGenerate concrete mapping flag. -
m_isExtended
private boolean m_isExtendedFlag for class extended by other mapped class(es). -
m_typeQName
Abstract mapping type name (nullif none). -
m_elementQName
Concrete mapping element name (nullif none). -
m_extendsType
Concrete mapping type extended by this one. -
m_propertyMethodMap
Map from access method name to property customization information for properties covered by this mapping (including inherited ones). -
m_isGenerated
private boolean m_isGeneratedFlag for mapping(s) has been generated. -
m_abstractMapping
Abstract mapping definition (nullif none). -
m_concreteMapping
Concrete mapping definition (nullif none).
-
-
Constructor Details
-
BindingMappingDetail
Constructor.- Parameters:
type- fully-qualified mapped class nameaname- abstract mapping type namecname- concrete mapping element namestype- superclass for extension (nullif not an extension mapping)
-
-
Method Details
-
getType
Get fully-qualified name of mapped class.- Returns:
- class name
-
getAbstractMapping
Get the abstract <mapping> for the target class.- Returns:
- abstract
, nullif none
-
setAbstractMapping
Set the abstract <mapping> for the target class.- Parameters:
abs- abstract, nullif none
-
getConcreteMapping
Get the concrete <mapping> for the target class.- Returns:
- concrete
, nullif none
-
setConcreteMapping
Set the concrete <mapping> for the target class.- Parameters:
con- concrete, nullif none
-
isExtended
public boolean isExtended()Check for target class extended by other mapped class(es).- Returns:
trueif extended,falseif not
-
setExtended
public void setExtended(boolean ext) Set target class extended by other mapped class(es). Setting thistrueforces a concrete <mapping> to be used.- Parameters:
ext-
-
isGenerated
public boolean isGenerated()Check if this <mapping> has been generated.- Returns:
trueif generated,falseif not
-
setGenerated
public void setGenerated(boolean gen) Set flag for <mapping> generated.- Parameters:
gen-
-
isUseAbstract
public boolean isUseAbstract()Check if an abstract <mapping> used for this class.- Returns:
trueif abstract mapping used,falseif not
-
setUseAbstract
public void setUseAbstract(boolean abs) Set flag for abstract <mapping> used for this class.- Parameters:
abs-trueif abstract mapping used,falseif not
-
isUseConcrete
public boolean isUseConcrete()Check if a concrete <mapping> used for this class.- Returns:
trueif concrete mapping used,falseif not
-
setUseConcrete
public void setUseConcrete(boolean con) Set flag for concrete <mapping> used for this class.- Parameters:
con-trueif concrete mapping used,falseif not
-
getElementQName
Get the element name used for a concrete mapping. Note that this method will always return a non-nullresult if a concrete mapping is being used, but may also return a non-nullresult even if there is no concrete mapping - so check first using theisUseConcrete()method.- Returns:
- element name, or
nullif not defined
-
setElementQName
Set the element name used for a concrete mapping.- Parameters:
qname- element name, ornullif not defined
-
getExtendsType
Get the fully-qualified class name of the type extended by this <mapping>.- Returns:
- class name, or
nullif none
-
getTypeQName
Get the type name used for an abstract mapping. Note that this method will always return a non-nullresult if an abstract mapping is being used, but may also return a non-nullresult even if there is no abstract mapping - so check first using theisUseConcrete()method.- Returns:
- type name, or
nullif not defined
-
getAccessMethodMap
Get map from access method name to property customization information for properties covered by this <mapping>. This map includes both properties defined directly, and those inherited from any base mapping.- Returns:
- map (non-
nullafter <mapping> constructed)
-
setAccessMethodMap
Set map from access method name to property customization information for properties covered by this <mapping>. This must be done at the time the <mapping> is constructed.- Parameters:
map- (non-null, use empty map if not applicable)
-