More c stubs.
[fedora-idea.git] / lang-api / src / com / intellij / psi / stubs / NamedStubBase.java
blob6632aa25d6fb36df621991bc45abec456d2ef5f9
1 package com.intellij.psi.stubs;
3 import com.intellij.psi.PsiNamedElement;
4 import com.intellij.util.io.StringRef;
6 /**
7 * @author yole
8 */
9 public abstract class NamedStubBase<T extends PsiNamedElement> extends StubBase<T> implements NamedStub<T> {
10 private final StringRef myName;
12 protected NamedStubBase(StubElement parent, IStubElementType elementType, StringRef name) {
13 super(parent, elementType);
14 myName = name;
17 protected NamedStubBase(final StubElement parent, final IStubElementType elementType, final String name) {
18 this(parent, elementType, StringRef.fromString(name));
21 public String getName() {
22 return myName.getString();