APIdia Launch Partner
Top Description Methods
com.sun.tools.javac.parser

public Interface Parser

Known Direct Implementers
com.sun.tools.javac.parser.JavacParser
Imports
com.sun.tools.javac.tree.JCTree.JCCompilationUnit, .JCTree.JCExpression, .JCTree.JCStatement

Reads syntactic units from source code. Parsers are normally created from a ParserFactory.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Method Summary

Modifier and TypeMethod and Description
public JCTree.JCCompilationUnit

Returns:

a compilation unit
parseCompilationUnit
()

Parse a compilation unit.

public JCTree.JCExpression

Returns:

an expression
parseExpression
()

Parse an expression.

public JCTree.JCStatement

Returns:

an expression
parseStatement
()

Parse a statement.

public JCTree.JCExpression

Returns:

an expression for a type
parseType
()

Parse a type.

Method Detail

parseCompilationUnitback to summary
public JCTree.JCCompilationUnit parseCompilationUnit()

Parse a compilation unit.

Returns:JCTree.JCCompilationUnit

a compilation unit

parseExpressionback to summary
public JCTree.JCExpression parseExpression()

Parse an expression.

Returns:JCTree.JCExpression

an expression

parseStatementback to summary
public JCTree.JCStatement parseStatement()

Parse a statement.

Returns:JCTree.JCStatement

an expression

parseTypeback to summary
public JCTree.JCExpression parseType()

Parse a type.

Returns:JCTree.JCExpression

an expression for a type