|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni_paderborn.tools.util.MethodDeclaration
The class MethodDeclaration provides information about a String that declares a method. It tries to parse the provided parameter, that can be a UML-like or a Java-like declarationn (or both). This declaration is not quite the style for instance demanded by the Java Language Specification. But it should help to interpret the user's input as its best.
Field Summary | |
static java.lang.String |
EMPTY_DECLARATION
No comment provided by developer, please add a comment to improve documentation. |
static java.lang.String |
ILLEGAL_PARAMETER_AND_RETURN_TYPE_DECLARATION
No comment provided by developer, please add a comment to improve documentation. |
static java.lang.String |
ILLEGAL_PARAMETER_DECLARATION
No comment provided by developer, please add a comment to improve documentation. |
static java.lang.String |
ILLEGAL_RETURN_TYPE_DECLARATION
No comment provided by developer, please add a comment to improve documentation. |
static java.lang.String |
INVALID_METHOD_DECLARATION
No comment provided by developer, please add a comment to improve documentation. |
static java.lang.String |
METHOD_IS_KEYWORD
No comment provided by developer, please add a comment to improve documentation. |
static java.lang.String |
NO_METHOD_NAME_DECLARED
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 | |
MethodDeclaration(java.lang.String declaration)
Creates a new object fo MethodDeclaration and parses the provided String. |
Method Summary | |
java.lang.String |
getFullName()
Constructs the full method-name in fujaba-style, so it can be used for a call to UMLMethod#getFromMethods(String); The resulting string looks like: name(type1,type2,type3,...) |
java.lang.String |
getMethodError()
Returns the method error, that is an error occured while parsing. |
java.lang.String |
getName()
Returns the name of this Declaration. |
java.lang.String[] |
getParameters()
Returns the parameters of this Declaration as an array. |
java.lang.String[] |
getParameterVariables()
Returns the variable names of the parameters, in the same order as the parameters. |
java.lang.String |
getReturnType()
Returns the return type of this Declaration. |
java.lang.String |
getStatus()
Returns information about this declaration. |
int |
getVisibility()
Get the visibility attribute of the MethodDeclaration object |
boolean |
isAbstract()
Returns true if this Declaration is abstract, false otherwise. |
boolean |
isEmpty()
Returns true if this MethodDeclaration is empty. |
boolean |
isFinal()
Returns true if this Declaration is final, false otherwise. |
boolean |
isNative()
Returns true if this Declaration is native, false otherwise. |
boolean |
isPackage()
Returns true if this Declaration's visibility is package-wide, false otherwise. |
boolean |
isPrivate()
Returns true if this Declaration's visibility is private, false otherwise. |
boolean |
isProtected()
Returns true if this Declaration's visibility is protected, false otherwise. |
boolean |
isPublic()
Returns true if this Declaration's visibility is public, false otherwise. |
boolean |
isStatic()
Returns true if this Declaration is static, false otherwise. |
boolean |
isSynchronized()
Returns true if this Declaration is synchronized, false otherwise. |
boolean |
isTransient()
Returns true if this Declaration is transient, false otherwise. |
boolean |
isValid()
Returns true, if this declaration is valid, NOT considerung parameters or return type. |
boolean |
isVolatile()
Returns true if this Declaration is volatile, false otherwise. |
void |
showStatus()
Shows the status provided by getStatus() in a JOptionPane. |
static java.lang.String |
userReadableSignature(UMLMethod method)
No comment provided by developer, please add a comment to improve documentation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String VALID_DECLARATION
public static final java.lang.String EMPTY_DECLARATION
public static final java.lang.String INVALID_METHOD_DECLARATION
public static final java.lang.String NO_METHOD_NAME_DECLARED
public static final java.lang.String METHOD_IS_KEYWORD
public static final java.lang.String ILLEGAL_RETURN_TYPE_DECLARATION
public static final java.lang.String ILLEGAL_PARAMETER_DECLARATION
public static final java.lang.String ILLEGAL_PARAMETER_AND_RETURN_TYPE_DECLARATION
Constructor Detail |
public MethodDeclaration(java.lang.String declaration)
declaration
- The String to be a method declaration.
NullPointerException,
- if declaration
is null.Method Detail |
public java.lang.String getName()
public java.lang.String getFullName()
The resulting string looks like: name(type1,type2,type3,...) where type is a name without preceeding packagename e.g. parseJavaParam(String)
public java.lang.String getReturnType()
NOTE: If no return type is defined, this MAY be a constructor-declaration. In this case, please checkMethodDeclaration#getName()
against the name of the class this method should be placed into. If they equal this declaration is a constructor. So you have to adjust the returned value toUMLBaseTypes.CONSTRUCTOR
.
public java.lang.String[] getParameters()
public java.lang.String[] getParameterVariables()
public java.lang.String getStatus()
public void showStatus()
public java.lang.String getMethodError()
public int getVisibility()
public boolean isPublic()
public boolean isPackage()
public boolean isProtected()
public boolean isPrivate()
public boolean isFinal()
public boolean isAbstract()
public boolean isStatic()
public boolean isSynchronized()
public boolean isTransient()
public boolean isVolatile()
public boolean isNative()
public boolean isEmpty()
public boolean isValid()
public static java.lang.String userReadableSignature(UMLMethod method)
method
- No description provided
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |