Module org.eclipse.persistence.core
Class CodeDefinition
java.lang.Object
org.eclipse.persistence.internal.codegen.CodeDefinition
- Direct Known Subclasses:
AttributeDefinition
,ClassDefinition
,MethodDefinition
INTERNAL:
Purpose: Model a element of code generation purposes.
- Since:
- TopLink 3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
Compares the typeName to those stored in the typeNameMap.getName()
parseForTypeNames
(String longString) Returns a set of java.lang.String type names included in longString.protected static void
Used for calculating imports.void
setAccessLevel
(AccessLevel accessLevel) void
setComment
(String comment) void
toString()
void
write
(CodeGenerator generator) Write the code out to the generator's stream.abstract void
writeBody
(CodeGenerator generator) Write the code out to the generator's stream.
-
Field Details
-
accessLevel
-
name
-
comment
-
JAVA_LANG_PACKAGE_NAME
- See Also:
-
JAVA_UTIL_PACKAGE_NAME
- See Also:
-
TOPLINK_INDIRECTION_PACKAGE_NAME
- See Also:
-
-
Constructor Details
-
CodeDefinition
protected CodeDefinition()
-
-
Method Details
-
adjustTypeName
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
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
Used for calculating imports. @see org.eclipse.persistence.internal.codegen.ClassDefinition#calculateImports() -
getAccessLevel
-
getComment
-
getName
-
setAccessLevel
-
setComment
-
setName
-
toString
-
write
Write the code out to the generator's stream. -
writeBody
Write the code out to the generator's stream.
-