Dresden OCL Toolkit

tudresden.ocl.injection
Class JavaAttribute

java.lang.Object
  extended bytudresden.ocl.injection.JavaFeature
      extended bytudresden.ocl.injection.JavaAttribute

public final class JavaAttribute
extends JavaFeature

Represents an attribute of a class parsed by the java parser. Contains additional information about the element-type and key-type tags attached to this attribute.

See Also:
Injector

Field Summary
private  String element_type
          The content of the @element-type tag in the doccomment connected to this attribute.
private  String key_type
          The content of the @key-type tag in the doccomment connected to this attribute.
 
Fields inherited from class tudresden.ocl.injection.JavaFeature
name, type
 
Constructor Summary
JavaAttribute(JavaAttribute ja, String name)
          Constructs a java attribute with the same JavaFeature.parent, JavaFeature.modifiers and JavaFeature.type but the given name.
JavaAttribute(JavaClass parent, int modifiers, String type, String name)
           
 
Method Summary
 int getAllowedModifiers()
          See Java Specification 8.3.1 "Field Modifiers"
 String getElementType()
          Returns the content of the @element-type tag in the doccomment connected to this attribute.
 String getFullDocName()
          Return a fully qualified name of the attribute, including class and package path.
 String getKeyType()
          Returns the content of the @key-type tag in the doccomment connected to this attribute.
 void setElementType(String element_type)
          Sets the content of the @element-type tag in the doccomment connected to this attribute.
 void setKeyType(String key_type)
          Sets the content of the @key-type tag in the doccomment connected to this attribute.
 
Methods inherited from class tudresden.ocl.injection.JavaFeature
getFile, getModifiers, getName, getPackageName, getParent, getType, isAbstract, isStatic, print, printMore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element_type

private String element_type
The content of the @element-type tag in the doccomment connected to this attribute.


key_type

private String key_type
The content of the @key-type tag in the doccomment connected to this attribute.

Constructor Detail

JavaAttribute

public JavaAttribute(JavaClass parent,
                     int modifiers,
                     String type,
                     String name)
              throws InjectorParseException

JavaAttribute

public JavaAttribute(JavaAttribute ja,
                     String name)
              throws InjectorParseException
Constructs a java attribute with the same JavaFeature.parent, JavaFeature.modifiers and JavaFeature.type but the given name. Needed for comma separated attributes.

Method Detail

getFullDocName

public final String getFullDocName()
Return a fully qualified name of the attribute, including class and package path. Syntax follows the javadoc tags, with a '#' between class and attribute name. Is used for type tracing log files.


setElementType

public final void setElementType(String element_type)
Sets the content of the @element-type tag in the doccomment connected to this attribute. Must be called at most once.


getElementType

public final String getElementType()
Returns the content of the @element-type tag in the doccomment connected to this attribute.


setKeyType

public final void setKeyType(String key_type)
Sets the content of the @key-type tag in the doccomment connected to this attribute. Must be called at most once.


getKeyType

public final String getKeyType()
Returns the content of the @key-type tag in the doccomment connected to this attribute.


getAllowedModifiers

public final int getAllowedModifiers()
See Java Specification 8.3.1 "Field Modifiers"

Specified by:
getAllowedModifiers in class JavaFeature

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.