クラス AptType
- java.lang.Object
-
- com.github.mygreen.sqlmapper.apt.model.AptType
-
public class AptType extends Object
APTで処理する際のクラスタイプに対するユーティリティクラス。- 作成者:
- T.TSUCHIE
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 AptType(TypeMirror typeMirror, Optional<Element> typeElement)
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 com.squareup.javapoet.ClassNameasClassName()JavaPoetのClassNameに変換します。StringgetCanonicalName()FQNのクラス名を取得します。StringgetSimpleName()パッケージ名を除いたクラス名を取得します。com.squareup.javapoet.TypeNamegetTypeName()JavaPoetのタイプ情報を取得する。com.squareup.javapoet.TypeNamegetWrapperTypeName()JavaPoetのタイプ情報を取得する。booleanisAbstract()抽象クラス(static class)か判定します。booleanisArray()配列型かどうか判定します。booleanisEnum()列挙型かどうか判定します。booleanisInheritanceOf(Class<?> targetClass)このクラスが指定したクラスを継承しているかどうか判定します。booleanisPrimitive()プリミティブ型かどうか判定します。booleanisPrimitiveBoolean()プリミティブ型のbooleanかどうか判定します。booleanisPrimitiveNumber()プリミティブ型の数値かどうか判定します。booleanisStaticInnerClass()静的なクラス(static class)か判定します。voidsetSuperTypes(List<TypeMirror> superTypes)継承しているクラス情報
-
-
-
コンストラクタの詳細
-
AptType
public AptType(TypeMirror typeMirror, Optional<Element> typeElement)
-
-
メソッドの詳細
-
isStaticInnerClass
public boolean isStaticInnerClass()
静的なクラス(static class)か判定します。- 戻り値:
- 静的なクラス(static class)のときtrueを返します。
-
isAbstract
public boolean isAbstract()
抽象クラス(static class)か判定します。- 戻り値:
- 抽象クラスのときtrueを返します。
-
isArray
public boolean isArray()
配列型かどうか判定します。- 戻り値:
- 配列型のとき、true を返す。
-
isEnum
public boolean isEnum()
列挙型かどうか判定します。- 戻り値:
- 列挙型のとき、true を返す。
-
isPrimitive
public boolean isPrimitive()
プリミティブ型かどうか判定します。- 戻り値:
- プリミティブ型のとき、true を返す。
-
isPrimitiveNumber
public boolean isPrimitiveNumber()
プリミティブ型の数値かどうか判定します。- 戻り値:
- プリミティブ型の数値とき、true を返す。
-
isPrimitiveBoolean
public boolean isPrimitiveBoolean()
プリミティブ型のbooleanかどうか判定します。- 戻り値:
- プリミティブ型のbooleanとき、true を返す。
-
isInheritanceOf
public boolean isInheritanceOf(Class<?> targetClass)
このクラスが指定したクラスを継承しているかどうか判定します。- パラメータ:
targetClass- 継承するクラス情報- 戻り値:
- 指定したクラスを継承しているとき、true を返す。
-
getCanonicalName
public String getCanonicalName()
FQNのクラス名を取得します。- 戻り値:
- パッケージ名付きのクラス名
-
getSimpleName
public String getSimpleName()
パッケージ名を除いたクラス名を取得します。- 戻り値:
- パッケージ名を除いたクラス
-
asClassName
public com.squareup.javapoet.ClassName asClassName()
JavaPoetのClassNameに変換します。- 戻り値:
- クラス名情報。
- 例外:
NoSuchElementException- クラスタイプでない場合にスローされます。
-
getWrapperTypeName
public com.squareup.javapoet.TypeName getWrapperTypeName()
JavaPoetのタイプ情報を取得する。 ただし、プリミティブ型のときはラッパークラスを取得する。- 戻り値:
- JavaPoetのタイプ情報。
-
getTypeName
public com.squareup.javapoet.TypeName getTypeName()
JavaPoetのタイプ情報を取得する。- 戻り値:
- JavaPoetのタイプ情報。
-
setSuperTypes
public void setSuperTypes(List<TypeMirror> superTypes)
継承しているクラス情報
-
-