Class JavaSpecGenerator


  • public final class JavaSpecGenerator
    extends Object
    This class contains utility functions for the generation of Specifications given Java classes.
    • Field Detail

      • DC_CLASSES

        public static final List<String> DC_CLASSES
        List of DataClay classes to skip.
    • 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 enrichment
        className - 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 enrichment
        className - Name of the class to register
        classNameToBeEnriched - 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 file
        className - Name of class in class loader
        destClassName - Name of destination class
        renaming - Renaming map (used for enrichments)
        isEnrichment - Indicates if is enrichment
        Returns:
        The specifications of the new classes