Package org.jibx.custom.classes
Class PackageCustom
java.lang.Object
org.jibx.custom.classes.CustomBase
org.jibx.custom.classes.SharedNestingBase
org.jibx.custom.classes.NestingBase
org.jibx.custom.classes.PackageCustom
- All Implemented Interfaces:
IApply
Package customization information.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringElement name in XML customization file.private Mapprivate booleanprivate Stringprivate Stringstatic final StringArrayEnumeration of allowed attribute namesFields inherited from class org.jibx.custom.classes.NestingBase
ATTRIBUTE_STYLE_INTEGER, ATTRIBUTE_VALUE_STYLE, ELEMENT_STYLE_INTEGER, ELEMENT_VALUE_STYLE, s_valueStyleEnumFields inherited from class org.jibx.custom.classes.CustomBase
CAMEL_CASE_NAMES, DERIVE_BY_PACKAGE, DERIVE_FIXED, DERIVE_NONE, DOTTED_NAMES, HYPHENATED_NAMES, REQUIRE_ALL, REQUIRE_NONE, REQUIRE_OBJECTS, REQUIRE_PRIMITIVES, s_namespaceStyleEnum, s_nameStyleEnum, s_requireEnum, UNDERSCORED_NAMES, UPPER_CAMEL_CASE_NAMES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ClassCustomaddClassCustomization(String name) Add information for class in this package.voidapply(IClassLocator loc) Apply customizations to default values.voidFix the namespace for this package.getClassCustomization(String name) Get existing information for class in this package.getName()Get fully-qualified package name.private voidpreSet(IUnmarshallingContext uctx) Make sure all attributes are defined.Methods inherited from class org.jibx.custom.classes.NestingBase
getStripPrefixes, getStripSuffixes, getValueStyle, isForceMapping, isForceStructureNames, isMapAbstract, isPropertyAccess, isWrapCollections, setMapAbstract, setValueStyleMethods inherited from class org.jibx.custom.classes.SharedNestingBase
convertName, getFormatterClass, getNamespace, getNamespaceStyle, getNameStyle, getSpecifiedNamespace, isObjectRequired, isPrimitiveRequired, isUseJavaDocs, setNamespace, setNamespaceStyle, setNameStyleMethods inherited from class org.jibx.custom.classes.CustomBase
convertName, deriveItemName, deriveNamespace, getContainingObject, getGlobal, getParent, packageOfType, packageToNamespace, validateAttributes
-
Field Details
-
s_allowedAttributes
Enumeration of allowed attribute names -
ELEMENT_NAME
Element name in XML customization file.- See Also:
-
m_simpleName
-
m_fullName
-
m_fixedNamespace
private boolean m_fixedNamespace -
m_classMap
-
-
Constructor Details
-
PackageCustom
PackageCustom(String simple, String full, NestingBase parent) Constructor. This has package access so that it can be used from theGlobalCustomclass.- Parameters:
simple- simple package namefull- fully-qualified package nameparent-
-
-
Method Details
-
preSet
Make sure all attributes are defined.- Parameters:
uctx- unmarshalling context
-
getName
Get fully-qualified package name.- Returns:
- package name (empty string if default package)
-
getClassCustomization
Get existing information for class in this package.- Parameters:
name- simple class name (without package)- Returns:
- class information (
nullif no existing information)
-
addClassCustomization
Add information for class in this package. This just creates the basic class information structure and returns it, without populating the class details.- Parameters:
name- simple class name (without package)- Returns:
- class information (
nullif no existing information)
-
fixNamespace
public void fixNamespace()Fix the namespace for this package. If there's a parent package and that package namespace has not yet been fixed, this first fixes the parent package namespace by means of a recursive call. -
apply
Apply customizations to default values. This fills in the information for classes in this package by deriving information for fields or properties in each class. This is intended to be used once, after customizations have been unmarshalled.
-