Interface NodeWithDeclaration
-
- All Known Implementing Classes:
CallableDeclaration,ConstructorDeclaration,MethodDeclaration
public interface NodeWithDeclarationNode with a declaration representable as a String.- Since:
- July 2014
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetDeclarationAsString()AsgetDeclarationAsString(boolean, boolean, boolean)including the modifiers, the throws clause and the parameters with both type and name.default java.lang.StringgetDeclarationAsString(boolean includingModifiers, boolean includingThrows)AsgetDeclarationAsString(boolean, boolean, boolean)including the parameters with both type and name.java.lang.StringgetDeclarationAsString(boolean includingModifiers, boolean includingThrows, boolean includingParameterName)A simple representation of the element declaration.
-
-
-
Method Detail
-
getDeclarationAsString
default java.lang.String getDeclarationAsString()
AsgetDeclarationAsString(boolean, boolean, boolean)including the modifiers, the throws clause and the parameters with both type and name.- Returns:
- String representation of declaration
-
getDeclarationAsString
default java.lang.String getDeclarationAsString(boolean includingModifiers, boolean includingThrows)AsgetDeclarationAsString(boolean, boolean, boolean)including the parameters with both type and name. The method declaration is returned without comment.- Parameters:
includingModifiers- flag to include the modifiers (if present) in the string producedincludingThrows- flag to include the throws clause (if present) in the string produced- Returns:
- String representation of declaration based on parameter flags
-
getDeclarationAsString
java.lang.String getDeclarationAsString(boolean includingModifiers, boolean includingThrows, boolean includingParameterName)A simple representation of the element declaration. It should fit one string.- Parameters:
includingModifiers- flag to include the modifiers (if present) in the string producedincludingThrows- flag to include the throws clause (if present) in the string producedincludingParameterName- flag to include the parameter name (while the parameter type is always included) in the string produced- Returns:
- String representation of declaration based on parameter flags
-
-