Class CodeDefinition

    • Constructor Detail

      • CodeDefinition

        public CodeDefinition()
    • Method Detail

      • adjustTypeName

        protected static String adjustTypeName​(String typeName,
                                               Map typeNameMap)
        Compares the typeName to those stored in the typeNameMap. If the short name of the typeName is unambiguous (only one package for that short name in the Map), removes the package name and returns the short name, else returns the whole thing. Assumes that typeName contains only a package name (optional) and a short name, potentially with subtended brackets. (e.g. int -> int, java.util.Vector -> Vector, java.lang.Boolean[] -> Boolean[], etc.)
      • parseForTypeNames

        protected static Set parseForTypeNames​(String longString)
        Returns a set of java.lang.String type names included in longString. Will only look for ValueHolder, java.util collection types, and TopLink indirect collection types. All other searches too intractable at this point.
      • putTypeNameInMap

        protected static void putTypeNameInMap​(String typeName,
                                               Map typeNameMap)
        Used for calculating imports. @see org.eclipse.persistence.internal.codegen.ClassDefinition#calculateImports()
      • getComment

        public String getComment()
      • getName

        public String getName()
      • setAccessLevel

        public void setAccessLevel​(AccessLevel accessLevel)
      • setComment

        public void setComment​(String comment)
      • setName

        public void setName​(String name)
      • write

        public void write​(CodeGenerator generator)
        Write the code out to the generator's stream.
      • writeBody

        public abstract void writeBody​(CodeGenerator generator)
        Write the code out to the generator's stream.