forked from highsource/jaxb-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[highsource#517] customize with mapinit:class local class for map type
- Loading branch information
1 parent
cef5d15
commit 0843592
Showing
9 changed files
with
173 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
jaxb-plugins-parent/jaxb-plugins/src/main/java/org/jvnet/jaxb/plugin/map_init/InitClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.jvnet.jaxb.plugin.map_init; | ||
|
||
import jakarta.xml.bind.annotation.XmlAccessType; | ||
import jakarta.xml.bind.annotation.XmlAccessorType; | ||
import jakarta.xml.bind.annotation.XmlRootElement; | ||
import jakarta.xml.bind.annotation.XmlValue; | ||
import jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter; | ||
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; | ||
|
||
@XmlRootElement(namespace = "urn:jaxb.jvnet.org:plugin:mapinit", name = "class") | ||
@XmlAccessorType(XmlAccessType.PROPERTY) | ||
public class InitClass { | ||
|
||
private String className; | ||
|
||
@XmlValue | ||
@XmlJavaTypeAdapter(value = CollapsedStringAdapter.class) | ||
String getClassName() { | ||
return className; | ||
} | ||
|
||
public void setClassName(String className) { | ||
this.className = className; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ugins-parent/jaxb-plugins/src/main/java/org/jvnet/jaxb/plugin/map_init/ObjectFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.jvnet.jaxb.plugin.map_init; | ||
|
||
import jakarta.xml.bind.annotation.XmlRegistry; | ||
|
||
@XmlRegistry | ||
public class ObjectFactory { | ||
|
||
public InitClass createInitClass() { | ||
return new InitClass(); | ||
} | ||
|
||
public ObjectFactoryCustomization createObjectFactoryCustomization() { | ||
return new ObjectFactoryCustomization(); | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
...jaxb-plugins/src/main/java/org/jvnet/jaxb/plugin/map_init/ObjectFactoryCustomization.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.jvnet.jaxb.plugin.map_init; | ||
|
||
import jakarta.xml.bind.annotation.XmlAccessType; | ||
import jakarta.xml.bind.annotation.XmlAccessorType; | ||
import jakarta.xml.bind.annotation.XmlElement; | ||
import jakarta.xml.bind.annotation.XmlRootElement; | ||
import jakarta.xml.bind.annotation.XmlType; | ||
|
||
@XmlRootElement(namespace = "urn:jaxb.jvnet.org:plugin:mapinit", name = "objectFactory") | ||
@XmlType(propOrder = { "initClass" }) | ||
@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) | ||
public class ObjectFactoryCustomization { | ||
|
||
private InitClass initClass; | ||
|
||
@XmlElement(namespace = "urn:jaxb.jvnet.org:plugin:mapinit", name = "class") | ||
public InitClass getInitClass() { | ||
return initClass; | ||
} | ||
|
||
public void setInitClass(InitClass initClass) { | ||
this.initClass = initClass; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters