parser

package
v0.0.0-...-62694dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 14 Imported by: 1

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

func ExtractClassNameFromQualifiedName(parts []string) (string, int)

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.

Directories

Path Synopsis
Package xrefs provides support for local xrefs.
Package xrefs provides support for local xrefs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL