Class EditableJavaMethod

java.lang.Object
com.github.tadukoo.java.method.JavaMethod
com.github.tadukoo.java.method.EditableJavaMethod
All Implemented Interfaces:
JavaCodeType, JavaTokens

public class EditableJavaMethod extends JavaMethod
Represents a method in Java that can be modified
Since:
Alpha v.0.4
Version:
Beta v.0.5
Author:
Logan Ferree (Tadukoo)
  • Method Details

    • builder

      Returns:
      A new EditableJavaMethod.EditableJavaMethodBuilder to use to build a new EditableJavaMethod
    • setJavadoc

      public void setJavadoc(Javadoc javadoc)
      Parameters:
      javadoc - The Javadoc on the method
    • addAnnotation

      public void addAnnotation(JavaAnnotation annotation)
      Parameters:
      annotation - An annotation on the method to be added - must be editable
    • addAnnotations

      public void addAnnotations(List<JavaAnnotation> annotations)
      Parameters:
      annotations - annotations on the method to be added - must be editable
    • setAnnotations

      public void setAnnotations(List<JavaAnnotation> annotations)
      Parameters:
      annotations - The annotations on the method - must be editable
    • setVisibility

      public void setVisibility(Visibility visibility)
      Parameters:
      visibility - The Visibility of the method
    • setAbstract

      public void setAbstract(boolean isAbstract)
      Parameters:
      isAbstract - Whether the method is abstract or not
    • setStatic

      public void setStatic(boolean isStatic)
      Parameters:
      isStatic - Whether the method is static or not
    • setFinal

      public void setFinal(boolean isFinal)
      Parameters:
      isFinal - Whether the method is final or not
    • setReturnType

      public void setReturnType(String returnType)
      Parameters:
      returnType - The return type of the method
    • setName

      public void setName(String name)
      Parameters:
      name - The name of the method
    • addParameter

      public void addParameter(String type, String name)
      Parameters:
      type - The type of the parameter used in the method to be added
      name - The name of the parameter used in the method to be added
    • addParameter

      public void addParameter(com.github.tadukoo.util.tuple.Pair<String,String> parameter)
      Parameters:
      parameter - A parameter used in the method to be added - a pair of type, then name
    • addParameters

      public void addParameters(List<com.github.tadukoo.util.tuple.Pair<String,String>> parameters)
      Parameters:
      parameters - Parameters used in the method to be added - pairs of type, then name
    • setParameters

      public void setParameters(List<com.github.tadukoo.util.tuple.Pair<String,String>> parameters)
      Parameters:
      parameters - The parameters used in the method - pairs of type, then name
    • addThrowType

      public void addThrowType(String throwType)
      Parameters:
      throwType - A type that can be thrown to add to the method
    • addThrowTypes

      public void addThrowTypes(List<String> throwTypes)
      Parameters:
      throwTypes - Types that can be thrown to add to the method
    • setThrowTypes

      public void setThrowTypes(List<String> throwTypes)
      Parameters:
      throwTypes - The types that can be thrown by the method
    • addLine

      public void addLine(String line)
      Parameters:
      line - An actual line of code to add to the method
    • addLines

      public void addLines(List<String> lines)
      Parameters:
      lines - Actual lines of code to add to the method
    • setLines

      public void setLines(List<String> lines)
      Parameters:
      lines - The actual lines of code in the method