Documentation ¶
Overview ¶
Package parser provides functions to parse Java code and reason about its contents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractClassNameFromQualifiedName ¶
ExtractClassNameFromQualifiedName returns a top-level class name from parts and the index of the top-level part. If the class has an unconventional name (see below), returns an empty string and -1. By "class name" we mean a Java name according to convention, e.g. com.google.Foo. That is, a potentially empty package prefix (all lower case), then a top-level class name (starting with a capital letter).
func ReferencedClasses ¶
func ReferencedClasses(ctx context.Context, javaFileNames []string, implicitImports []string) []jadeplib.ClassName
ReferencedClasses returns the set of class names that the provided Java source files reference. This includes (a) imports (b) simple names we think are class names, which are assumed to be in the same package (c) fully-qualified names. implicitImports is a sorted slice of classes that do not require an import. In Java, these are the classes in java.lang, such as "System" and "Integer".
Types ¶
This section is empty.