2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com
.intellij
.psi
.impl
.source
.parsing
;
18 import com
.intellij
.psi
.impl
.source
.ParsingContext
;
19 import com
.intellij
.util
.CharTable
;
20 import com
.intellij
.pom
.java
.LanguageLevel
;
23 * Created by IntelliJ IDEA.
27 * To change this template use File | Settings | File Templates.
29 public class JavaParsingContext
extends ParsingContext
{
30 private final DeclarationParsing myDeclarationParsing
;
31 private final ExpressionParsing myExpressionParsing
;
32 private final ClassBodyParsing myClassBodyParsing
;
33 private final StatementParsing myStatementParsing
;
34 private final ImportsTextParsing myImportsParsing
;
35 private final FileTextParsing myFileTextParsing
;
36 private final JavadocParsing myJavadocParsing
;
37 private final LanguageLevel myLanguageLevel
;
39 public JavaParsingContext(CharTable table
, LanguageLevel languageLevel
) {
41 myLanguageLevel
= languageLevel
;
42 myStatementParsing
= new StatementParsing(this);
43 myDeclarationParsing
= new DeclarationParsing(this);
44 myExpressionParsing
= new ExpressionParsing(this);
45 myClassBodyParsing
= new ClassBodyParsing(this);
46 myImportsParsing
= new ImportsTextParsing(this);
47 myFileTextParsing
= new FileTextParsing(this);
48 myJavadocParsing
= new JavadocParsing(this);
51 public StatementParsing
getStatementParsing() {
52 return myStatementParsing
;
55 public DeclarationParsing
getDeclarationParsing() {
56 return myDeclarationParsing
;
59 public ExpressionParsing
getExpressionParsing() {
60 return myExpressionParsing
;
63 public ClassBodyParsing
getClassBodyParsing() {
64 return myClassBodyParsing
;
67 public ImportsTextParsing
getImportsTextParsing() {
68 return myImportsParsing
;
71 public FileTextParsing
getFileTextParsing() {
72 return myFileTextParsing
;
75 public JavadocParsing
getJavadocParsing() {
76 return myJavadocParsing
;
79 public LanguageLevel
getLanguageLevel() {
80 return myLanguageLevel
;