|
6 | 6 | import xyz.erupt.annotation.Erupt;
|
7 | 7 | import xyz.erupt.annotation.EruptI18n;
|
8 | 8 | import xyz.erupt.core.invoke.DataProxyInvoke;
|
| 9 | +import xyz.erupt.core.manager.EruptUiAnnotationManager; |
9 | 10 | import xyz.erupt.core.proxy.AnnotationProcess;
|
10 | 11 | import xyz.erupt.core.proxy.AnnotationProxy;
|
11 | 12 | import xyz.erupt.core.proxy.EruptProxy;
|
@@ -72,12 +73,12 @@ public Erupt getErupt() {
|
72 | 73 | public EruptModel clone() throws CloneNotSupportedException {
|
73 | 74 | EruptModel eruptModel = (EruptModel) super.clone();
|
74 | 75 | eruptModel.eruptJson = AnnotationProcess.annotationToJsonByReflect(this.getErupt());
|
75 |
| - if (this.getErupt().extra().length > 0) { |
76 |
| - JsonObject extra = new JsonObject(); |
77 |
| - eruptModel.eruptJson.add(LambdaSee.method(Erupt::extra), extra); |
78 |
| - for (Class<? extends Annotation> ex : this.getErupt().extra()) { |
79 |
| - Optional.ofNullable(this.getClazz().getAnnotation(ex)).ifPresent(it -> extra.add(ex.getSimpleName(), AnnotationProcess.annotationToJsonByReflect(it))); |
80 |
| - } |
| 76 | + JsonObject extra = new JsonObject(); |
| 77 | + eruptModel.eruptJson.add(LambdaSee.method(Erupt::extra), extra); |
| 78 | + EruptUiAnnotationManager.getAnnotations().forEach(annotation -> Optional.ofNullable(this.getClazz().getAnnotation(annotation)) |
| 79 | + .ifPresent(it -> extra.add(annotation.getSimpleName(), AnnotationProcess.annotationToJsonByReflect(it)))); |
| 80 | + for (Class<? extends Annotation> ex : this.getErupt().extra()) { |
| 81 | + Optional.ofNullable(this.getClazz().getAnnotation(ex)).ifPresent(it -> extra.add(ex.getSimpleName(), AnnotationProcess.annotationToJsonByReflect(it))); |
81 | 82 | }
|
82 | 83 | eruptModel.eruptFieldModels = eruptFieldModels.stream().map(CloneSupport::clone).peek(EruptFieldModel::serializable).collect(Collectors.toList());
|
83 | 84 | return eruptModel;
|
|
0 commit comments