com.intellij.openapi.compiler
Interface FileProcessingCompiler

All Superinterfaces:
Compiler, ValidityStateFactory
All Known Subinterfaces:
ClassInstrumentingCompiler, ClassPostProcessingCompiler, PackagingCompiler, SourceInstrumentingCompiler, Validator
All Known Implementing Classes:
CopyingCompiler

public interface FileProcessingCompiler
extends Compiler, ValidityStateFactory

A base interface describing shared functionality for various types of file processing compilers. Actual compiler implementation should implement one of these: ClassInstrumentingCompiler, ClassPostProcessingCompiler, SourceInstrumentingCompiler.


Nested Class Summary
static interface FileProcessingCompiler.ProcessingItem
          Describes a processing unit for this compiler - a virtual file with associated state.
 
Method Summary
 FileProcessingCompiler.ProcessingItem[] getProcessingItems(CompileContext context)
          Returns the items which will be processed in the current compile operation.
 FileProcessingCompiler.ProcessingItem[] process(CompileContext context, FileProcessingCompiler.ProcessingItem[] items)
          Compiles the specified items.
 
Methods inherited from interface com.intellij.openapi.compiler.Compiler
getDescription, validateConfiguration
 
Methods inherited from interface com.intellij.openapi.compiler.ValidityStateFactory
createValidityState
 

Method Detail

getProcessingItems

@NotNull
FileProcessingCompiler.ProcessingItem[] getProcessingItems(CompileContext context)
Returns the items which will be processed in the current compile operation. The method is called before the call to process(com.intellij.openapi.compiler.CompileContext, com.intellij.openapi.compiler.FileProcessingCompiler.ProcessingItem[]) method

Parameters:
context - the current compilation context.
Returns:
a non-null array of all items that potentially can be processed at the moment of method call. Even if the file is not changed, it should be returned if it _can_ be processed by the compiler implementing the interface.

process

FileProcessingCompiler.ProcessingItem[] process(CompileContext context,
                                                FileProcessingCompiler.ProcessingItem[] items)
Compiles the specified items.

Parameters:
context - the current compilation context.
items - items to be processed, selected by make subsystem. The items are selected from the list returned by the getProcessingItems(com.intellij.openapi.compiler.CompileContext) method.
Returns:
successfully processed items.