de.uni_paderborn.tools.util
Class ClassDeclaration

java.lang.Object
  extended byde.uni_paderborn.tools.util.ClassDeclaration

public class ClassDeclaration
extends java.lang.Object

The class ClassDeclaration provides information about a String that declares a class. It tries to parse the provided parameter, that has to be a fujaba-like declaration (see below).

Version:
$Revision: 1.11 $
Author:
$Author: schneider $

Field Summary
static java.lang.String CLASS_IS_KEYWORD
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String EMPTY_DECLARATION
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String ILLEGAL_CONSTRUCTORS_DECLARATION
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String INVALID_CLASS_DECLARATION
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String NO_CONSTRUCTORS_ALLOWED
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String UNPRECISE_CONSTRUCTORS_DECLARATION
          No comment provided by developer, please add a comment to improve documentation.
static java.lang.String VALID_DECLARATION
          No comment provided by developer, please add a comment to improve documentation.
 
Constructor Summary
ClassDeclaration(java.lang.String declaration)
          Creates a new object of ClassDeclareation and parses the provided String.
 
Method Summary
 void clear()
          No comment provided by developer, please add a comment to improve documentation.
 java.lang.String getClassError()
          Returns the method error, that is an error occured while parsing.
 java.util.HashSet getConstructors()
          Returns all defined constructors in a HashSet.
 java.lang.String getName()
          Returns the name of this Declaration.
 java.lang.String getPackage()
          Get the package attribute of the ClassDeclaration object
 java.lang.String getStatus()
          Returns information about this declaration.
 boolean isAbstract()
          Returns true if this Declaration is abstract, false otherwise.
 boolean isEmpty()
          Returns true if this ClassDeclaration is empty.
 boolean isInterface()
          Get the interface attribute of the ClassDeclaration object
 boolean isPersistent()
          Get the persistent attribute of the ClassDeclaration object
 boolean isReference()
          Get the reference attribute of the ClassDeclaration object
 boolean isStatic()
          Returns true if this Declaration is static, false otherwise.
 boolean isValid()
          Returns true, if this declaration is valid, NOT considerung parameters or return type.
 void showStatus()
          Shows the status provided by getStatus() in a JOptionPane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALID_DECLARATION

public static final java.lang.String VALID_DECLARATION
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

EMPTY_DECLARATION

public static final java.lang.String EMPTY_DECLARATION
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

INVALID_CLASS_DECLARATION

public static final java.lang.String INVALID_CLASS_DECLARATION
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

CLASS_IS_KEYWORD

public static final java.lang.String CLASS_IS_KEYWORD
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

ILLEGAL_CONSTRUCTORS_DECLARATION

public static final java.lang.String ILLEGAL_CONSTRUCTORS_DECLARATION
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

NO_CONSTRUCTORS_ALLOWED

public static final java.lang.String NO_CONSTRUCTORS_ALLOWED
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values

UNPRECISE_CONSTRUCTORS_DECLARATION

public static final java.lang.String UNPRECISE_CONSTRUCTORS_DECLARATION
No comment provided by developer, please add a comment to improve documentation.

See Also:
Constant Field Values
Constructor Detail

ClassDeclaration

public ClassDeclaration(java.lang.String declaration)
Creates a new object of ClassDeclareation and parses the provided String.

Parameters:
declaration - The String to be a class declaration.
Throws:
NullPointerException, - if declaration is null.
Method Detail

getConstructors

public java.util.HashSet getConstructors()
Returns all defined constructors in a HashSet. Each entry of this set contains a vector, each vector represents one constructor and contains its parameters. Each odd cell of the vector contains therefor the type of the parameter, e. g. String or Integer, each even cell represents the variable-bname to its predecessor

Returns:
The constructors value

getName

public java.lang.String getName()
Returns the name of this Declaration.

Returns:
The name value

getStatus

public java.lang.String getStatus()
Returns information about this declaration. These information contain:
The String is formatted to be shown best with a JOptionPane. Use showStatus() to do this.

Returns:
The status value

showStatus

public void showStatus()
Shows the status provided by getStatus() in a JOptionPane.


getClassError

public java.lang.String getClassError()
Returns the method error, that is an error occured while parsing. If no error occured an appropriate message is returned.

Returns:
The classError value

isAbstract

public boolean isAbstract()
Returns true if this Declaration is abstract, false otherwise.

Returns:
The abstract value

isStatic

public boolean isStatic()
Returns true if this Declaration is static, false otherwise.

Returns:
The static value

isInterface

public boolean isInterface()
Get the interface attribute of the ClassDeclaration object

Returns:
The interface value

isPersistent

public boolean isPersistent()
Get the persistent attribute of the ClassDeclaration object

Returns:
The persistent value

isReference

public boolean isReference()
Get the reference attribute of the ClassDeclaration object

Returns:
The reference value

isEmpty

public boolean isEmpty()
Returns true if this ClassDeclaration is empty.

Returns:
The empty value

isValid

public boolean isValid()
Returns true, if this declaration is valid, NOT considerung parameters or return type. An empty declaration is not valid.

Returns:
The valid value

getPackage

public java.lang.String getPackage()
Get the package attribute of the ClassDeclaration object

Returns:
The package value

clear

public void clear()
No comment provided by developer, please add a comment to improve documentation.