Package com.github.tadukoo.java
Class JavaMethod
java.lang.Object
com.github.tadukoo.java.JavaMethod
- Direct Known Subclasses:
EditableJavaMethod,UneditableJavaMethod
Java Method represents a method in a Java class or interface, etc.
- Since:
- Alpha v.0.2 (as old version that is now more like UneditableJavaMethod), Alpha v.0.4 (as newer version)
- Version:
- Alpha v.0.4
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<JavaAnnotation>Theannotationson the methodprotected booleanWhether the method is static or notprotected JavadocTheJavadocon the methodThe actual lines of code in the methodprotected StringThe name of the methodThe parameters used in the method - pairs of type, then nameprotected StringThe return type of the methodprotected StringThe section comment above the methodThe types that can be thrown by the methodprotected VisibilityTheVisibilityof the method -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaMethod(boolean editable, String sectionComment, Javadoc javadoc, List<JavaAnnotation> annotations, Visibility visibility, boolean isStatic, String returnType, String name, List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters, List<String> throwTypes, List<String> lines) Constructs a new Java Method with the given parameters -
Method Summary
-
Field Details
-
sectionComment
The section comment above the method -
javadoc
TheJavadocon the method -
annotations
Theannotationson the method -
visibility
TheVisibilityof the method -
isStatic
protected boolean isStaticWhether the method is static or not -
returnType
The return type of the method -
name
The name of the method -
parameters
The parameters used in the method - pairs of type, then name -
throwTypes
The types that can be thrown by the method -
lines
The actual lines of code in the method
-
-
Constructor Details
-
JavaMethod
protected JavaMethod(boolean editable, String sectionComment, Javadoc javadoc, List<JavaAnnotation> annotations, Visibility visibility, boolean isStatic, String returnType, String name, List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters, List<String> throwTypes, List<String> lines) Constructs a new Java Method with the given parameters- Parameters:
editable- Whether the method is editable or notsectionComment- The section comment above the methodjavadoc- TheJavadocon the methodannotations- Theannotationson the methodvisibility- TheVisibilityof the methodisStatic- Whether the method is static or notreturnType- The return type of the methodname- The name of the methodparameters- The parameters used in the method - pairs of type, then namethrowTypes- The types that can be thrown by the methodlines- The actual lines of code in the method
-
-
Method Details
-
isEditable
public boolean isEditable()- Returns:
- Whether the method is editable or not
-
getSectionComment
- Returns:
- The section comment above the method
-
getJavadoc
- Returns:
- The
Javadocon the method
-
getAnnotations
- Returns:
- The
annotationson the method
-
getVisibility
- Returns:
- The
Visibilityof the method
-
isStatic
public boolean isStatic()- Returns:
- Whether the method is static or not
-
getReturnType
- Returns:
- The return type of the method
-
getName
- Returns:
- The name of the method
-
getParameters
- Returns:
- The parameters used in the method - pairs of type, then name
-
getThrowTypes
- Returns:
- The types that can be thrown by the method
-
getLines
- Returns:
- The actual lines of code in the method
-
toString
-
equals
-