Class JavaMethodParser

java.lang.Object
com.github.tadukoo.java.parsing.AbstractJavaParser
com.github.tadukoo.java.parsing.codetypes.JavaMethodParser
All Implemented Interfaces:
JavaTokens

public class JavaMethodParser extends AbstractJavaParser
A parser used for parsing methods in Java
Since:
Beta v.0.5
Version:
Beta v.0.6
Author:
Logan Ferree (Tadukoo)
  • Method Details

    • parseMethod

      public static JavaMethod parseMethod(String content) throws JavaParsingException
      Parses a method from the given content String
      Parameters:
      content - The String of content to parse into a method
      Returns:
      The method parsed from the given String
      Throws:
      JavaParsingException - If anything goes wrong in parsing
    • parseMethod

      public static ParsingPojo parseMethod(List<String> tokens, int startToken) throws JavaParsingException
      Parses a method from the given tokens and starting index
      Parameters:
      tokens - The List of tokens to be parsed
      startToken - The index of the token to start parsing at
      Returns:
      A ParsingPojo containing where we stopped parsing and the method
      Throws:
      JavaParsingException - If anything goes wrong during parsing
    • parseJustMethod

      public static JavaMethod parseJustMethod(String content)
      Parses a Java Method (not counting any Javadoc before it, just the method itself)
      Parameters:
      content - The text to be parsed into a method)
      Returns:
      The parsed method, or null if we don't have a method