|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.psi.tree.IElementType
public class IElementType
Interface for token types returned from lexical analysis and for types of nodes in the AST tree. All used element types are added to a registry which can be enumerated or accessed by index.
Lexer.getTokenType(),
ASTNode.getElementType()| Nested Class Summary | |
|---|---|
static interface |
IElementType.Predicate
Predicate for matching element types. |
| Field Summary | |
|---|---|
static IElementType[] |
EMPTY_ARRAY
|
static IElementType.Predicate |
TRUE
Default enumeration predicate which matches all token types. |
| Constructor Summary | |
|---|---|
|
IElementType(java.lang.String debugName,
Language language)
Creates and registers a new element type for the specified language. |
protected |
IElementType(java.lang.String debugName,
Language language,
boolean register)
|
| Method Summary | |
|---|---|
static IElementType[] |
enumerate(IElementType.Predicate p)
Enumerates all registered token types which match the specified predicate. |
static IElementType |
find(short idx)
Returns the element type registered at the specified index. |
short |
getIndex()
Returns the index of the element type in the table of all registered element types. |
Language |
getLanguage()
Returns the language associated with the element type. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final IElementType.Predicate TRUE
enumerate(com.intellij.psi.tree.IElementType.Predicate)public static final IElementType[] EMPTY_ARRAY
| Constructor Detail |
|---|
public IElementType(@NotNull@NonNls
java.lang.String debugName,
@NotNull
Language language)
debugName - the name of the element type, used for debugging purposes.language - the language with which the element type is associated.
protected IElementType(java.lang.String debugName,
Language language,
boolean register)
| Method Detail |
|---|
public static IElementType[] enumerate(IElementType.Predicate p)
p - the predicate which should be matched by the element types.
@NotNull public Language getLanguage()
public final short getIndex()
public java.lang.String toString()
toString in class java.lang.Objectpublic static IElementType find(short idx)
idx - the indx for which the element type should be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||