Skip to content

Commit

Permalink
Merge remote-tracking branch 'tim/feature/interfaces'
Browse files Browse the repository at this point in the history
  • Loading branch information
Camotoy committed Aug 24, 2024
2 parents 9362b03 + 7543cd4 commit fffd285
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,14 @@ private boolean gatherElementSpec(

final FieldSpec.Builder fieldSpec = FieldSpec.builder(TypeName.get(nodeType), simpleName, Modifier.PRIVATE);

if (hasAnnotation(element, Field.class)) {
final boolean isField = hasAnnotation(element, Field.class);
if (isField) {
fieldSpec.addModifiers(Modifier.TRANSIENT);
}

// set a default value for config subsections
final TypeElement nodeTypeElement = Utils.toBoxedTypeElement(nodeType, this.processor.typeUtils);
if (!element.isDefault() && hasAnnotation(nodeTypeElement, ConfigSerializable.class)) {
if (!isField && !element.isDefault() && hasAnnotation(nodeTypeElement, ConfigSerializable.class)) {
ClassName configClass = ClassName.get(nodeTypeElement);
if (nodeTypeElement.getKind().isInterface()) {
// first find the generated class for given type
Expand Down

0 comments on commit fffd285

Please sign in to comment.