Package com.github.tadukoo.java.editable
Class EditableJavaMethod
java.lang.Object
com.github.tadukoo.java.JavaMethod
com.github.tadukoo.java.editable.EditableJavaMethod
Represents a method in Java that can be modified
- Version:
- Alpha v.0.4
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.github.tadukoo.java.JavaMethod
annotations, isStatic, javadoc, lines, name, parameters, returnType, sectionComment, throwTypes, visibility -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(JavaAnnotation annotation) voidaddAnnotations(List<JavaAnnotation> annotations) voidvoidvoidaddParameter(com.github.tadukoo.util.tuple.Pair<String, String> parameter) voidaddParameter(String type, String name) voidaddParameters(List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters) voidaddThrowType(String throwType) voidaddThrowTypes(List<String> throwTypes) builder()voidsetAnnotations(List<JavaAnnotation> annotations) voidsetJavadoc(Javadoc javadoc) voidvoidvoidsetParameters(List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters) voidsetReturnType(String returnType) voidsetSectionComment(String sectionComment) voidsetStatic(boolean isStatic) voidsetThrowTypes(List<String> throwTypes) voidsetVisibility(Visibility visibility) Methods inherited from class com.github.tadukoo.java.JavaMethod
equals, getAnnotations, getJavadoc, getLines, getName, getParameters, getReturnType, getSectionComment, getThrowTypes, getVisibility, isEditable, isStatic, toString
-
Method Details
-
builder
- Returns:
- A new
EditableJavaMethod.EditableJavaMethodBuilderto use to build a newEditableJavaMethod
-
setSectionComment
- Parameters:
sectionComment- The section comment above the method
-
setJavadoc
- Parameters:
javadoc- TheJavadocon the method
-
addAnnotation
- Parameters:
annotation- Anannotationon the method to be added - must be editable
-
addAnnotations
- Parameters:
annotations-annotationson the method to be added - must be editable
-
setAnnotations
- Parameters:
annotations- Theannotationson the method - must be editable
-
setVisibility
- Parameters:
visibility- TheVisibilityof the method
-
setStatic
public void setStatic(boolean isStatic) - Parameters:
isStatic- Whether the method is static or not
-
setReturnType
- Parameters:
returnType- The return type of the method
-
setName
- Parameters:
name- The name of the method
-
addParameter
- Parameters:
type- The type of the parameter used in the method to be addedname- The name of the parameter used in the method to be added
-
addParameter
- Parameters:
parameter- A parameter used in the method to be added - a pair of type, then name
-
addParameters
- Parameters:
parameters- Parameters used in the method to be added - pairs of type, then name
-
setParameters
- Parameters:
parameters- The parameters used in the method - pairs of type, then name
-
addThrowType
- Parameters:
throwType- A type that can be thrown to add to the method
-
addThrowTypes
- Parameters:
throwTypes- Types that can be thrown to add to the method
-
setThrowTypes
- Parameters:
throwTypes- The types that can be thrown by the method
-
addLine
- Parameters:
line- An actual line of code to add to the method
-
addLines
- Parameters:
lines- Actual lines of code to add to the method
-
setLines
- Parameters:
lines- The actual lines of code in the method
-