Package es.bsc.dataclay.util.tools.java
Class JavaSpecGenerator
- java.lang.Object
-
- es.bsc.dataclay.util.tools.java.JavaSpecGenerator
-
public final class JavaSpecGenerator extends Object
This class contains utility functions for the generation of Specifications given Java classes.
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>
DC_CLASSES
List of DataClay classes to skip.
-
Constructor Summary
Constructors Constructor Description JavaSpecGenerator(String newclassPath)
JavaSpecGenerator constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,MetaClass>
generateMetaClassSpec(String namespace, String className, String destClassName, Map<String,String> renaming, boolean isEnrichment)
Generate MetaClass specifications for class with name provided.Map<String,MetaClass>
generateMetaClassSpecForEnrichment(String namespace, String className, String classNameToBeEnriched)
Method that generates a MetaClassSpec from a Java Class with the name specified in the class path provided and modifies the symbols in operations, properties and implementations to use the class name provided.Map<String,MetaClass>
generateMetaClassSpecForRegisterClass(String namespace, String className)
Method that generates a MetaClassSpec from a Java Class with the name specified in the class path provided
-
-
-
Constructor Detail
-
JavaSpecGenerator
public JavaSpecGenerator(String newclassPath)
JavaSpecGenerator constructor.- Parameters:
newclassPath
- Class path of the user.
-
-
Method Detail
-
generateMetaClassSpecForRegisterClass
public Map<String,MetaClass> generateMetaClassSpecForRegisterClass(String namespace, String className)
Method that generates a MetaClassSpec from a Java Class with the name specified in the class path provided- Parameters:
namespace
- Namespace in which to register enrichmentclassName
- Name of the class to register- Returns:
- The specification of the new class
-
generateMetaClassSpecForEnrichment
public Map<String,MetaClass> generateMetaClassSpecForEnrichment(String namespace, String className, String classNameToBeEnriched)
Method that generates a MetaClassSpec from a Java Class with the name specified in the class path provided and modifies the symbols in operations, properties and implementations to use the class name provided.- Parameters:
namespace
- Namespace in which to register enrichmentclassName
- Name of the class to registerclassNameToBeEnriched
- Name of the class to be enriched (needs to be provided since it is used for replacing the symbols)- Returns:
- The specification of the new class
-
generateMetaClassSpec
public Map<String,MetaClass> generateMetaClassSpec(String namespace, String className, String destClassName, Map<String,String> renaming, boolean isEnrichment)
Generate MetaClass specifications for class with name provided.- Parameters:
namespace
- Namespace of the class fileclassName
- Name of class in class loaderdestClassName
- Name of destination classrenaming
- Renaming map (used for enrichments)isEnrichment
- Indicates if is enrichment- Returns:
- The specifications of the new classes
-
-