org.eclipse.wst.jsdt.core.compiler

## Class BuildContext

- java.lang.Object
- - org.eclipse.wst.jsdt.internal.core.builder.ValidationParticipantResult
  - - org.eclipse.wst.jsdt.core.compiler.BuildContext

    public class BuildContext
    extends org.eclipse.wst.jsdt.internal.core.builder.ValidationParticipantResult

The context of a validation event that is notified to interested validation participants when {@link ValidationParticipant#buildStarting(BuildContext[], boolean) a build is starting.

This class is not intended to be instanciated or subclassed by clients.

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

### Fields inherited from class org.eclipse.wst.jsdt.internal.core.builder.ValidationParticipantResult

`addedFiles, deletedFiles, dependencies, problems, sourceFile`

### Constructor Summary

Constructors
Constructor and Description
`BuildContext(org.eclipse.wst.jsdt.internal.core.builder.SourceFile sourceFile)` Creates a build context for the given source file.

### Method Summary

All Methods Instance Methods Concrete Methods
`char[]` `getContents()` Returns the contents of the javaScript unit.
`IFile` `getFile()` Returns the `IFile` representing the javaScript unit.
`void` `recordAddedGeneratedFiles(IFile[] addedGeneratedFiles)` Record the added/changed generated files that need to be compiled.
`void` `recordDeletedGeneratedFiles(IFile[] deletedGeneratedFiles)` Record the generated files that need to be deleted.
`void` `recordDependencies(java.lang.String[] typeNameDependencies)` Record the fully-qualified type names of any new dependencies, each name is of the form "p1.p2.A.B".
`void` `recordNewProblems(CategorizedProblem[] newProblems)` Record new problems to report against this compilationUnit.

### Methods inherited from class org.eclipse.wst.jsdt.internal.core.builder.ValidationParticipantResult

`toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### BuildContext

    public BuildContext(org.eclipse.wst.jsdt.internal.core.builder.SourceFile sourceFile)

Creates a build context for the given source file.

This constructor is not intended to be called by clients.

Parameters:
  `sourceFile` - the source file being built

### Method Detail

#### getContents

    public char[] getContents()

Returns the contents of the javaScript unit.

Returns:
  the contents of the javaScript unit

#### getFile

    public IFile getFile()

Returns the `IFile` representing the javaScript unit.

Returns:
  the `IFile` representing the javaScript unit

#### recordAddedGeneratedFiles

    public void recordAddedGeneratedFiles(IFile[] addedGeneratedFiles)

Record the added/changed generated files that need to be compiled.

Parameters:
  `addedGeneratedFiles` - the added/changed files

#### recordDeletedGeneratedFiles

    public void recordDeletedGeneratedFiles(IFile[] deletedGeneratedFiles)

Record the generated files that need to be deleted.

Parameters:
  `deletedGeneratedFiles` - the files that need to be deleted

#### recordDependencies

    public void recordDependencies(java.lang.String[] typeNameDependencies)

Record the fully-qualified type names of any new dependencies, each name is of the form "p1.p2.A.B".

Parameters:
  `typeNameDependencies` - the fully-qualified type names of new dependencies

#### recordNewProblems

    public void recordNewProblems(CategorizedProblem[] newProblems)

Record new problems to report against this compilationUnit. Markers are persisted for these problems only for the declared managed marker type (see the 'validationParticipant' extension point).

Parameters:
  `newProblems` - the problems to report