APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.xml.internal

public Class JdkXmlFeatures

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
javax.xml.XMLConstants, jdk.xml.internal.JdkProperty.ImplPropMap, .JdkProperty.State

This class manages JDK's XML Features. Previously added features and properties may be gradually moved to this class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
public static final String
private boolean[]
featureValues

Values of the features

public static final String
public static final String
pack-priv boolean
secureProcessing

Flag indicating if secure processing is set

private JdkProperty.State[]
states

States of the settings for each property

public static final String

Constructor Summary

AccessConstructor and Description
public
JdkXmlFeatures(boolean secureProcessing)

Instantiate JdkXmlFeatures and initialize the fields

Method Summary

Modifier and TypeMethod and Description
public JdkXmlFeatures

Returns:

a copy of the JdkXmlFeatures
clone
()

Overrides java.lang.Object.clone.

Returns a copy of the JdkXmlFeatures.

public JdkXmlFeatures

Returns:

a copy of the JdkXmlFeatures
cloneAndUpdate
()

Returns a copy of the JdkXmlFeatures that is updated with the current System Properties.

public JdkXmlFeatures.XmlFeature

Returns:

the feature if found; null otherwise
findByName
(String
property name
propertyName
)

Finds the feature by string name.

public boolean

Returns:

the value of the property
getFeature
(JdkXmlFeatures.XmlFeature
the property
feature
)

Return the value of the specified property

public boolean

Returns:

value of a feature
getFeature
(int
the index of a feature
index
)

Return the value of a feature by its index (the Feature's ordinal)

public int

Returns:

the index of the property if found; return -1 if not
getIndex
(String
property name
propertyName
)

Get the index by property name

private boolean

Returns:

true if the system property is found, false otherwise
getSystemProperty
(JdkXmlFeatures.XmlFeature
the XmlFeature
feature
,
String
the corresponding system property
sysPropertyName
)

Read the system property, or the setting in the Jaxp Configuration File corresponding to the XmlFeature.

private void
readSystemProperties()

Read from system properties, or those in jaxp.properties

public boolean

Returns:

true if the property is managed by the JdkXmlFeatures instance; false otherwise.
setFeature
(String
property name
propertyName
,
JdkProperty.State
the state of the property
state
,
Object
the value of the property
value
)

Set feature by property name and state

public void
setFeature(JdkXmlFeatures.XmlFeature
the feature
feature
,
JdkProperty.State
the state of the property
state
,
boolean
the value of the property
value
)

Set the value for a specific feature.

public void
setFeature(int
the index of the property
index
,
JdkProperty.State
the state of the property
state
,
Object
the value of the property
value
)

Set the value of a property by its index

public void
setFeature(int
the index of the property
index
,
JdkProperty.State
the state of the property
state
,
boolean
the value of the property
value
)

Set the value of a property by its index

public void
update()

Updates the JdkXmlFeatures instance by reading the system properties again.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CATALOG_FEATURESback to summary
public static final String CATALOG_FEATURES
featureValuesback to summary
private boolean[] featureValues

Values of the features

ORACLE_JAXP_PROPERTY_PREFIXback to summary
public static final String ORACLE_JAXP_PROPERTY_PREFIX
PROPERTY_USE_CATALOGback to summary
public static final String PROPERTY_USE_CATALOG
secureProcessingback to summary
pack-priv boolean secureProcessing

Flag indicating if secure processing is set

statesback to summary
private JdkProperty.State[] states

States of the settings for each property

XML_FEATURE_MANAGERback to summary
public static final String XML_FEATURE_MANAGER

Constructor Detail

JdkXmlFeaturesback to summary
public JdkXmlFeatures(boolean secureProcessing)

Instantiate JdkXmlFeatures and initialize the fields

Method Detail

cloneback to summary
public JdkXmlFeatures clone()

Overrides java.lang.Object.clone.

Returns a copy of the JdkXmlFeatures.

Returns:JdkXmlFeatures

a copy of the JdkXmlFeatures

cloneAndUpdateback to summary
public JdkXmlFeatures cloneAndUpdate()

Returns a copy of the JdkXmlFeatures that is updated with the current System Properties.

Returns:JdkXmlFeatures

a copy of the JdkXmlFeatures

findByNameback to summary
public JdkXmlFeatures.XmlFeature findByName(String propertyName)

Finds the feature by string name.

Parameters
propertyName:String

property name

Returns:JdkXmlFeatures.XmlFeature

the feature if found; null otherwise

getFeatureback to summary
public boolean getFeature(JdkXmlFeatures.XmlFeature feature)

Return the value of the specified property

Parameters
feature:JdkXmlFeatures.XmlFeature

the property

Returns:boolean

the value of the property

getFeatureback to summary
public boolean getFeature(int index)

Return the value of a feature by its index (the Feature's ordinal)

Parameters
index:int

the index of a feature

Returns:boolean

value of a feature

getIndexback to summary
public int getIndex(String propertyName)

Get the index by property name

Parameters
propertyName:String

property name

Returns:int

the index of the property if found; return -1 if not

getSystemPropertyback to summary
private boolean getSystemProperty(JdkXmlFeatures.XmlFeature feature, String sysPropertyName)

Read the system property, or the setting in the Jaxp Configuration File corresponding to the XmlFeature.

Parameters
feature:JdkXmlFeatures.XmlFeature

the XmlFeature

sysPropertyName:String

the corresponding system property

Returns:boolean

true if the system property is found, false otherwise

readSystemPropertiesback to summary
private void readSystemProperties()

Read from system properties, or those in jaxp.properties

setFeatureback to summary
public boolean setFeature(String propertyName, JdkProperty.State state, Object value)

Set feature by property name and state

Parameters
propertyName:String

property name

state:JdkProperty.State

the state of the property

value:Object

the value of the property

Returns:boolean

true if the property is managed by the JdkXmlFeatures instance; false otherwise.

setFeatureback to summary
public void setFeature(JdkXmlFeatures.XmlFeature feature, JdkProperty.State state, boolean value)

Set the value for a specific feature.

Parameters
feature:JdkXmlFeatures.XmlFeature

the feature

state:JdkProperty.State

the state of the property

value:boolean

the value of the property

setFeatureback to summary
public void setFeature(int index, JdkProperty.State state, Object value)

Set the value of a property by its index

Parameters
index:int

the index of the property

state:JdkProperty.State

the state of the property

value:Object

the value of the property

setFeatureback to summary
public void setFeature(int index, JdkProperty.State state, boolean value)

Set the value of a property by its index

Parameters
index:int

the index of the property

state:JdkProperty.State

the state of the property

value:boolean

the value of the property

updateback to summary
public void update()

Updates the JdkXmlFeatures instance by reading the system properties again. This will become necessary in case the system properties are set after the instance has been created.

jdk.xml.internal back to summary

public final Enum JdkXmlFeatures.XmlFeature

extends Enum<JdkXmlFeatures.XmlFeature>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final boolean
public static final JdkXmlFeatures.XmlFeature
ENABLE_EXTENSION_FUNCTION

Feature enableExtensionFunctions FSP: extension function is enforced by FSP.

private final boolean
private final boolean
private final JdkProperty.ImplPropMap
public static final JdkXmlFeatures.XmlFeature
JDK_OVERRIDE_PARSER

Feature overrideDefaultParser FSP: not enforced by FSP.

private final String
private final String
private final String
private final String
public static final JdkXmlFeatures.XmlFeature
RESET_SYMBOL_TABLE_FEATURE

Feature resetSymbolTable FSP: RESET_SYMBOL_TABLE_FEATURE is not enforced by FSP.

public static final JdkXmlFeatures.XmlFeature
private final boolean
private final boolean

Constructor Summary

AccessConstructor and Description
private
XmlFeature(JdkProperty.ImplPropMap
the Implementation specific properties map. When the map is specified, there is no need to repeat or enter other name parameters.
implMap
,
String
the name of the feature
name
,
String
the name of the System Property
nameSP
,
boolean differ, String
the name of the corresponding legacy property
nameOld
,
String
the system property of the legacy property
nameOldSP
,
boolean
the value of the feature
value
,
boolean valueEnforced, boolean
a flag to indicate whether the feature is supported
hasSystem
,
boolean
a flag indicating whether the feature is FSP (Feature_Secure_Processing) enforced with a System property
enforced
)

Constructs an XmlFeature instance.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the name of the property
apiProperty
()

Returns the name of the property.

public boolean

Returns:

the default value of the property
defaultValue
()

Returns the default value of the property.

pack-priv boolean

Returns:

true it is, false otherwise
enforced
()

Checks whether the property is enforced by FSP

public boolean

Returns:

the FSP-enforced value
enforcedValue
()

Returns the FSP-enforced value.

pack-priv boolean

Returns:

true if the specified property is the current property, false otherwise
equalsPropertyName
(String
the name of a property
propertyName
)

Checks whether the specified property is equal to the current property.

public JdkProperty.State

Returns:

the state of the property name, null if no match
getState
(String
the property name
name
)

Returns the state of a property name.

pack-priv boolean

Returns:

true it is supported, false otherwise
hasSystemProperty
()

Checks whether System property is supported for the feature.

pack-priv String

Returns:

the name of the System Property
systemProperty
()

Returns the name of the corresponding System Property.

pack-priv String

Returns:

the name of the legacy System Property
systemPropertyOld
()

Returns the name of the legacy System Property.

public static JdkXmlFeatures.XmlFeature
public static JdkXmlFeatures.XmlFeature[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

differback to summary
private final boolean differ
ENABLE_EXTENSION_FUNCTIONback to summary
public static final JdkXmlFeatures.XmlFeature ENABLE_EXTENSION_FUNCTION

Feature enableExtensionFunctions FSP: extension function is enforced by FSP. When FSP is on, extension function is disabled.

enforcedback to summary
private final boolean enforced
hasSystemback to summary
private final boolean hasSystem
implMapback to summary
private final JdkProperty.ImplPropMap implMap
JDK_OVERRIDE_PARSERback to summary
public static final JdkXmlFeatures.XmlFeature JDK_OVERRIDE_PARSER

Feature overrideDefaultParser FSP: not enforced by FSP.

nameback to summary
private final String name

Hides java.lang.Enum.name.

nameOldback to summary
private final String nameOld
nameOldSPback to summary
private final String nameOldSP
nameSPback to summary
private final String nameSP
RESET_SYMBOL_TABLE_FEATUREback to summary
public static final JdkXmlFeatures.XmlFeature RESET_SYMBOL_TABLE_FEATURE

Feature resetSymbolTable FSP: RESET_SYMBOL_TABLE_FEATURE is not enforced by FSP.

USE_CATALOGback to summary
public static final JdkXmlFeatures.XmlFeature USE_CATALOG

The javax.xml.XMLConstants.USE_CATALOG feature. FSP: USE_CATALOG is not enforced by FSP.

valueDefaultback to summary
private final boolean valueDefault
valueEnforcedback to summary
private final boolean valueEnforced

Constructor Detail

XmlFeatureback to summary
private XmlFeature(JdkProperty.ImplPropMap implMap, String name, String nameSP, boolean differ, String nameOld, String nameOldSP, boolean value, boolean valueEnforced, boolean hasSystem, boolean enforced)

Constructs an XmlFeature instance.

Parameters
implMap:JdkProperty.ImplPropMap

the Implementation specific properties map. When the map is specified, there is no need to repeat or enter other name parameters.

name:String

the name of the feature

nameSP:String

the name of the System Property

nameOld:String

the name of the corresponding legacy property

nameOldSP:String

the system property of the legacy property

value:boolean

the value of the feature

hasSystem:boolean

a flag to indicate whether the feature is supported

enforced:boolean

a flag indicating whether the feature is FSP (Feature_Secure_Processing) enforced with a System property

Method Detail

apiPropertyback to summary
public String apiProperty()

Returns the name of the property.

Returns:String

the name of the property

defaultValueback to summary
public boolean defaultValue()

Returns the default value of the property.

Returns:boolean

the default value of the property

enforcedback to summary
pack-priv boolean enforced()

Checks whether the property is enforced by FSP

Returns:boolean

true it is, false otherwise

enforcedValueback to summary
public boolean enforcedValue()

Returns the FSP-enforced value.

Returns:boolean

the FSP-enforced value

equalsPropertyNameback to summary
pack-priv boolean equalsPropertyName(String propertyName)

Checks whether the specified property is equal to the current property.

Parameters
propertyName:String

the name of a property

Returns:boolean

true if the specified property is the current property, false otherwise

getStateback to summary
public JdkProperty.State getState(String name)

Returns the state of a property name. By the specification as of JDK 17, the "jdk.xml." prefixed System property name is also the current API name. Both the URI-based qName and old name if any are legacy.

Parameters
name:String

the property name

Returns:JdkProperty.State

the state of the property name, null if no match

hasSystemPropertyback to summary
pack-priv boolean hasSystemProperty()

Checks whether System property is supported for the feature.

Returns:boolean

true it is supported, false otherwise

systemPropertyback to summary
pack-priv String systemProperty()

Returns the name of the corresponding System Property.

Returns:String

the name of the System Property

systemPropertyOldback to summary
pack-priv String systemPropertyOld()

Returns the name of the legacy System Property.

Returns:String

the name of the legacy System Property

valueOfback to summary
public static JdkXmlFeatures.XmlFeature valueOf(String name)
valuesback to summary
public static JdkXmlFeatures.XmlFeature[] values()