Package org.aoju.bus.core.scanner
Class SynthesizedSelector.FarthestAndOldestPrioritySelector
java.lang.Object
org.aoju.bus.core.scanner.SynthesizedSelector.FarthestAndOldestPrioritySelector
- All Implemented Interfaces:
SynthesizedSelector
- Enclosing interface:
SynthesizedSelector
public static class SynthesizedSelector.FarthestAndOldestPrioritySelector
extends Object
implements SynthesizedSelector
返回距离根对象更远的注解,当距离一样时优先返回旧注解
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aoju.bus.core.scanner.SynthesizedSelector
SynthesizedSelector.FarthestAndNewestPrioritySelector, SynthesizedSelector.FarthestAndOldestPrioritySelector, SynthesizedSelector.NearestAndNewestPrioritySelector, SynthesizedSelector.NearestAndOldestPrioritySelector -
Field Summary
Fields inherited from interface org.aoju.bus.core.scanner.SynthesizedSelector
FARTHEST_AND_NEWEST_PRIORITY, FARTHEST_AND_OLDEST_PRIORITY, NEAREST_AND_NEWEST_PRIORITY, NEAREST_AND_OLDEST_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Synthesized>
Tchoose(T oldAnnotation, T newAnnotation) 比较两个被合成的注解,选择其中的一个并返回
-
Constructor Details
-
FarthestAndOldestPrioritySelector
public FarthestAndOldestPrioritySelector()
-
-
Method Details
-
choose
Description copied from interface:SynthesizedSelector比较两个被合成的注解,选择其中的一个并返回- Specified by:
choosein interfaceSynthesizedSelector- Type Parameters:
T- 复合注解类型- Parameters:
oldAnnotation- 已存在的注解,该参数不允许为空newAnnotation- 新获取的注解,该参数不允许为空- Returns:
- 被合成的注解
-