gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-22 00:13:05 25 4
gpt4 key购买 nike

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

XmlObjectBase.apply_wscanon介绍

[英]Called to canonicalize whitespace before calling set_text. Tries to avoid allocation when the string is already canonical, but otherwise this is not particularly efficient. Hopefully the common case is that we pass our wscanon rule to the store via fetch_text and it's canonicalized before we even see it as a string.
[中]调用以在调用set_text之前规范化空白。当字符串已经规范化时,尝试避免分配,但在其他情况下,这并不是特别有效。希望常见的情况是,我们通过fetch_text将wscanon规则传递给商店,并在我们将其视为字符串之前对其进行规范化。

代码示例

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

/**
 * Grabs the undelying litral representation, applying the
 * implementation's wscanon rule.
 * Null if not simple content.
 */
public final String get_wscanon_text()
{
  if ((_flags & FLAG_STORE) == 0)
  {
    return apply_wscanon((String)_textsource);
  }
  else return get_store().fetch_text(get_wscanon_rule());
}

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

/**
 * Setting a string preserves any noncanonical literal
 * representation. This is done by storing the actual
 * string in the underlying store after checking it
 * against the primitive type for validity.
 */
protected void set_String(String v)
{
  if ((_flags & FLAG_IMMUTABLE) != 0)
    throw new IllegalStateException();
  boolean wasNilled = ((_flags & FLAG_NIL) != 0);
  // update the underlying value from the string
  String wscanon = apply_wscanon(v);
  update_from_wscanon_text(wscanon);
  // Now store the literal text immediately in the underlying
  if ((_flags & FLAG_STORE) != 0)
  {
    _flags &= ~FLAG_VALUE_DATED;
    if ((_flags & FLAG_SETTINGDEFAULT) == 0)
      get_store().store_text(v);
    if (wasNilled)
      get_store().invalidate_nil();
  }
  else
    _textsource = v;
}

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

/**
 * Grabs the undelying litral representation, applying the
 * implementation's wscanon rule.
 * Null if not simple content.
 */
public final String get_wscanon_text()
{
  if ((_flags & FLAG_STORE) == 0)
  {
    return apply_wscanon((String)_textsource);
  }
  else return get_store().fetch_text(get_wscanon_rule());
}

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

/**
 * Grabs the undelying litral representation, applying the
 * implementation's wscanon rule.
 * Null if not simple content.
 */
public final String get_wscanon_text()
{
  if ((_flags & FLAG_STORE) == 0)
  {
    return apply_wscanon((String)_textsource);
  }
  else return get_store().fetch_text(get_wscanon_rule());
}

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

/**
 * Setting a string preserves any noncanonical literal
 * representation. This is done by storing the actual
 * string in the underlying store after checking it
 * against the primitive type for validity.
 */
protected void set_String(String v)
{
  if ((_flags & FLAG_IMMUTABLE) != 0)
    throw new IllegalStateException();
  boolean wasNilled = ((_flags & FLAG_NIL) != 0);
  // update the underlying value from the string
  String wscanon = apply_wscanon(v);
  update_from_wscanon_text(wscanon);
  // Now store the literal text immediately in the underlying
  if ((_flags & FLAG_STORE) != 0)
  {
    _flags &= ~FLAG_VALUE_DATED;
    if ((_flags & FLAG_SETTINGDEFAULT) == 0)
      get_store().store_text(v);
    if (wasNilled)
      get_store().invalidate_nil();
  }
  else
    _textsource = v;
}

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

/**
 * Setting a string preserves any noncanonical literal
 * representation. This is done by storing the actual
 * string in the underlying store after checking it
 * against the primitive type for validity.
 */
protected void set_String(String v)
{
  if ((_flags & FLAG_IMMUTABLE) != 0)
    throw new IllegalStateException();
  boolean wasNilled = ((_flags & FLAG_NIL) != 0);
  // update the underlying value from the string
  String wscanon = apply_wscanon(v);
  update_from_wscanon_text(wscanon);
  // Now store the literal text immediately in the underlying
  if ((_flags & FLAG_STORE) != 0)
  {
    _flags &= ~FLAG_VALUE_DATED;
    if ((_flags & FLAG_SETTINGDEFAULT) == 0)
      get_store().store_text(v);
    if (wasNilled)
      get_store().invalidate_nil();
  }
  else
    _textsource = v;
}

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