gpt4 book ai didi

org.apache.xmlbeans.impl.values.XmlObjectBase.setImmutable()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 01:35:05 31 4
gpt4 key购买 nike

本文整理了Java中org.apache.xmlbeans.impl.values.XmlObjectBase.setImmutable()方法的一些代码示例,展示了XmlObjectBase.setImmutable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlObjectBase.setImmutable()方法的具体详情如下:
包路径:org.apache.xmlbeans.impl.values.XmlObjectBase
类名称:XmlObjectBase
方法名:setImmutable

XmlObjectBase.setImmutable介绍

[英]Used to make a free-standing xml simple value instance immutable. This is a one-way street, and it is illegal to attempt to make a value that is embedded in an xml document immutable. Once a value is marked as immutable, it is illegal to call setters of any kind.
[中]用于使独立的xml简单值实例不可变。这是一条单行道,试图使嵌入在xml文档中的值不可变是非法的。一旦一个值被标记为不可变,调用任何类型的setter都是非法的。

代码示例

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

public XmlAnySimpleType newValue(Object obj, boolean validateOnSet)
{
  if (!isSimpleType() && getContentType() != SchemaType.SIMPLE_CONTENT)
    throw new XmlValueOutOfRangeException(); // values must be simple
  XmlObjectBase result = (XmlObjectBase)createUnattachedNode(null);
  if (validateOnSet)
    result.setValidateOnSet();
  // In the case of tree copy, need to call a specla setter to avoid
  // set(XmlObject)
  if (obj instanceof XmlObject)
    result.set_newValue((XmlObject)obj);
  else
    result.objectSet(obj);
  result.check_dated();
  result.setImmutable();
  return (XmlAnySimpleType) result;
}

代码示例来源:origin: com.github.pjfanning/xmlbeans

public XmlAnySimpleType newValue(Object obj, boolean validateOnSet)
{
  if (!isSimpleType() && getContentType() != SchemaType.SIMPLE_CONTENT)
    throw new XmlValueOutOfRangeException(); // values must be simple
  XmlObjectBase result = (XmlObjectBase)createUnattachedNode(null);
  if (validateOnSet)
    result.setValidateOnSet();
  // In the case of tree copy, need to call a specla setter to avoid
  // set(XmlObject)
  if (obj instanceof XmlObject)
    result.set_newValue((XmlObject)obj);
  else
    result.objectSet(obj);
  result.check_dated();
  result.setImmutable();
  return (XmlAnySimpleType) result;
}

代码示例来源:origin: org.apache.xmlbeans/com.springsource.org.apache.xmlbeans

public XmlAnySimpleType newValue(Object obj, boolean validateOnSet)
{
  if (!isSimpleType() && getContentType() != SchemaType.SIMPLE_CONTENT)
    throw new XmlValueOutOfRangeException(); // values must be simple
  XmlObjectBase result = (XmlObjectBase)createUnattachedNode(null);
  if (validateOnSet)
    result.setValidateOnSet();
  // In the case of tree copy, need to call a specla setter to avoid
  // set(XmlObject)
  if (obj instanceof XmlObject)
    result.set_newValue((XmlObject)obj);
  else
    result.objectSet(obj);
  result.check_dated();
  result.setImmutable();
  return (XmlAnySimpleType) result;
}

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com