Package io.github.classgraph.utils
Class TypeUtils
- java.lang.Object
-
- io.github.classgraph.utils.TypeUtils
-
public class TypeUtils extends Object
Utilities for parsing Java type descriptors and type signatures.- Author:
- lukehutch
-
-
Constructor Summary
Constructors Constructor Description TypeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
getIdentifierToken(Parser parser)
Parse a Java identifier part (between separators and other non-alphanumeric characters).static boolean
getIdentifierToken(Parser parser, char separator, char separatorReplace)
Parse a Java identifier with the given separator ('.' or '/').
-
-
-
Method Detail
-
getIdentifierToken
public static boolean getIdentifierToken(Parser parser, char separator, char separatorReplace) throws Parser.ParseException
Parse a Java identifier with the given separator ('.' or '/'). Potentially replaces the separator with a different character. Appends the identifier to the token buffer in the parser.- Parameters:
parser
- The parser.separator
- The separator character.separatorReplace
- The character to replace the separator with.- Returns:
- true if at least one identifier character was parsed.
- Throws:
Parser.ParseException
- If the parser ran out of input.
-
getIdentifierToken
public static boolean getIdentifierToken(Parser parser) throws Parser.ParseException
Parse a Java identifier part (between separators and other non-alphanumeric characters). Appends the identifier to the token buffer in the parser.- Parameters:
parser
- The parser.- Returns:
- true if at least one identifier character was parsed.
- Throws:
Parser.ParseException
- If the parser ran out of input.
-
-