Skip to content

Inheritance plugin remove fields #584

Open
@Selfmade-RuLeZ

Description

@Selfmade-RuLeZ

Hi guys,

I have a very special use case and wasted some days without a solution now. I have multiple WSDLs with one same type inside which are unable to be edited.
I want to create an abstract class to change some behaviour of this class.

Is it possible using JAXB and your Inheritance plugin to not generate all the fields of the complexType but leave those setters and getters inside?

abstract class Foo {
   protected String a = "someDefault"
}

class BarFromWSDL extends Foo {
  void setA(value: String) { a = value }
  String getA() { return a; }
}

Currently those values are overwritten by the generated class which generates a new field with the XML annotations and with protected accessor. Something like this:

class BarFromWSDL extends Foo {
    @XmlElement(required = true)
    protected String a;
  
    void setA(value: String) { this.a = value }
    String getA() { return a; }
}

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions