Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.core.dom.rewrite
Class ImportRewrite.ImportRewriteContext

java.lang.Object
  extended by 
org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext
Enclosing class:
ImportRewrite

public abstract static class ImportRewrite.ImportRewriteContext
extends Object

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 ( String qualifier, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RES_NAME_FOUND

public static final int RES_NAME_FOUND
Result constant signaling that the given element is know in the context.

See Also:
Constant Field Values

RES_NAME_UNKNOWN

public static final int RES_NAME_UNKNOWN
Result constant signaling that the given element is not know in the context.

See Also:
Constant Field Values

RES_NAME_CONFLICT

public static final int RES_NAME_CONFLICT
Result constant signaling that the given element is conflicting with an other element in the context.

See Also:
Constant Field Values

KIND_TYPE

public static final int KIND_TYPE
Kind constant specifying that the element is a type import.

See Also:
Constant Field Values

KIND_STATIC_FIELD

public static final int KIND_STATIC_FIELD
Kind constant specifying that the element is a static field import.

See Also:
Constant Field Values

KIND_STATIC_METHOD

public static final int KIND_STATIC_METHOD
Kind constant specifying that the element is a static method import.

See Also:
Constant Field Values
Constructor Detail

ImportRewrite.ImportRewriteContext

public ImportRewrite.ImportRewriteContext()
Method Detail

findInContext

public abstract int findInContext(
String qualifier,
                                  
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.

Parameters:
qualifier - The qualifier of the element, can be package or the qualified name of a type
name - 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.
Returns:
Returns the result of the lookup. Can be either RES_NAME_FOUND, RES_NAME_UNKNOWN or RES_NAME_CONFLICT.

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire