public abstract class ClassUtils extends ObjectSE
修飾子と型 | メソッドと説明 |
---|---|
static void | assertReturnTypeAssignable(MethodSE method, ClassSE<?>... types) 指定された Method SE の戻り値の型が指定された型の 1 つであることを表明します。 |
static int | getNumberOfOccurences(MethodSE method, ClassSE<?> type) 指定された Method SE のパラメーターで指定された型の出現箇所の数を返します。 |
static boolean | hasParameterOfType(MethodSE method, ClassSE<?> type) 指定された Method SE に指定された型のパラメーターがあるかどうかを返します。 |
static boolean | hasProperty(ClassSE<?> type, StringSE property) 指定されたクラスに指定された名前のプロパティが含まれているかどうかを返します。 |
static void | ifPresent(StringSE className, ClassLoaderSE classLoader, ConsumerSE<ClassSE<?>> action) |
static boolean | isGenericRepositoryInterface(ClassSE<?> interfaze) 指定された型が Repository インターフェースである場合に戻ります。 |
static boolean | isGenericRepositoryInterface(StringSE interfaceName) 指定された型名がリポジトリインターフェース名であるかどうかを返します。 |
static boolean | isOfType(ObjectSE object, CollectionSE<ClassSE<?>> types) 指定されたオブジェクトが指定された型のいずれかであるかどうかを返します。 |
static void | unwrapReflectionException(ExceptionSE ex) リフレクション呼び出し中に発生する可能性のある元の例外を抽出するヘルパーメソッド。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static boolean hasProperty(ClassSE<?> type, StringSE property)
type
-property
-public static void ifPresent(StringSE className, @Nullable ClassLoaderSE classLoader, ConsumerSE<ClassSE<?>> action)
className
によって識別される Class
SE が存在するかどうかを判断し *、ロードできるかどうかを判断し、Class
SE をロードできる場合は action
SE を呼び出します。className
- チェックするクラスの名前。classLoader
- 使用するクラスローダー。action
- 通知するアクションコールバック。(デフォルトのクラスローダーを示す null
の場合があります)IllegalStateExceptionSE
- 対応するクラスは解決可能であるが、クラスの継承階層に可読性の不一致があった場合 (通常、ここでチェックされるクラスによって実装されるスーパークラスまたはインターフェースの Jigsaw モジュール定義に欠落している依存関係宣言)public static boolean isGenericRepositoryInterface(ClassSE<?> interfaze)
Repository
インターフェースである場合に戻ります。interfaze
-public static boolean isGenericRepositoryInterface(@Nullable StringSE interfaceName)
interfaceName
-public static int getNumberOfOccurences(MethodSE method, ClassSE<?> type)
Method
SE のパラメーターで指定された型の出現箇所の数を返します。method
-type
-public static void assertReturnTypeAssignable(MethodSE method, ClassSE<?>... types)
Method
SE の戻り値の型が指定された型の 1 つであることを表明します。割り当てチェックの前に既知のラッパー型をアンラップします(QueryExecutionConverters
を参照)。method
- null であってはなりません。types
- null または空であってはなりません。public static boolean isOfType(@Nullable ObjectSE object, CollectionSE<ClassSE<?>> types)
object
-types
-public static boolean hasParameterOfType(MethodSE method, ClassSE<?> type)
Method
SE に指定された型のパラメーターがあるかどうかを返します。method
-type
-public static void unwrapReflectionException(ExceptionSE ex) throws ThrowableSE
ex
-ThrowableSE
Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.