Only generate @Extension once
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
a8e38c6025
commit
316d81bb18
|
@ -29,6 +29,7 @@ Use `@GPrefer` to choose one construction method if multiple are available
|
|||
- Optional, strict no-reflection enforcement via `-AgsonCompileNoReflect`
|
||||
- Comments via `@GComment`
|
||||
- Several utility methods in the generated class for reading from/writing to various sources
|
||||
- Support for generating extension methods if manifold is present
|
||||
|
||||
## TODO
|
||||
- Support for nested types from libraries
|
||||
|
|
|
@ -123,10 +123,10 @@ public class GsonCompileProcessor extends AbstractProcessor2 {
|
|||
TypeSpec.Builder builder = find(known, current);
|
||||
if (builder == null) {
|
||||
builder = TypeSpec.classBuilder(s).addModifiers(Modifier.PUBLIC);
|
||||
if (current.size() == 1 && hasManifold) builder.addAnnotation(Cl.MANIFOLD_EXTENSION);
|
||||
known.put(List.copyOf(current), builder);
|
||||
}
|
||||
if (current.size() > 1) builder.addModifiers(Modifier.STATIC);
|
||||
else if (hasManifold) builder.addAnnotation(Cl.MANIFOLD_EXTENSION);
|
||||
}
|
||||
}
|
||||
// Add to parent class
|
||||
|
|
Loading…
Reference in New Issue