update copyright
[fedora-idea.git] / java / java-impl / src / com / intellij / psi / impl / java / stubs / JavaImportListElementType.java
blob3e5af73ef75f1f5afc516f29a908ff863230d325
1 /*
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.
18 * @author max
20 package com.intellij.psi.impl.java.stubs;
22 import com.intellij.lang.ASTNode;
23 import com.intellij.psi.PsiImportList;
24 import com.intellij.psi.impl.java.stubs.impl.PsiImportListStubImpl;
25 import com.intellij.psi.impl.source.PsiImportListImpl;
26 import com.intellij.psi.stubs.IndexSink;
27 import com.intellij.psi.stubs.StubElement;
28 import com.intellij.psi.stubs.StubOutputStream;
29 import com.intellij.psi.stubs.StubInputStream;
30 import com.intellij.util.io.PersistentStringEnumerator;
32 import java.io.IOException;
34 public class JavaImportListElementType extends JavaStubElementType<PsiImportListStub, PsiImportList> {
35 public JavaImportListElementType() {
36 super("IMPORT_LIST");
39 public PsiImportList createPsi(final PsiImportListStub stub) {
40 assert !isCompiled(stub);
41 return new PsiImportListImpl(stub);
44 public PsiImportList createPsi(final ASTNode node) {
45 return new PsiImportListImpl(node);
48 public PsiImportListStub createStub(final PsiImportList psi, final StubElement parentStub) {
49 return new PsiImportListStubImpl(parentStub);
52 public void serialize(final PsiImportListStub stub, final StubOutputStream dataStream)
53 throws IOException {
56 public PsiImportListStub deserialize(final StubInputStream dataStream, final StubElement parentStub)
57 throws IOException {
58 return new PsiImportListStubImpl(parentStub);
61 public void indexStub(final PsiImportListStub stub, final IndexSink sink) {