|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.schema.codegen.custom.BaseExtension
org.jibx.schema.codegen.custom.ComponentExtension
org.jibx.schema.codegen.custom.GlobalExtension
public class GlobalExtension
Extension information for a schema global definition component. This adds reference tracking to the basic extension information, along with a map for child components of the definition.
Field Summary | |
---|---|
private DefinitionItem |
m_definition
Definition item for this global definition. |
private java.util.ArrayList |
m_dependencies
List of global definitions used by this definition (one entry per reference, may contain duplicates). |
private boolean |
m_included
Component to be specifically included in code generation (requiring a separate class). |
private int |
m_referenceCount
Number of references to this definition. |
private java.util.ArrayList |
m_references
List of extensions for components referencing this definition. |
private SchemaExtension |
m_schemaExtension
Containing schema extension. |
(package private) static Logger |
s_logger
Logger for class. |
Fields inherited from class org.jibx.schema.codegen.custom.BaseExtension |
---|
ARITY_OPTIONAL_COLLECTION, ARITY_OPTIONAL_SINGLETON, ARITY_REQUIRED_COLLECTION, ARITY_REQUIRED_SINGLETON |
Constructor Summary | |
---|---|
GlobalExtension(SchemaExtension schemext,
OpenAttrBase comp)
Constructor. |
Method Summary | |
---|---|
void |
addDependency(ComponentExtension anno)
Add dependency extension. |
void |
addReference(ComponentExtension anno)
Add reference extension. |
void |
checkRemovable()
Check if the global definition can be removed from the schema. |
ClassDecorator[] |
getClassDecorators()
Get code generation decorators used for this component. |
DefinitionItem |
getDefinition()
Get definition item. |
GlobalExtension |
getDependency(int index)
Get dependency extension by index position. |
int |
getDependencyCount()
Get the number of dependencies for this component. |
NameConverter |
getNameConverter()
Get name converter used for this component. |
PackageHolder |
getPackage()
Get package for class generation. |
ComponentExtension |
getReference(int index)
Get referencing extension by index position. |
java.util.Map |
getSchemaTypes()
Get map from schema type local name to type information. |
boolean |
isIncluded()
Check if component specifically included in code generation (requiring a separate class). |
boolean |
isPreferInline()
Check if inlining of definition preferred. |
boolean |
isPushInline()
Check if inlining of definition is pushed (even when multiple values are involved). |
boolean |
isUseInnerClasses()
Check if inner classes should be used for substructures. |
void |
normalize()
Normalize the schema definition component. |
void |
resetDependencies()
Reset the dependencies and references of this component. |
void |
setDefinition(DefinitionItem item)
Set definition item. |
void |
setIncluded(boolean included)
Set flag for component specifically included in code generation (requiring a separate class). |
Methods inherited from class org.jibx.schema.codegen.custom.ComponentExtension |
---|
applyAndCountUsage, getAnyType, getBaseName, getChoiceType, getClassName, getCustom, getGlobal, getOverrideType, getUnionType, getUseCount, incrementUseCount, isChoiceExposed, isIgnored, isInlined, isOptional, isRemoved, isRepeated, isSeparateClass, isUnionExposed, normalize, setCustom, setOptional, setOverrideType, setRemoved, setRepeated |
Methods inherited from class org.jibx.schema.codegen.custom.BaseExtension |
---|
getComponent, getReplacementType, setTypeReplacer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final Logger s_logger
private final SchemaExtension m_schemaExtension
private boolean m_included
private int m_referenceCount
private java.util.ArrayList m_references
private java.util.ArrayList m_dependencies
private DefinitionItem m_definition
Constructor Detail |
---|
public GlobalExtension(SchemaExtension schemext, OpenAttrBase comp)
schemext
- extension for containing schemacomp
- actual componentMethod Detail |
---|
public java.util.Map getSchemaTypes()
public NameConverter getNameConverter()
public ClassDecorator[] getClassDecorators()
public PackageHolder getPackage()
public boolean isPushInline()
public boolean isPreferInline()
public boolean isUseInnerClasses()
public boolean isIncluded()
public void setIncluded(boolean included)
included
- public void addReference(ComponentExtension anno)
anno
- public ComponentExtension getReference(int index)
index
-
public void addDependency(ComponentExtension anno)
anno
- public int getDependencyCount()
public GlobalExtension getDependency(int index)
index
-
public void resetDependencies()
public void checkRemovable()
public DefinitionItem getDefinition()
public void setDefinition(DefinitionItem item)
item
- public void normalize()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |