当前位置: 首页>>代码示例>>Java>>正文


Java ErrorMsg.JAXP_INVALID_ATTR_ERR属性代码示例

本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg.JAXP_INVALID_ATTR_ERR属性的典型用法代码示例。如果您正苦于以下问题:Java ErrorMsg.JAXP_INVALID_ATTR_ERR属性的具体用法?Java ErrorMsg.JAXP_INVALID_ATTR_ERR怎么用?Java ErrorMsg.JAXP_INVALID_ATTR_ERR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg的用法示例。


在下文中一共展示了ErrorMsg.JAXP_INVALID_ATTR_ERR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAttribute

/**
 * javax.xml.transform.sax.TransformerFactory implementation.
 * Returns the value set for a TransformerFactory attribute
 *
 * @param name The attribute name
 * @return An object representing the attribute value
 * @throws IllegalArgumentException
 */
@Override
public Object getAttribute(String name)
    throws IllegalArgumentException
{
    // Return value for attribute 'translet-name'
    if (name.equals(TRANSLET_NAME)) {
        return _transletName;
    }
    else if (name.equals(GENERATE_TRANSLET)) {
        return new Boolean(_generateTranslet);
    }
    else if (name.equals(AUTO_TRANSLET)) {
        return new Boolean(_autoTranslet);
    }
    else if (name.equals(ENABLE_INLINING)) {
        if (_enableInlining)
          return Boolean.TRUE;
        else
          return Boolean.FALSE;
    } else if (name.equals(XalanConstants.SECURITY_MANAGER)) {
        return _xmlSecurityManager;
    } else if (name.equals(XalanConstants.JDK_EXTENSION_CLASSLOADER)) {
       return _extensionClassLoader;
    }

    /** Check to see if the property is managed by the security manager **/
    String propertyValue = (_xmlSecurityManager != null) ?
            _xmlSecurityManager.getLimitAsString(name) : null;
    if (propertyValue != null) {
        return propertyValue;
    } else {
        propertyValue = (_xmlSecurityPropertyMgr != null) ?
            _xmlSecurityPropertyMgr.getValue(name) : null;
        if (propertyValue != null) {
            return propertyValue;
        }
    }

    // Throw an exception for all other attributes
    ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
    throw new IllegalArgumentException(err.toString());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:50,代码来源:TransformerFactoryImpl.java

示例2: getAttribute

/**
 * javax.xml.transform.sax.TransformerFactory implementation.
 * Returns the value set for a TransformerFactory attribute
 *
 * @param name The attribute name
 * @return An object representing the attribute value
 * @throws IllegalArgumentException
 */
@Override
public Object getAttribute(String name)
    throws IllegalArgumentException
{
    // Return value for attribute 'translet-name'
    if (name.equals(TRANSLET_NAME)) {
        return _transletName;
    }
    else if (name.equals(GENERATE_TRANSLET)) {
        return _generateTranslet;
    }
    else if (name.equals(AUTO_TRANSLET)) {
        return _autoTranslet;
    }
    else if (name.equals(ENABLE_INLINING)) {
        if (_enableInlining)
          return Boolean.TRUE;
        else
          return Boolean.FALSE;
    } else if (name.equals(XalanConstants.SECURITY_MANAGER)) {
        return _xmlSecurityManager;
    } else if (name.equals(XalanConstants.JDK_EXTENSION_CLASSLOADER)) {
       return _extensionClassLoader;
    } else if (JdkXmlUtils.CATALOG_FILES.equals(name)) {
        return _catalogFiles;
    } else if (JdkXmlUtils.CATALOG_DEFER.equals(name)) {
        return _catalogDefer;
    } else if (JdkXmlUtils.CATALOG_PREFER.equals(name)) {
        return _catalogPrefer;
    } else if (JdkXmlUtils.CATALOG_RESOLVE.equals(name)) {
        return _catalogResolve;
    } else if (JdkXmlFeatures.CATALOG_FEATURES.equals(name)) {
        return buildCatalogFeatures();
    } else if (JdkXmlUtils.CDATA_CHUNK_SIZE.equals(name)) {
        return _cdataChunkSize;
    }

    /** Check to see if the property is managed by the security manager **/
    String propertyValue = (_xmlSecurityManager != null) ?
            _xmlSecurityManager.getLimitAsString(name) : null;
    if (propertyValue != null) {
        return propertyValue;
    } else {
        propertyValue = (_xmlSecurityPropertyMgr != null) ?
            _xmlSecurityPropertyMgr.getValue(name) : null;
        if (propertyValue != null) {
            return propertyValue;
        }
    }

    // Throw an exception for all other attributes
    ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
    throw new IllegalArgumentException(err.toString());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:62,代码来源:TransformerFactoryImpl.java


注:本文中的com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg.JAXP_INVALID_ATTR_ERR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。