JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.core.infer
Interface InferrenceProvider

All Known Implementing Classes:
DefaultInferrenceProvider

public interface InferrenceProvider

Implemented by contributors to the org.eclipse.wst.jsdt.core.infer.inferrenceSupport extension point Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Field Summary
static int MAYBE_THIS
           Indicates that this InferrenceProvider, and its engine, should also apply to a script file.
static int NOT_THIS
           Indicates that this InferrenceProvider, and its engine, do not apply to a script file.
static int ONLY_THIS
           Indicates that this InferrenceProvider, and its engine, are the only ones that should apply to a script file.
 
Method Summary
 int applysTo(IInferenceFile scriptFile)
          Determine if this inference provider applies to a script
 String getID()
          Get the inference provider ID
 IInferEngine getInferEngine()
          Get the inference engine for this inference provider, or null if one will not be provided.
 RefactoringSupport getRefactoringSupport()
           
 ResolutionConfiguration getResolutionConfiguration()
           
 

Field Detail

ONLY_THIS

static final int ONLY_THIS

Indicates that this InferrenceProvider, and its engine, are the only ones that should apply to a script file.

Its use is discouraged.

See Also:
Constant Field Values

NOT_THIS

static final int NOT_THIS

Indicates that this InferrenceProvider, and its engine, do not apply to a script file.

See Also:
Constant Field Values

MAYBE_THIS

static final int MAYBE_THIS

Indicates that this InferrenceProvider, and its engine, should also apply to a script file. As multiple providers may be required and used to completely understand a script file, this value is suggested as a default. Care should then be taken to avoid duplicating the contributions of the default provider.

See Also:
Constant Field Values
Method Detail

getInferEngine

IInferEngine getInferEngine()
Get the inference engine for this inference provider, or null if one will not be provided. Implementors returning null are expected to have returned NOT_THIS from all calls to getInferEngine()

Returns:
an inference engine

applysTo

int applysTo(IInferenceFile scriptFile)
Determine if this inference provider applies to a script

Parameters:
scriptFile - the script on which the inferencing will be done
Returns:
ONLY_THIS, NOT_THIS, MAYBE_THIS depending on how much this inference provider applies to the specified script. See the documentation for each constant for when each should be used.

getID

String getID()
Get the inference provider ID

Returns:
the id of this inference provider

getResolutionConfiguration

ResolutionConfiguration getResolutionConfiguration()
Returns:
the ResolutionConfiguration used to resolve the inferred classes

getRefactoringSupport

RefactoringSupport getRefactoringSupport()
Returns:
the RefactoringSupport used to provide refactoring for inferred types, or null if it is not offered.

JavaScript Development Tools
Release 3.2

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