|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.jsdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext
public abstract static class ImportRewrite.ImportRewriteContext
A ImportRewrite.ImportRewriteContext
can optionally be used in e.g. ImportRewrite#addImport(String, ImportRewrite.ImportRewriteContext)
to
give more information about the types visible in the scope. These types can be for example inherited inner types where it is
unnecessary to add import statements for.
This class can be implemented by clients.
Field Summary | |
---|---|
static int |
KIND_STATIC_FIELD
Kind constant specifying that the element is a static field import. |
static int |
KIND_STATIC_METHOD
Kind constant specifying that the element is a static method import. |
static int |
KIND_TYPE
Kind constant specifying that the element is a type import. |
static int |
RES_NAME_CONFLICT
Result constant signaling that the given element is conflicting with an other element in the context. |
static int |
RES_NAME_FOUND
Result constant signaling that the given element is know in the context. |
static int |
RES_NAME_UNKNOWN
Result constant signaling that the given element is not know in the context. |
Constructor Summary | |
---|---|
ImportRewrite.ImportRewriteContext()
|
Method Summary | |
---|---|
abstract int |
findInContext(java.lang.String qualifier,
java.lang.String name,
int kind)
Searches for the given element in the context and reports if the element is known ( RES_NAME_FOUND ),
unknown (RES_NAME_UNKNOWN ) or if its name conflicts (RES_NAME_CONFLICT ) with an other element. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RES_NAME_FOUND
public static final int RES_NAME_UNKNOWN
public static final int RES_NAME_CONFLICT
public static final int KIND_TYPE
public static final int KIND_STATIC_FIELD
public static final int KIND_STATIC_METHOD
Constructor Detail |
---|
public ImportRewrite.ImportRewriteContext()
Method Detail |
---|
public abstract int findInContext(java.lang.String qualifier, java.lang.String name, int kind)
RES_NAME_FOUND
),
unknown (RES_NAME_UNKNOWN
) or if its name conflicts (RES_NAME_CONFLICT
) with an other element.
qualifier
- The qualifier of the element, can be package or the qualified name of a typename
- The simple name of the element; either a type, method or field name or * for on-demand imports.kind
- The kind of the element. Can be either KIND_TYPE
, KIND_STATIC_FIELD
or
KIND_STATIC_METHOD
. Implementors should be prepared for new, currently unspecified kinds and return
RES_NAME_UNKNOWN
by default.
RES_NAME_FOUND
, RES_NAME_UNKNOWN
or
RES_NAME_CONFLICT
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |