|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.bind.annotation.adapters Class CollapsedStringAdapter
java.lang.Object javax.xml.bind.annotation.adapters.XmlAdapter<String,String> javax.xml.bind.annotation.adapters.CollapsedStringAdapter
public class CollapsedStringAdapter
- extends XmlAdapter<String,String>
Extends:
">XmlAdapter
用来处理 xs:token 及其派生类型的内置
XmlAdapter
。
此适配器移除前导空白和尾部空白,然后用单个空白字符“ ”截断任何制表符、CR、LF 和 SP 序列。
since | JAXB 2.0 |
Built-in XmlAdapter
to handle xs:token and its derived types.
This adapter removes leading and trailing whitespaces, then truncate any sequnce of tab, CR, LF, and SP by a single whitespace character ' '.
- Since:
- JAXB 2.0
- Author:
- Kohsuke Kawaguchi
Constructor Summary | |
---|---|
CollapsedStringAdapter()
|
Method Summary | |
---|---|
protected static boolean |
isWhiteSpace(char ch)
returns true if the specified char is a white space character. |
String |
marshal(String s)
No-op. |
String |
unmarshal(String text)
Removes leading and trailing whitespaces of the string given as the parameter, then truncate any sequnce of tab, CR, LF, and SP by a single whitespace character ' '. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
CollapsedStringAdapter()
英文文档:
CollapsedStringAdapter
public CollapsedStringAdapter()
Method Detail |
---|
public String
unmarshal(String text)
移除作为参数提供的字符串的前导空白和尾部空白,然后用单个空白字符“ ”截断任何制表符、CR、LF 和 SP 序列。
英文文档:
unmarshal
public String unmarshal(String text)
- Removes leading and trailing whitespaces of the string
given as the parameter, then truncate any
sequnce of tab, CR, LF, and SP by a single whitespace character ' '.
- Specified by:
unmarshal
in classXmlAdapter<String,String>
- Parameters:
text
- The value to be converted. Can be null.
public String
marshal(String s)
无任何操作。仅返回作为参数提供的字符串。
英文文档:
marshal
public String marshal(String s)
- No-op.
Just return the same string given as the parameter.
- Specified by:
marshal
in classXmlAdapter<String,String>
- Parameters:
s
- The value to be convereted. Can be null.
protected static boolean
isWhiteSpace(char ch)
如果指定的 char 是空白字符,则返回 true。
英文文档:
isWhiteSpace
protected static boolean isWhiteSpace(char ch)
- returns true if the specified char is a white space character.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!