archimate.util
Class JavaClass

java.lang.Object
  extended by archimate.util.JavaClass
All Implemented Interfaces:
ICodeElement

public class JavaClass
extends java.lang.Object
implements ICodeElement

Class modelling a Java class

Author:
Samuel Esposito

Field Summary
static java.lang.String CLASS
           
static java.lang.String INTERFACE
           
 
Constructor Summary
JavaClass(java.lang.String packageName, java.lang.String className, java.lang.String tag, java.lang.String type)
           
 
Method Summary
 void addArchiMateTag(java.lang.String archiMateTag)
           
 void addArchiMateTags(java.util.ArrayList<java.lang.String> archiMateTags)
           
 void addImport(java.lang.String importName)
           
 void addImports(java.util.ArrayList<java.lang.String> imports)
           
 void addInterface(java.lang.String interfaceName)
           
 void addInterfaces(java.util.ArrayList<java.lang.String> interfaces)
           
 java.lang.String archiMateTag()
          Returns the code elements first archiMateTag
 java.util.ArrayList<java.lang.String> archiMateTags()
           
 boolean archiMateTagsDefined()
          Returns whether there are archiMateTags defined
 java.lang.String author()
           
 boolean authorDefined()
           
 boolean classDefined()
           
 java.lang.String className()
           
 java.lang.String comment()
          Returns the code elements comments
 boolean commentDefined()
          Returns whether there is a comment defined
 void diff(org.eclipse.jdt.core.dom.ASTNode node, org.eclipse.core.runtime.MultiStatus status, java.lang.String pattern)
          Compares itself to the ASTNode and writes the eventual differences in the MultiStatus object
 boolean equals(java.lang.String identifier)
          Method defining whether a source element matches the identifier
 java.lang.String identifier()
          Returns the identifier of the source code element
 java.util.ArrayList<java.lang.String> imports()
           
 boolean importsDefined()
           
 java.util.ArrayList<java.lang.String> interfaces()
           
 boolean interfacesDefined()
           
 boolean isInterface()
           
 boolean packageDefined()
           
 java.lang.String packageName()
           
 void setAuthor(java.lang.String author)
           
 void setClass(java.lang.String className)
           
 void setComment(java.lang.String comment)
           
 void setPackage(java.lang.String packageName)
           
 void setType(java.lang.String type)
           
 void setVisited()
          Marks a source code element as visited
 java.lang.String targetFile()
           
 boolean visited()
          Returns whether a source element has been visited in the source code
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERFACE

public static final java.lang.String INTERFACE
See Also:
Constant Field Values

CLASS

public static final java.lang.String CLASS
See Also:
Constant Field Values
Constructor Detail

JavaClass

public JavaClass(java.lang.String packageName,
                 java.lang.String className,
                 java.lang.String tag,
                 java.lang.String type)
Method Detail

identifier

public java.lang.String identifier()
Description copied from interface: ICodeElement
Returns the identifier of the source code element

Specified by:
identifier in interface ICodeElement
Returns:
The identifier of the source code element

equals

public boolean equals(java.lang.String identifier)
Description copied from interface: ICodeElement
Method defining whether a source element matches the identifier

Specified by:
equals in interface ICodeElement
Parameters:
identifier - String to match the source element with
Returns:
Whether the source element matches the identifier

diff

public void diff(org.eclipse.jdt.core.dom.ASTNode node,
                 org.eclipse.core.runtime.MultiStatus status,
                 java.lang.String pattern)
Description copied from interface: ICodeElement
Compares itself to the ASTNode and writes the eventual differences in the MultiStatus object

Specified by:
diff in interface ICodeElement
Parameters:
node - the ASTNode to compare with
status - the MultiStatus to write the differences in

visited

public boolean visited()
Description copied from interface: ICodeElement
Returns whether a source element has been visited in the source code

Specified by:
visited in interface ICodeElement
Returns:
Whether a source element has been visited in the source code

setVisited

public void setVisited()
Description copied from interface: ICodeElement
Marks a source code element as visited

Specified by:
setVisited in interface ICodeElement

targetFile

public java.lang.String targetFile()

setPackage

public void setPackage(java.lang.String packageName)

packageDefined

public boolean packageDefined()

packageName

public java.lang.String packageName()

addImport

public void addImport(java.lang.String importName)

addImports

public void addImports(java.util.ArrayList<java.lang.String> imports)

importsDefined

public boolean importsDefined()

imports

public java.util.ArrayList<java.lang.String> imports()

setComment

public void setComment(java.lang.String comment)

commentDefined

public boolean commentDefined()
Description copied from interface: ICodeElement
Returns whether there is a comment defined

Specified by:
commentDefined in interface ICodeElement
Returns:
Whether there is a comment defined

comment

public java.lang.String comment()
Description copied from interface: ICodeElement
Returns the code elements comments

Specified by:
comment in interface ICodeElement
Returns:
The code elements comments

setAuthor

public void setAuthor(java.lang.String author)

authorDefined

public boolean authorDefined()

author

public java.lang.String author()

addArchiMateTag

public void addArchiMateTag(java.lang.String archiMateTag)

addArchiMateTags

public void addArchiMateTags(java.util.ArrayList<java.lang.String> archiMateTags)

archiMateTagsDefined

public boolean archiMateTagsDefined()
Description copied from interface: ICodeElement
Returns whether there are archiMateTags defined

Specified by:
archiMateTagsDefined in interface ICodeElement
Returns:
Whether there are archiMateTags defined

archiMateTag

public java.lang.String archiMateTag()
Description copied from interface: ICodeElement
Returns the code elements first archiMateTag

Specified by:
archiMateTag in interface ICodeElement
Returns:
The code elements first archiMateTag

archiMateTags

public java.util.ArrayList<java.lang.String> archiMateTags()

setClass

public void setClass(java.lang.String className)

classDefined

public boolean classDefined()

className

public java.lang.String className()

setType

public void setType(java.lang.String type)

isInterface

public boolean isInterface()

addInterface

public void addInterface(java.lang.String interfaceName)

addInterfaces

public void addInterfaces(java.util.ArrayList<java.lang.String> interfaces)

interfacesDefined

public boolean interfacesDefined()

interfaces

public java.util.ArrayList<java.lang.String> interfaces()