public class NameMatchCacheOperationSource extends ObjectSE implements CacheOperationSource, SerializableSE
CacheOperationSource
実装。コンストラクターと説明 |
---|
NameMatchCacheOperationSource() |
修飾子と型 | メソッドと説明 |
---|---|
void | addCacheMethod(StringSE methodName, CollectionSE<CacheOperation> ops) キャッシュ可能なメソッドの属性を追加します。 |
boolean | equals(ObjectSE other) |
CollectionSE<CacheOperation> | getCacheOperations(MethodSE method, ClassSE<?> targetClass) このメソッドのキャッシュ操作のコレクションを返します。メソッドにキャッシュ可能なアノテーションが含まれていない場合は null を返します。 |
int | hashCode() |
protected boolean | isMatch(StringSE methodName, StringSE mappedName) 指定されたメソッド名がマッピング名と一致する場合に戻ります。 |
void | setNameMap(MapSE<StringSE, CollectionSE<CacheOperation>> nameMap) メソッド名で構成される名前 / 属性マップを設定します(例: |
StringSE | toString() |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
isCandidateClass
protected static final Log logger
最適な直列化のための静的。
public void setNameMap(MapSE<StringSE,CollectionSE<CacheOperation>> nameMap)
CacheOperation
public void addCacheMethod(StringSE methodName, CollectionSE<CacheOperation> ops)
メソッド名は完全一致にすることも、複数のメソッドに一致させる場合は "xxx*"、"*xxx"、"*xxx*" のパターンにすることもできます。
methodName
- メソッドの名前 ops
- メソッドに関連付けられた操作 @Nullable public CollectionSE<CacheOperation> getCacheOperations(MethodSE method, @Nullable ClassSE<?> targetClass)
CacheOperationSource
null
を返します。CacheOperationSource
の getCacheOperations
method
- 内省する方法 targetClass
- ターゲットクラス (null
の場合があります。この場合、メソッドの宣言クラスを使用する必要があります)null
protected boolean isMatch(StringSE methodName, StringSE mappedName)
デフォルトの実装では、"xxx*"、"*xxx"、"*xxx*" の一致、直接の同等性をチェックします。サブクラスでオーバーライドできます。
methodName
- クラスのメソッド名 mappedName
- 記述子内の名前 PatternMatchUtils.simpleMatch(String, String)
public int hashCode()
ObjectSE
の hashCodeSE
public StringSE toString()
ObjectSE
の toStringSE