JavaTM Platform
Standard Ed. 6

javax.xml.bind.annotation.adapters
クラス NormalizedStringAdapter

java.lang.Object
  上位を拡張 javax.xml.bind.annotation.adapters.XmlAdapter<String,String>
      上位を拡張 javax.xml.bind.annotation.adapters.NormalizedStringAdapter

public final class NormalizedStringAdapter
extends XmlAdapter<String,String>

xs:normalizedString を処理する XmlAdapter です。

このアダプタは、先頭と末尾の空白を削除した後、任意のタブ、CR、LF を空白文字「 」に置き換えます。

導入されたバージョン:
JAXB 2.0

コンストラクタの概要
NormalizedStringAdapter()
           
 
メソッドの概要
protected static boolean isWhiteSpaceExceptSpace(char ch)
          指定された文字が 0x20 以外の空白文字である場合、true を返します。
 String marshal(String s)
          何もしません。
 String unmarshal(String text)
          空白ファセットの「replace」に指定されたとおりに、すべてのタブ、CR、LF を空白文字「 」に置き換えます。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

NormalizedStringAdapter

public NormalizedStringAdapter()
メソッドの詳細

unmarshal

public String unmarshal(String text)
空白ファセットの「replace」に指定されたとおりに、すべてのタブ、CR、LF を空白文字「 」に置き換えます。

定義:
クラス XmlAdapter<String,String> 内の unmarshal
パラメータ:
text - 変換する値。null も可

marshal

public String marshal(String s)
何もしません。 単にパラメータとして与えられたものと同じ文字列を返します。

定義:
クラス XmlAdapter<String,String> 内の marshal
パラメータ:
s - 変換する値。null も可

isWhiteSpaceExceptSpace

protected static boolean isWhiteSpaceExceptSpace(char ch)
指定された文字が 0x20 以外の空白文字である場合、true を返します。


JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。