APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xs

public final Class XSDeclarationPool

extends Object
Class Inheritance
Imports
com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl, .XSSimpleTypeDecl

This class is pool that enables caching of XML Schema declaration objects. Before a compiled grammar object is garbage collected, the implementation will add all XML Schema component declarations to the pool.

Note

The cashing mechanism is not implemented yet.

Author
Elena Litani, IBM

Field Summary

Modifier and TypeField and Description
private static final int
CHUNK_MASK

Chunk mask (CHUNK_SIZE - 1).

private static final int
CHUNK_SHIFT

Chunk shift (8).

private static final int
CHUNK_SIZE

Chunk size (1 << CHUNK_SHIFT).

private SchemaDVFactoryImpl
private XSAttributeDecl[][]
fAttrDecl

Attribute declaration pool

private int
private XSAttributeUseImpl[][]
fAttributeUse

AttributeUse declaration pool

private int
private XSComplexTypeDecl[][]
fCTDecl

ComplexType declaration pool

private int
private XSElementDecl[][]
fElementDecl

Element declaration pool

private int
private XSModelGroupImpl[][]
fModelGroup

Particle declaration pool

private int
private XSParticleDecl[][]
fParticleDecl

Particle declaration pool

private int
private XSSimpleTypeDecl[][]
fSTDecl

SimpleType declaration pool

private int
private static final int
INITIAL_CHUNK_COUNT

Initial chunk count ().

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
public final XSAttributeDecl
public final XSAttributeUseImpl
public final XSComplexTypeDecl
public final XSElementDecl
public final XSModelGroupImpl
public final XSParticleDecl
public final XSSimpleTypeDecl
public void
private static XSElementDecl[][]
resize(XSElementDecl[][] array, int newsize)

private static XSParticleDecl[][]
resize(XSParticleDecl[][] array, int newsize)

private static XSModelGroupImpl[][]
resize(XSModelGroupImpl[][] array, int newsize)

private static XSAttributeDecl[][]
resize(XSAttributeDecl[][] array, int newsize)

private static XSAttributeUseImpl[][]
resize(XSAttributeUseImpl[][] array, int newsize)

private static XSSimpleTypeDecl[][]
resize(XSSimpleTypeDecl[][] array, int newsize)

private static XSComplexTypeDecl[][]
resize(XSComplexTypeDecl[][] array, int newsize)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHUNK_MASKback to summary
private static final int CHUNK_MASK

Chunk mask (CHUNK_SIZE - 1).

CHUNK_SHIFTback to summary
private static final int CHUNK_SHIFT

Chunk shift (8).

CHUNK_SIZEback to summary
private static final int CHUNK_SIZE

Chunk size (1 << CHUNK_SHIFT).

dvFactoryback to summary
private SchemaDVFactoryImpl dvFactory
fAttrDeclback to summary
private XSAttributeDecl[][] fAttrDecl

Attribute declaration pool

fAttrDeclIndexback to summary
private int fAttrDeclIndex
fAttributeUseback to summary
private XSAttributeUseImpl[][] fAttributeUse

AttributeUse declaration pool

fAttributeUseIndexback to summary
private int fAttributeUseIndex
fCTDeclback to summary
private XSComplexTypeDecl[][] fCTDecl

ComplexType declaration pool

fCTDeclIndexback to summary
private int fCTDeclIndex
fElementDeclback to summary
private XSElementDecl[][] fElementDecl

Element declaration pool

fElementDeclIndexback to summary
private int fElementDeclIndex
fModelGroupback to summary
private XSModelGroupImpl[][] fModelGroup

Particle declaration pool

fModelGroupIndexback to summary
private int fModelGroupIndex
fParticleDeclback to summary
private XSParticleDecl[][] fParticleDecl

Particle declaration pool

fParticleDeclIndexback to summary
private int fParticleDeclIndex
fSTDeclback to summary
private XSSimpleTypeDecl[][] fSTDecl

SimpleType declaration pool

fSTDeclIndexback to summary
private int fSTDeclIndex
INITIAL_CHUNK_COUNTback to summary
private static final int INITIAL_CHUNK_COUNT

Initial chunk count ().

Constructor Detail

XSDeclarationPoolback to summary
public XSDeclarationPool()

Method Detail

ensureAttrDeclCapacityback to summary
private boolean ensureAttrDeclCapacity(int chunk)
ensureAttributeUseCapacityback to summary
private boolean ensureAttributeUseCapacity(int chunk)
ensureCTDeclCapacityback to summary
private boolean ensureCTDeclCapacity(int chunk)
ensureElementDeclCapacityback to summary
private boolean ensureElementDeclCapacity(int chunk)
ensureModelGroupCapacityback to summary
private boolean ensureModelGroupCapacity(int chunk)
ensureParticleDeclCapacityback to summary
private boolean ensureParticleDeclCapacity(int chunk)
ensureSTDeclCapacityback to summary
private boolean ensureSTDeclCapacity(int chunk)
getAttributeDeclback to summary
public final XSAttributeDecl getAttributeDecl()
getAttributeUseback to summary
public final XSAttributeUseImpl getAttributeUse()
getComplexTypeDeclback to summary
public final XSComplexTypeDecl getComplexTypeDecl()
getElementDeclback to summary
public final XSElementDecl getElementDecl()
getModelGroupback to summary
public final XSModelGroupImpl getModelGroup()
getParticleDeclback to summary
public final XSParticleDecl getParticleDecl()
getSimpleTypeDeclback to summary
public final XSSimpleTypeDecl getSimpleTypeDecl()
resetback to summary
public void reset()
resizeback to summary
private static XSElementDecl[][] resize(XSElementDecl[][] array, int newsize)
resizeback to summary
private static XSParticleDecl[][] resize(XSParticleDecl[][] array, int newsize)
resizeback to summary
private static XSModelGroupImpl[][] resize(XSModelGroupImpl[][] array, int newsize)
resizeback to summary
private static XSAttributeDecl[][] resize(XSAttributeDecl[][] array, int newsize)
resizeback to summary
private static XSAttributeUseImpl[][] resize(XSAttributeUseImpl[][] array, int newsize)
resizeback to summary
private static XSSimpleTypeDecl[][] resize(XSSimpleTypeDecl[][] array, int newsize)
resizeback to summary
private static XSComplexTypeDecl[][] resize(XSComplexTypeDecl[][] array, int newsize)
setDVFactoryback to summary
public void setDVFactory(SchemaDVFactoryImpl dvFactory)