-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#517] customize with mapinit:class local class for map type
- Loading branch information
1 parent
d491509
commit 6b0c11e
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
basics/basic/src/main/java/org/jvnet/jaxb2_commons/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.jaxb2_commons.plugin.map_init; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlValue; | ||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; | ||
import javax.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
basics/basic/src/main/java/org/jvnet/jaxb2_commons/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.jaxb2_commons.plugin.map_init; | ||
|
||
import javax.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
...sic/src/main/java/org/jvnet/jaxb2_commons/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.jaxb2_commons.plugin.map_init; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.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