Java Code Examples for com.sun.org.apache.xerces.internal.impl.Constants#REUSE_INSTANCE

The following examples show how to use com.sun.org.apache.xerces.internal.impl.Constants#REUSE_INSTANCE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XMLOutputFactoryImpl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
public void setProperty(String name, Object value)
        throws IllegalArgumentException {
    if (name == null || value == null || !fPropertyManager.containsProperty(name)) {
        throw new IllegalArgumentException("Property " + name + "is not supported");
    }
    if (name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)) {
        fReuseInstance = (Boolean)value;
        if (DEBUG) {
            System.out.println("fReuseInstance is set to " + fReuseInstance);
        }

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    } else {//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name, value);
}
 
Example 2
Source File: XMLOutputFactoryImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 3
Source File: XMLOutputFactoryImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 4
Source File: XMLOutputFactoryImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 5
Source File: XMLOutputFactoryImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 6
Source File: XMLOutputFactoryImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 7
Source File: XMLOutputFactoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 8
Source File: XMLOutputFactoryImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 9
Source File: XMLOutputFactoryImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+"is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);

        // TODO: XMLStreamWriters are not Thread safe,
        // don't let application think it is optimizing
        if (fReuseInstance) {
            throw new IllegalArgumentException(
                    "Property "
                    + name
                    + " is not supported: XMLStreamWriters are not Thread safe");
        }
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 10
Source File: XMLInputFactoryImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 11
Source File: XMLInputFactoryImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 12
Source File: XMLInputFactoryImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 13
Source File: XMLInputFactoryImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 14
Source File: XMLInputFactoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 15
Source File: XMLInputFactoryImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 16
Source File: XMLInputFactoryImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 17
Source File: XMLInputFactoryImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}
 
Example 18
Source File: XMLInputFactoryImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
 * is not required to support every setting of every property in the specification and may use IllegalArgumentException
 * to signal that an unsupported property may not be set with the specified value.
 * @param name The name of the property (may not be null)
 * @param value The value of the property
 * @throws java.lang.IllegalArgumentException if the property is not supported
 */
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {

    if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
        throw new IllegalArgumentException("Property "+name+" is not supported");
    }
    if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
        fReuseInstance = ((Boolean)value).booleanValue();
        if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
    }else{//for any other property set the flag
        //REVISIT: Even in this case instance can be reused, by passing PropertyManager
        fPropertyChanged = true;
    }
    fPropertyManager.setProperty(name,value);
}