public class GlobalExtension extends ComponentExtension
Modifier and Type | Field and Description |
---|---|
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 org.apache.log4j.Logger |
s_logger
Logger for class.
|
ARITY_OPTIONAL_COLLECTION, ARITY_OPTIONAL_SINGLETON, ARITY_REQUIRED_COLLECTION, ARITY_REQUIRED_SINGLETON
Constructor and Description |
---|
GlobalExtension(SchemaExtension schemext,
OpenAttrBase comp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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).
|
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
getComponent, getReplacementType, setTypeReplacer
static final org.apache.log4j.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
public GlobalExtension(SchemaExtension schemext, OpenAttrBase comp)
schemext
- extension for containing schemacomp
- actual componentpublic 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()