提取注解合成相关逻辑至注解合成器

This commit is contained in:
huangchengxing
2022-07-16 13:18:55 +08:00
parent cf08a92f34
commit 931965301b
18 changed files with 331 additions and 254 deletions

View File

@@ -57,6 +57,11 @@ public class AliasAnnotationPostProcessorTest {
this.annotationMap = annotationMap;
}
@Override
public Object getSource() {
return null;
}
@Override
public SynthesizedAnnotationSelector getAnnotationSelector() {
return null;
@@ -68,7 +73,7 @@ public class AliasAnnotationPostProcessorTest {
}
@Override
public Collection<SynthesizedAnnotationPostProcessor> getAnnotationAttributePostProcessors() {
public Collection<SynthesizedAnnotationPostProcessor> getAnnotationPostProcessors() {
return null;
}
@@ -78,7 +83,7 @@ public class AliasAnnotationPostProcessorTest {
}
@Override
public Collection<SynthesizedAnnotation> getAllSynthesizedAnnotation() {
public Map<Class<? extends Annotation>, SynthesizedAnnotation> getAllSynthesizedAnnotation() {
return null;
}
@@ -128,11 +133,6 @@ public class AliasAnnotationPostProcessorTest {
}
}
@Override
public SynthesizedAggregateAnnotation getOwner() {
return owner;
}
@Override
public Object getRoot() {
return null;

View File

@@ -85,6 +85,11 @@ public class AliasLinkAnnotationPostProcessorTest {
this.annotationMap = annotationMap;
}
@Override
public Object getSource() {
return null;
}
@Override
public SynthesizedAnnotationSelector getAnnotationSelector() {
return null;
@@ -96,7 +101,7 @@ public class AliasLinkAnnotationPostProcessorTest {
}
@Override
public Collection<SynthesizedAnnotationPostProcessor> getAnnotationAttributePostProcessors() {
public Collection<SynthesizedAnnotationPostProcessor> getAnnotationPostProcessors() {
return null;
}
@@ -106,7 +111,7 @@ public class AliasLinkAnnotationPostProcessorTest {
}
@Override
public Collection<SynthesizedAnnotation> getAllSynthesizedAnnotation() {
public Map<Class<? extends Annotation>, SynthesizedAnnotation> getAllSynthesizedAnnotation() {
return null;
}
@@ -156,11 +161,6 @@ public class AliasLinkAnnotationPostProcessorTest {
}
}
@Override
public SynthesizedAggregateAnnotation getOwner() {
return owner;
}
@Override
public Object getRoot() {
return null;

View File

@@ -38,11 +38,6 @@ public class CacheableSynthesizedAnnotationAttributeProcessorTest {
this.value = value;
}
@Override
public SynthesizedAggregateAnnotation getOwner() {
return null;
}
@Override
public Object getRoot() {
return null;

View File

@@ -59,6 +59,11 @@ public class MirrorLinkAnnotationPostProcessorTest {
this.annotationMap = annotationMap;
}
@Override
public Object getSource() {
return null;
}
@Override
public SynthesizedAnnotationSelector getAnnotationSelector() {
return null;
@@ -70,7 +75,7 @@ public class MirrorLinkAnnotationPostProcessorTest {
}
@Override
public Collection<SynthesizedAnnotationPostProcessor> getAnnotationAttributePostProcessors() {
public Collection<SynthesizedAnnotationPostProcessor> getAnnotationPostProcessors() {
return null;
}
@@ -80,7 +85,7 @@ public class MirrorLinkAnnotationPostProcessorTest {
}
@Override
public Collection<SynthesizedAnnotation> getAllSynthesizedAnnotation() {
public Map<Class<? extends Annotation>, SynthesizedAnnotation> getAllSynthesizedAnnotation() {
return null;
}
@@ -131,11 +136,6 @@ public class MirrorLinkAnnotationPostProcessorTest {
}
}
@Override
public SynthesizedAggregateAnnotation getOwner() {
return owner;
}
@Override
public Object getRoot() {
return null;

View File

@@ -87,11 +87,6 @@ public class SynthesizedAnnotationSelectorTest {
this.horizontalDistance = horizontalDistance;
}
@Override
public SynthesizedAggregateAnnotation getOwner() {
return null;
}
@Override
public Object getRoot() {
return null;

View File

@@ -49,7 +49,7 @@ public class SyntheticMetaAnnotationTest {
// 属性
Assert.assertEquals(SynthesizedAnnotationSelector.NEAREST_AND_OLDEST_PRIORITY, syntheticMetaAnnotation.getAnnotationSelector());
Assert.assertEquals(CacheableSynthesizedAnnotationAttributeProcessor.class, syntheticMetaAnnotation.getAnnotationAttributeProcessor().getClass());
Assert.assertEquals(3, syntheticMetaAnnotation.getAnnotationAttributePostProcessors().size());
Assert.assertEquals(3, syntheticMetaAnnotation.getAnnotationPostProcessors().size());
}
@Test