|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object org.seasar.aptina.commons.util.TypeMirrorUtils
public class TypeMirrorUtils
TypeMirror
を扱うユーティリティです.
フィールドの概要 | |
---|---|
static Map<String,TypeKind> |
PRIMITIVE_TYPES
プリミティブ型の名前と TypeKind のマップです. |
メソッドの概要 | |
---|---|
static TypeMirror |
getTypeMirror(Types typeUtils,
Elements elementUtils,
Class<?> clazz)
クラスに対応する TypeMirror を返します. |
static TypeMirror |
getTypeMirror(Types typeUtils,
Elements elementUtils,
String className)
クラス名に対応する TypeMirror を返します. |
static TypeMirror |
toArrayType(Types typeUtils,
TypeMirror componentTypeMirror)
引数の型を要素とする配列の TypeMirror を返します. |
static List<TypeMirror> |
toTypeMirrors(Types typeUtils,
Elements elementUtils,
Class<?>... types)
クラスの配列を TypeMirror の配列に変換して返します. |
static List<TypeMirror> |
toTypeMirrors(Types typeUtils,
Elements elementUtils,
String... typeNames)
クラス名の配列を TypeMirror の配列に変換して返します. |
static List<String> |
toTypeNameList(List<? extends TypeMirror> typeMirrors)
TypeMirror の文字列表現の List を返します. |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
public static final Map<String,TypeKind> PRIMITIVE_TYPES
TypeKind
のマップです.
メソッドの詳細 |
---|
public static TypeMirror getTypeMirror(Types typeUtils, Elements elementUtils, Class<?> clazz)
TypeMirror
を返します.
typeUtils
- Types
elementUtils
- Elements
clazz
- クラス
TypeMirror
, クラスが存在しない場合は nullpublic static TypeMirror getTypeMirror(Types typeUtils, Elements elementUtils, String className)
TypeMirror
を返します.
配列の場合は要素型の名前の後に []
を連ねる形式と, [[LString;
のような
形式のどちらでも指定することができます.
typeUtils
- Types
elementUtils
- Elements
className
- クラスの完全限定名
TypeMirror
, クラスが存在しない場合は null
public static TypeMirror toArrayType(Types typeUtils, TypeMirror componentTypeMirror)
TypeMirror
を返します.
typeUtils
- Types
componentTypeMirror
- 配列の要素となる型
TypeMirror
Types.getArrayType(TypeMirror)
public static List<TypeMirror> toTypeMirrors(Types typeUtils, Elements elementUtils, Class<?>... types) throws IllegalArgumentException
TypeMirror
の配列に変換して返します.
typeUtils
- Types
elementUtils
- Elements
types
- クラスの配列
TypeMirror
の配列
IllegalArgumentException
- 配列の要素のクラスに対応する TypeMirror
が存在しない場合public static List<TypeMirror> toTypeMirrors(Types typeUtils, Elements elementUtils, String... typeNames)
TypeMirror
の配列に変換して返します.
typeUtils
- Types
elementUtils
- Elements
typeNames
- クラス名の配列
TypeMirror
の配列
IllegalArgumentException
- 配列の要素のクラスに対応する TypeMirror
が存在しない場合public static List<String> toTypeNameList(List<? extends TypeMirror> typeMirrors)
TypeMirror
の文字列表現の List
を返します.
typeMirrors
- TypeMirror
の List
TypeMirror
の文字列表現の List
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |