dcc
This commit is contained in:
parent
24d9099a85
commit
f5f6d34135
37
src/org/atriasoft/exml/annotation/XmlFactory.java
Normal file
37
src/org/atriasoft/exml/annotation/XmlFactory.java
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package org.atriasoft.exml.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marker annotation that permit to set the default parsing as attributes.
|
||||||
|
*/
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@ExmlAnnotation
|
||||||
|
public @interface XmlFactory {
|
||||||
|
public interface InterfaceXmlFactoryAccess {
|
||||||
|
/**
|
||||||
|
* Find the class type with the specific name.
|
||||||
|
* @param name Name of the node to find.
|
||||||
|
* @return Value of the class interface to create or null.
|
||||||
|
*/
|
||||||
|
Class<?> findClass(String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the name of the node in xml for the specific Object.
|
||||||
|
* @param object The object that we need to find the type name.
|
||||||
|
* @return The xml string to inject (or null).
|
||||||
|
*/
|
||||||
|
String generateName(Object object);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set this to false to select the attribute as default.
|
||||||
|
* @return true select default attribute, false select default element.
|
||||||
|
*/
|
||||||
|
Class<?> value();
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user