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.6
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
    • setTypeParameters

      public void setTypeParameters(List<JavaTypeParameter> typeParameters)
      Parameters:
      typeParameters - Any type parameters for the method
    • setTypeParameters

      public void setTypeParameters(String typeParametersString)
      Parameters:
      typeParametersString - A String representing any type parameters for the method
    • addTypeParameters

      public void addTypeParameters(List<JavaTypeParameter> typeParameters)
      Parameters:
      typeParameters - Type parameters to be added to the method
    • addTypeParameters

      public void addTypeParameters(String typeParametersString)
      Parameters:
      typeParametersString - A String representing type parameters to be added to the method
    • addTypeParameter

      public void addTypeParameter(JavaTypeParameter typeParameter)
      Parameters:
      typeParameter - A type parameter to be added to the method
    • setReturnType

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

      public void setReturnType(String returnTypeText)
      Parameters:
      returnTypeText - The text of the return type of the method to be parsed
    • setName

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

      public void addParameter(String parameterText)
      Parameters:
      parameterText - The text of the parameter, to be parsed and added
    • addParameter

      public void addParameter(JavaParameter parameter)
      Parameters:
      parameter - A parameter used in the method to be added
    • addParameters

      public void addParameters(List<JavaParameter> parameters)
      Parameters:
      parameters - Parameters used in the method to be added
    • setParameters

      public void setParameters(List<JavaParameter> parameters)
      Parameters:
      parameters - The parameters used in the method
    • 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