@@ -53,21 +53,15 @@ public synchronized void init(ProcessingEnvironment processingEnv) {
53
53
54
54
@ Override
55
55
public boolean process (Set <? extends TypeElement > annotations , RoundEnvironment round ) {
56
-
57
56
final var platform = platform ();
58
-
59
- if (platform instanceof ClientPlatformAdapter ) {
60
-
61
- } else {
57
+ if (!(platform instanceof ClientPlatformAdapter )) {
62
58
setPlatform (new ClientPlatformAdapter ());
63
59
}
64
60
65
- for (final Element controller :
66
- round .getElementsAnnotatedWith (typeElement (ClientPrism .PRISM_TYPE ))) {
61
+ for (final Element controller : round .getElementsAnnotatedWith (typeElement (ClientPrism .PRISM_TYPE ))) {
67
62
writeClient (controller );
68
63
}
69
- for (final Element importedElement :
70
- round .getElementsAnnotatedWith (typeElement (ImportPrism .PRISM_TYPE ))) {
64
+ for (final Element importedElement : round .getElementsAnnotatedWith (typeElement (ImportPrism .PRISM_TYPE ))) {
71
65
writeForImported (importedElement );
72
66
}
73
67
if (round .processingOver ()) {
@@ -76,7 +70,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
76
70
setPlatform (platform );
77
71
return false ;
78
72
}
79
-
73
+
80
74
private void writeServicesFile () {
81
75
try {
82
76
final FileObject metaInfWriter = createMetaInfWriter (METAINF_SERVICES_PROVIDER );
@@ -91,7 +85,6 @@ private void writeServicesFile() {
91
85
}
92
86
93
87
private void writeForImported (Element importedElement ) {
94
-
95
88
ImportPrism .getInstanceOn (importedElement ).types ().stream ()
96
89
.map (ProcessingContext ::asElement )
97
90
.filter (Objects ::nonNull )
@@ -108,7 +101,7 @@ private void writeClient(Element controller) {
108
101
e .printStackTrace ();
109
102
logError (reader .beanType (), "Failed to write client class " + e );
110
103
}
111
- }
104
+ }
112
105
}
113
106
114
107
protected String writeClientAdapter (ControllerReader reader ) throws IOException {
0 commit comments