|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.generator.JavaDefinition | +--org.arch4j.generator.JavaObjectDefinition
This class defines the common attributes of an object definition. Subclasses further define the settings, keywords, and values that make up a valid Java class or interface definition.
Comments and parameters that use the word object are collectively referring to either a Java class or interface.
Field Summary | |
protected List |
implementedInterfaces
A list of implemented interfaces, expressed as JavaType objects. |
protected boolean |
isStrict
Does the object need to guarantee strictfp? Default = false. |
protected JavaType |
objectName
The object, defined as a Java type. |
Fields inherited from class org.arch4j.generator.JavaDefinition |
accessModifier, comment |
Fields inherited from interface org.arch4j.generator.JavaKeywordConstants |
ABSTRACT, CATCH, CLASS, DEFAULT_ACCESS, EXTENDS, FALSE, FINAL, FINALLY, IMPLEMENTS, IMPORT, INTERFACE, NATIVE, NEW, NULL, PACKAGE, PRIVATE, PROTECTED, PUBLIC, RETURN, STATIC, STRICTFP, SUPER, SYNCHRONIZED, THIS, THROW, THROWS, TRANSIENT, TRUE, TRY, VOID, VOLATILE |
Fields inherited from interface org.arch4j.generator.JavaPrimitiveConstants |
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, SHORT |
Constructor Summary | |
JavaObjectDefinition(String comment,
JavaAccessModifier accessModifier,
boolean isStrict,
JavaType objectName,
List implementedInterfaces)
Constructs a JavaObjectDefinition with the specified
comment, access control modifier,
whether the object needs strictfp floating-point calculations,
the Java object type,
and list of implemented interfaces. |
|
JavaObjectDefinition(String comment,
JavaAccessModifier accessModifier,
JavaType objectName,
List implementedInterfaces)
Constructs a JavaObjectDefinition with the specified
comment, access control modifier, Java object type,
and list of implemented interfaces. |
|
JavaObjectDefinition(String comment,
String accessModifier,
boolean isStrict,
String objectName,
List implementedInterfaces)
Constructs a JavaObjectDefinition with the specified
comment, access control modifier,
whether the object needs strictfp floating-point calculations,
the object name,
and list of implemented interfaces. |
|
JavaObjectDefinition(String comment,
String accessModifier,
String objectName,
List implementedInterfaces)
Constructs a JavaObjectDefinition with the specified
comment, access control modifier, object name,
and list of implemented interfaces. |
Method Summary | |
void |
addImplementedInterface(JavaType interfaceType)
Add an interface that is implemented by the object. |
void |
addImplementedInterface(String interfaceName)
Add an interface that is implemented by the object. |
void |
addImplementedInterfaces(List interfaces)
Add a list of interfaces that are implemented by the object. |
List |
getImplementedInterfaces()
Returns a List of interfaces implemented by the object. |
List |
getImports()
Returns a list of potential import types for the object. |
abstract String |
getObjectKeyword()
Returns the object keyword for the object. |
JavaType |
getObjectName()
Returns the Java type that represents the object. |
abstract boolean |
isAbstract()
Returns whether the object is abstract or not. |
boolean |
isClassDefinition()
Returns whether or not this object defines a class or not. |
boolean |
isInterfaceDefinition()
Returns whether or not this object defines an interface or not. |
boolean |
isStrict()
Returns whether the object needs strictfp or not. |
protected void |
setImplementedInterfaces(List interfaces)
Set the list of interfaces that are implemented by the object. |
void |
setStrict(boolean value)
Set whether the object needs strictfp or not. |
Methods inherited from class org.arch4j.generator.JavaDefinition |
getAccessModifier, getComment, getDefinition, hasComment, setAccessModifier, setComment, writeDefinitionTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean isStrict
protected JavaType objectName
protected List implementedInterfaces
Constructor Detail |
public JavaObjectDefinition(String comment, String accessModifier, String objectName, List implementedInterfaces)
JavaObjectDefinition
with the specified
comment, access control modifier, object name,
and list of implemented interfaces.
The list should contain JavaType
objects representing each
implemented interface,
although Strings will be converted if it is more convenient to use Strings.
comment
- The object's descriptive comment.accessModifier
- The object's access control modifier.objectName
- The object's name.implementedInterfaces
- The list of implemented interfaces.public JavaObjectDefinition(String comment, JavaAccessModifier accessModifier, JavaType objectName, List implementedInterfaces)
JavaObjectDefinition
with the specified
comment, access control modifier, Java object type,
and list of implemented interfaces.
The list should contain JavaType
objects representing each
implemented interface,
although Strings will be converted if it is more convenient to use Strings.
comment
- The object's descriptive comment.accessModifier
- The object's access control modifier.objectName
- The object's Java type specification.implementedInterfaces
- The list of implemented interfaces.public JavaObjectDefinition(String comment, String accessModifier, boolean isStrict, String objectName, List implementedInterfaces)
JavaObjectDefinition
with the specified
comment, access control modifier,
whether the object needs strictfp floating-point calculations,
the object name,
and list of implemented interfaces.
The list should contain JavaType
objects representing each
implemented interface,
although Strings will be converted if it is more convenient to use Strings.
comment
- The object's descriptive comment.accessModifier
- The object's access control modifier.objectName
- The object's name.implementedInterfaces
- The list of implemented interfaces.public JavaObjectDefinition(String comment, JavaAccessModifier accessModifier, boolean isStrict, JavaType objectName, List implementedInterfaces)
JavaObjectDefinition
with the specified
comment, access control modifier,
whether the object needs strictfp floating-point calculations,
the Java object type,
and list of implemented interfaces.
The list should contain JavaType
objects representing each
implemented interface,
although Strings will be converted if it is more convenient to use Strings.
comment
- The object's descriptive comment.accessModifier
- The object's access control modifier.objectName
- The object's Java type specification.implementedInterfaces
- The list of implemented interfaces.Method Detail |
public boolean isStrict()
public void setStrict(boolean value)
value
- true for strictfp for floating-point calculations.public JavaType getObjectName()
public List getImplementedInterfaces()
public void addImplementedInterface(String interfaceName)
interfaceName
- The interface name.public void addImplementedInterface(JavaType interfaceType)
interfaceType
- The interface type.public void addImplementedInterfaces(List interfaces)
interfaces
- The list of interface names or types to add.public boolean isClassDefinition()
public boolean isInterfaceDefinition()
public abstract String getObjectKeyword()
public abstract boolean isAbstract()
public List getImports()
getImports
in class JavaDefinition
protected void setImplementedInterfaces(List interfaces)
interfaces
- The list of interfaces.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |