gpt4 book ai didi

com.sun.msv.datatype.xsd.WhiteSpaceProcessor.get()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 07:17:05 27 4
gpt4 key购买 nike

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

WhiteSpaceProcessor.get介绍

[英]returns a WhiteSpaceProcessor object if "whiteSpace" facet is specified. Otherwise returns null.
[中]如果指定了“whiteSpace”方面,则返回WhiteSpaceProcessor对象。否则返回null。

代码示例

代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi

protected Object readResolve() throws InvalidObjectException {
  // return the singleton instead of deserialized object.
  try {
    // backward compatibility with JDK1.3. we can't rely on the
    // order of inner classes
    if( this.getClass()==backwardCompatibiliyHook1.getClass() )
      return thePreserve;
    if( this.getClass()==backwardCompatibiliyHook2.getClass() )
      return theCollapse;
    if( this.getClass()==backwardCompatibiliyHook3.getClass() )
      return theReplace;
    
    return get(getName());
  } catch (DatatypeException bte) {
    throw new InvalidObjectException("Unknown Processing Mode");
  }
}

代码示例来源:origin: com.sun.msv.datatype.xsd/xsdlib

WhiteSpaceFacet( String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets )
  throws DatatypeException {
  
  this(nsUri,typeName, baseType,
    WhiteSpaceProcessor.get( (String)facets.getFacet(FACET_WHITESPACE)),
    facets.isFixed(FACET_WHITESPACE) );
}

代码示例来源:origin: com.sun.xml.bind/jaxb1-impl

protected Object readResolve() throws InvalidObjectException {
  // return the singleton instead of deserialized object.
  try {
    // backward compatibility with JDK1.3. we can't rely on the
    // order of inner classes
    if( this.getClass()==backwardCompatibiliyHook1.getClass() )
      return thePreserve;
    if( this.getClass()==backwardCompatibiliyHook2.getClass() )
      return theCollapse;
    if( this.getClass()==backwardCompatibiliyHook3.getClass() )
      return theReplace;
    
    return get(getName());
  } catch (DatatypeException bte) {
    throw new InvalidObjectException("Unknown Processing Mode");
  }
}

代码示例来源:origin: com.sun.xml.bind/jaxb-extra-osgi

WhiteSpaceFacet( String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets )
  throws DatatypeException {
  
  this(nsUri,typeName, baseType,
    WhiteSpaceProcessor.get( (String)facets.getFacet(FACET_WHITESPACE)),
    facets.isFixed(FACET_WHITESPACE) );
}

代码示例来源:origin: com.sun.msv/com.springsource.com.sun.msv.datatype

protected Object readResolve() throws InvalidObjectException {
  // return the singleton instead of deserialized object.
  try {
    // backward compatibility with JDK1.3. we can't rely on the
    // order of inner classes
    if( this.getClass()==backwardCompatibiliyHook1.getClass() )
      return thePreserve;
    if( this.getClass()==backwardCompatibiliyHook2.getClass() )
      return theCollapse;
    if( this.getClass()==backwardCompatibiliyHook3.getClass() )
      return theReplace;
    
    return get(getName());
  } catch (DatatypeException bte) {
    throw new InvalidObjectException("Unknown Processing Mode");
  }
}

代码示例来源:origin: com.sun.msv/com.springsource.com.sun.msv.datatype

WhiteSpaceFacet( String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets )
  throws DatatypeException {
  
  this(nsUri,typeName, baseType,
    WhiteSpaceProcessor.get( (String)facets.getFacet(FACET_WHITESPACE)),
    facets.isFixed(FACET_WHITESPACE) );
}

代码示例来源:origin: kohsuke/msv

protected Object readResolve() throws InvalidObjectException {
  // return the singleton instead of deserialized object.
  try {
    // backward compatibility with JDK1.3. we can't rely on the
    // order of inner classes
    if( this.getClass()==backwardCompatibiliyHook1.getClass() )
      return thePreserve;
    if( this.getClass()==backwardCompatibiliyHook2.getClass() )
      return theCollapse;
    if( this.getClass()==backwardCompatibiliyHook3.getClass() )
      return theReplace;
    
    return get(getName());
  } catch (DatatypeException bte) {
    throw new InvalidObjectException("Unknown Processing Mode");
  }
}

代码示例来源:origin: kohsuke/msv

WhiteSpaceFacet( String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets )
  throws DatatypeException {
  
  this(nsUri,typeName, baseType,
    WhiteSpaceProcessor.get( (String)facets.getFacet(FACET_WHITESPACE)),
    facets.isFixed(FACET_WHITESPACE) );
}

代码示例来源:origin: com.sun.msv.datatype.xsd/xsdlib

protected Object readResolve() throws InvalidObjectException {
  // return the singleton instead of deserialized object.
  try {
    // backward compatibility with JDK1.3. we can't rely on the
    // order of inner classes
    if( this.getClass()==backwardCompatibiliyHook1.getClass() )
      return thePreserve;
    if( this.getClass()==backwardCompatibiliyHook2.getClass() )
      return theCollapse;
    if( this.getClass()==backwardCompatibiliyHook3.getClass() )
      return theReplace;
    
    return get(getName());
  } catch (DatatypeException bte) {
    throw new InvalidObjectException("Unknown Processing Mode");
  }
}

代码示例来源:origin: com.sun.xml.bind/jaxb1-impl

WhiteSpaceFacet( String nsUri, String typeName, XSDatatypeImpl baseType, TypeIncubator facets )
  throws DatatypeException {
  
  this(nsUri,typeName, baseType,
    WhiteSpaceProcessor.get( (String)facets.getFacet(FACET_WHITESPACE)),
    facets.isFixed(FACET_WHITESPACE) );
}

代码示例来源:origin: kohsuke/msv

/** test get method */
public void testGet() throws DatatypeException
{
  assertSame( "whitespace in parameter must be allowed",
    WhiteSpaceProcessor.get("preserve"),
    WhiteSpaceProcessor.get("preserve  \t \n \r ")
  );
  assertSame(
    WhiteSpaceProcessor.get("collapse"),
    WhiteSpaceProcessor.get("    \r\n  collapse \t ")
  );
  assertSame(
    WhiteSpaceProcessor.get("replace"),
    WhiteSpaceProcessor.get(" \r\n\r\nreplace") );
  
  try
  {
    WhiteSpaceProcessor.get("unknown");
    fail("should throw exception");
  }catch(DatatypeException e){;}
}

代码示例来源:origin: kohsuke/msv

/** test behavior of preserve */
public void testPreserve() throws DatatypeException
{
  WhiteSpaceProcessor target = WhiteSpaceProcessor.get("preserve");
  
  String[] tests = new String[] {
    "test",
    "  a  b  c  ",
    "\r\n \ta bb \t\t c   \r\r\n\r  " };
  
  for( int i=0; i<tests.length; i++ )
    assertEquals( tests[i], target.process(tests[i]) );
}

代码示例来源:origin: kohsuke/msv

/** tests behavior of replace */
public void testReplace() throws DatatypeException
{
  WhiteSpaceProcessor target = WhiteSpaceProcessor.get("replace");
  
  assertEquals( target.process(
    "test"),
    "test");
  assertEquals( target.process(
    "  a  b  c  "),
    "  a  b  c  ");
  assertEquals( target.process(
    "\r\n \ta bb \t\t c   \r\r\n\r  "),
    "    a bb    c         ");
}

代码示例来源:origin: kohsuke/msv

/** tests behavior of collapse */
public void testCollapse() throws DatatypeException
{
  WhiteSpaceProcessor target = WhiteSpaceProcessor.get("collapse");
  
  assertEquals( target.process(
    "test"),
    "test");
  assertEquals( target.process(
    "  a  b  c  "),
    "a b c");
  assertEquals( target.process(
    "\r\n \ta bb \t\t c   \r\r\n\r  "),
    "a bb c");
  assertEquals( target.process(
    "abc  "),
    "abc");
  assertEquals( target.process(
    "abc "),
    "abc");
}

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