Package org.jgroups.util
Class XMLSchemaGenerator
java.lang.Object
org.jgroups.util.XMLSchemaGenerator
Iterates over all concrete Protocol classes and creates XML schema used for validation of configuration files.
https://issues.redhat.com/browse/JGRP-448
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidclassToXML(Document xmldoc, Element parent, Class<?> clazz, String preAppendToSimpleClassName) private static ElementcreateXMLTree(Document xmldoc, Class<?> clazz, String pkgname) findImplementations(List<Class<?>> classes, Class<?> intf) protected static voidgenerateProtocolSchema(Document xmldoc, Element parent, String... suffixes) getClasses(Class<?> assignableFrom, String packageName) getClassesFromPackages(Class<?> cl, String... packages) protected static voiditerateOverAttributes(Class<?> clazz, Map<String, XMLSchemaGenerator.DelayingElementWriter> sortedElements, Document xmldoc, Element complexType, String prefix) protected static voiditerateOverMethods(Class<?> clazz, Map<String, XMLSchemaGenerator.DelayingElementWriter> sortedElements, Document xmldoc, Element complexType, String prefix) static void
-
Field Details
-
PROT_PACKAGE
- See Also:
-
PACKAGES
-
embeddedSchemas
-
-
Constructor Details
-
XMLSchemaGenerator
public XMLSchemaGenerator()
-
-
Method Details
-
main
-
getClassesFromPackages
public static List<Class<?>> getClassesFromPackages(Class<?> cl, String... packages) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
generateProtocolSchema
protected static void generateProtocolSchema(Document xmldoc, Element parent, String... suffixes) throws Exception - Throws:
Exception
-
findImplementations
-
getClasses
public static Set<Class<?>> getClasses(Class<?> assignableFrom, String packageName) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
classToXML
-
createXMLTree
-
iterateOverAttributes
-
iterateOverMethods
-