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 MappingElement
Abstract mapping definition (null
if none).private MappingElementBase
Concrete mapping definition (null
if none).private QName
Concrete mapping element name (null
if none).private String
Concrete mapping type extended by this one.private boolean
Flag for class extended by other mapped class(es).private boolean
Flag for mapping(s) has been generated.private Map
Map from access method name to property customization information for properties covered by this mapping (including inherited ones).private final String
Fully-qualified class name of mapped class.private final QName
Abstract mapping type name (null
if none).private boolean
Generate abstract mapping flag.private boolean
Generate concrete mapping flag. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BindingMappingDetail
(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.boolean
Check for target class extended by other mapped class(es).boolean
Check if this <mapping> has been generated.boolean
Check if an abstract <mapping> used for this class.boolean
Check if a concrete <mapping> used for this class.void
Set the abstract <mapping> for the target class.void
setAccessMethodMap
(Map map) Set map from access method name to property customization information for properties covered by this <mapping>.void
Set the concrete <mapping> for the target class.void
setElementQName
(QName qname) Set the element name used for a concrete mapping.void
setExtended
(boolean ext) Set target class extended by other mapped class(es).void
setGenerated
(boolean gen) Set flag for <mapping> generated.void
setUseAbstract
(boolean abs) Set flag for abstract <mapping> used for this class.void
setUseConcrete
(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 (null
if none). -
m_elementQName
Concrete mapping element name (null
if 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 (null
if none). -
m_concreteMapping
Concrete mapping definition (null
if none).
-
-
Constructor Details
-
BindingMappingDetail
Constructor.- Parameters:
type
- fully-qualified mapped class nameaname
- abstract mapping type namecname
- concrete mapping element namestype
- superclass for extension (null
if 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
, null
if none
-
setAbstractMapping
Set the abstract <mapping> for the target class.- Parameters:
abs
- abstract, null
if none
-
getConcreteMapping
Get the concrete <mapping> for the target class.- Returns:
- concrete
, null
if none
-
setConcreteMapping
Set the concrete <mapping> for the target class.- Parameters:
con
- concrete, null
if none
-
isExtended
public boolean isExtended()Check for target class extended by other mapped class(es).- Returns:
true
if extended,false
if not
-
setExtended
public void setExtended(boolean ext) Set target class extended by other mapped class(es). Setting thistrue
forces a concrete <mapping> to be used.- Parameters:
ext
-
-
isGenerated
public boolean isGenerated()Check if this <mapping> has been generated.- Returns:
true
if generated,false
if 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:
true
if abstract mapping used,false
if not
-
setUseAbstract
public void setUseAbstract(boolean abs) Set flag for abstract <mapping> used for this class.- Parameters:
abs
-true
if abstract mapping used,false
if not
-
isUseConcrete
public boolean isUseConcrete()Check if a concrete <mapping> used for this class.- Returns:
true
if concrete mapping used,false
if not
-
setUseConcrete
public void setUseConcrete(boolean con) Set flag for concrete <mapping> used for this class.- Parameters:
con
-true
if concrete mapping used,false
if not
-
getElementQName
Get the element name used for a concrete mapping. Note that this method will always return a non-null
result if a concrete mapping is being used, but may also return a non-null
result even if there is no concrete mapping - so check first using theisUseConcrete()
method.- Returns:
- element name, or
null
if not defined
-
setElementQName
Set the element name used for a concrete mapping.- Parameters:
qname
- element name, ornull
if not defined
-
getExtendsType
Get the fully-qualified class name of the type extended by this <mapping>.- Returns:
- class name, or
null
if none
-
getTypeQName
Get the type name used for an abstract mapping. Note that this method will always return a non-null
result if an abstract mapping is being used, but may also return a non-null
result even if there is no abstract mapping - so check first using theisUseConcrete()
method.- Returns:
- type name, or
null
if 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-
null
after <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)
-