archimate.util
Class JavaMethod

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

public class JavaMethod
extends java.lang.Object
implements ICodeElement

Class modelling a java method

Author:
Samuel Esposito

Field Summary
static java.lang.String DECLARATION
           
static java.lang.String IMPLEMENTATION
           
static java.lang.String INVOCATION
           
 
Constructor Summary
JavaMethod(java.lang.String name, java.lang.String tag, java.lang.String type, java.lang.String className)
           
 
Method Summary
 java.lang.String archiMateTag()
          Returns the code elements first archiMateTag
 boolean archiMateTagsDefined()
          Returns whether there are archiMateTags defined
 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.lang.String invocationClass()
           
 java.lang.String invocationMethod()
           
 java.lang.String invocationObject()
           
 java.lang.String name()
           
 void setArchiMateTag(java.lang.String tag)
           
 void setClassName(java.lang.String name)
           
 void setComment(java.lang.String comment)
           
 void setName(java.lang.String name)
           
 void setType(java.lang.String type)
           
 void setVisited()
          Marks a source code element as visited
 java.lang.String type()
           
 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

DECLARATION

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

IMPLEMENTATION

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

INVOCATION

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

JavaMethod

public JavaMethod(java.lang.String name,
                  java.lang.String tag,
                  java.lang.String type,
                  java.lang.String className)
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

setName

public void setName(java.lang.String name)

setType

public void setType(java.lang.String type)

setArchiMateTag

public void setArchiMateTag(java.lang.String tag)

setClassName

public void setClassName(java.lang.String name)

name

public java.lang.String name()

type

public java.lang.String type()

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

invocationMethod

public java.lang.String invocationMethod()

invocationClass

public java.lang.String invocationClass()

invocationObject

public java.lang.String invocationObject()

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