com.github.javaparser.ParseStart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stubparser Show documentation
Show all versions of stubparser Show documentation
This project contains a parser for the Checker Framework's stub files: https://checkerframework.org/manual/#stub . It is a fork of the JavaParser project.
The newest version!
/*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2024 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* b) the terms of the Apache License
*
* You should have received a copy of both licenses in LICENCE.LGPL and
* LICENCE.APACHE. Please refer to those files for details.
*
* JavaParser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
package com.github.javaparser;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.ImportDeclaration;
import com.github.javaparser.ast.PackageDeclaration;
import com.github.javaparser.ast.StubUnit;
import com.github.javaparser.ast.body.BodyDeclaration;
import com.github.javaparser.ast.body.MethodDeclaration;
import com.github.javaparser.ast.body.Parameter;
import com.github.javaparser.ast.body.TypeDeclaration;
import com.github.javaparser.ast.expr.*;
import com.github.javaparser.ast.modules.ModuleDeclaration;
import com.github.javaparser.ast.modules.ModuleDirective;
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt;
import com.github.javaparser.ast.stmt.Statement;
import com.github.javaparser.ast.type.ClassOrInterfaceType;
import com.github.javaparser.ast.type.Type;
import com.github.javaparser.ast.type.TypeParameter;
/**
* The start production for JavaParser.
* Tells JavaParser what piece of Java code it can expect.
* For example,
* COMPILATION_UNIT indicates a complete Java file,
* and CLASS_BODY would indicate the part of a class that is within { and }.
*
* @see JavaParser#parse(ParseStart, Provider)
*/
@FunctionalInterface
public interface ParseStart {
ParseStart STUB_UNIT = GeneratedJavaParser::StubUnit;
ParseStart COMPILATION_UNIT = GeneratedJavaParser::CompilationUnit;
ParseStart BLOCK = GeneratedJavaParser::BlockParseStart;
ParseStart STATEMENT = GeneratedJavaParser::BlockStatementParseStart;
ParseStart IMPORT_DECLARATION = GeneratedJavaParser::ImportDeclarationParseStart;
ParseStart EXPRESSION = GeneratedJavaParser::ExpressionParseStart;
ParseStart ANNOTATION = GeneratedJavaParser::AnnotationParseStart;
ParseStart> ANNOTATION_BODY = GeneratedJavaParser::AnnotationBodyDeclarationParseStart;
ParseStart> CLASS_BODY = GeneratedJavaParser::ClassOrInterfaceBodyDeclarationParseStart;
ParseStart CLASS_OR_INTERFACE_TYPE = GeneratedJavaParser::ClassOrInterfaceTypeParseStart;
ParseStart TYPE = GeneratedJavaParser::ResultTypeParseStart;
ParseStart TYPE_PARAMETER = GeneratedJavaParser::TypeParameterParseStart;
ParseStart VARIABLE_DECLARATION_EXPR =
GeneratedJavaParser::VariableDeclarationExpressionParseStart;
ParseStart EXPLICIT_CONSTRUCTOR_INVOCATION_STMT =
GeneratedJavaParser::ExplicitConstructorInvocationParseStart;
ParseStart NAME = GeneratedJavaParser::NameParseStart;
ParseStart SIMPLE_NAME = GeneratedJavaParser::SimpleNameParseStart;
ParseStart PARAMETER = GeneratedJavaParser::ParameterParseStart;
ParseStart PACKAGE_DECLARATION = GeneratedJavaParser::PackageDeclarationParseStart;
ParseStart> TYPE_DECLARATION = GeneratedJavaParser::TypeDeclarationParseStart;
ParseStart MODULE_DECLARATION = GeneratedJavaParser::ModuleDeclarationParseStart;
ParseStart MODULE_DIRECTIVE = GeneratedJavaParser::ModuleDirectiveParseStart;
ParseStart METHOD_DECLARATION = GeneratedJavaParser::MethodDeclarationParseStart;
ParseStart ARRAY_INITIALIZER_EXPR = GeneratedJavaParser::ArrayInitializer;
R parse(GeneratedJavaParser parser) throws ParseException;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy