public class CompilerConfigurationImpl extends CompilerConfiguration implements PersistentStateComponent<Element>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUILD_PROCESS_HEAP_SIZE |
static java.lang.String |
TESTS_EXTERNAL_COMPILER_HOME_PROPERTY_NAME |
Constructor and Description |
---|
CompilerConfigurationImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
addModuleProcessorProfile(ProcessorConfigProfile profile) |
void |
addResourceFilePattern(java.lang.String namePattern) |
void |
convertPatterns() |
protected ExcludedEntriesConfiguration |
createExcludedEntriesConfiguration(Project project) |
ProcessorConfigProfile |
findModuleProcessorProfile(java.lang.String name) |
java.util.List<java.lang.String> |
getAdditionalOptions(Module module)
Returns additional compiler options applicable to the given module, if any.
|
ProcessorConfigProfile |
getAnnotationProcessingConfiguration(Module module) |
int |
getBuildProcessHeapSize(int javacPreferredHeapSize) |
java.lang.String |
getBuildProcessVMOptions() |
java.lang.String |
getBytecodeTargetLevel(Module module) |
BackendCompiler |
getDefaultCompiler() |
ProcessorConfigProfile |
getDefaultProcessorProfile() |
ExcludesConfiguration |
getExcludedEntriesConfiguration() |
JavacCompiler |
getJavacCompiler() |
java.util.List<ProcessorConfigProfile> |
getModuleProcessorProfiles() |
java.util.Map<java.lang.String,java.lang.String> |
getModulesBytecodeTargetMap() |
java.lang.String |
getProjectBytecodeTarget() |
java.util.Collection<BackendCompiler> |
getRegisteredJavaCompilers() |
java.lang.String[] |
getResourceFilePatterns() |
Element |
getState() |
static java.lang.String |
getTestsExternalCompilerHome() |
boolean |
isAddNotNullAssertions() |
boolean |
isAnnotationProcessorsEnabled()
Returns true if at least one enabled annotation processing profile exists.
|
boolean |
isCompilableResourceFile(Project project,
VirtualFile file) |
boolean |
isExcludedFromCompilation(VirtualFile virtualFile) |
static boolean |
isPatternNegated(java.lang.String wildcardPattern) |
boolean |
isResourceFile(java.lang.String name) |
boolean |
isResourceFile(VirtualFile virtualFile) |
void |
loadState(Element parentNode)
This method is called when new component state is loaded.
|
void |
removeModuleProcessorProfile(ProcessorConfigProfile profile) |
void |
removeResourceFilePatterns() |
void |
setAdditionalOptions(JpsJavaCompilerOptions settings,
Module module,
java.util.List<java.lang.String> options) |
void |
setAdditionalOptions(Module module,
java.util.List<java.lang.String> options) |
void |
setAddNotNullAssertions(boolean enabled) |
void |
setBuildProcessHeapSize(int size) |
void |
setBuildProcessVMOptions(java.lang.String options) |
void |
setBytecodeTargetLevel(Module module,
java.lang.String level) |
void |
setDefaultCompiler(BackendCompiler defaultCompiler) |
void |
setDefaultProcessorProfile(ProcessorConfigProfile profile) |
void |
setModuleProcessorProfiles(java.util.Collection<? extends ProcessorConfigProfile> moduleProfiles) |
void |
setModulesBytecodeTargetMap(java.util.Map<java.lang.String,java.lang.String> mapping) |
void |
setProjectBytecodeTarget(java.lang.String level) |
void |
setUseReleaseOption(boolean useReleaseOption) |
boolean |
useReleaseOption()
Specifies whether '--release' cross-compilation option should be used.
|
getInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public static final java.lang.String TESTS_EXTERNAL_COMPILER_HOME_PROPERTY_NAME
public static final int DEFAULT_BUILD_PROCESS_HEAP_SIZE
public CompilerConfigurationImpl(Project project)
protected ExcludedEntriesConfiguration createExcludedEntriesConfiguration(Project project)
public Element getState()
getState
in interface PersistentStateComponent<Element>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public int getBuildProcessHeapSize(int javacPreferredHeapSize)
getBuildProcessHeapSize
in class CompilerConfiguration
public void setBuildProcessHeapSize(int size)
setBuildProcessHeapSize
in class CompilerConfiguration
public java.lang.String getBuildProcessVMOptions()
getBuildProcessVMOptions
in class CompilerConfiguration
public void setBuildProcessVMOptions(java.lang.String options)
setBuildProcessVMOptions
in class CompilerConfiguration
public void setProjectBytecodeTarget(java.lang.String level)
setProjectBytecodeTarget
in class CompilerConfiguration
public java.lang.String getProjectBytecodeTarget()
getProjectBytecodeTarget
in class CompilerConfiguration
public boolean useReleaseOption()
CompilerConfiguration
useReleaseOption
in class CompilerConfiguration
public void setUseReleaseOption(boolean useReleaseOption)
setUseReleaseOption
in class CompilerConfiguration
public void setModulesBytecodeTargetMap(java.util.Map<java.lang.String,java.lang.String> mapping)
public java.util.Map<java.lang.String,java.lang.String> getModulesBytecodeTargetMap()
public void setBytecodeTargetLevel(Module module, java.lang.String level)
setBytecodeTargetLevel
in class CompilerConfiguration
public java.lang.String getBytecodeTargetLevel(Module module)
getBytecodeTargetLevel
in class CompilerConfiguration
public java.util.List<java.lang.String> getAdditionalOptions(Module module)
CompilerConfiguration
getAdditionalOptions
in class CompilerConfiguration
public void setAdditionalOptions(Module module, java.util.List<java.lang.String> options)
setAdditionalOptions
in class CompilerConfiguration
public void setAdditionalOptions(JpsJavaCompilerOptions settings, Module module, java.util.List<java.lang.String> options)
public static java.lang.String getTestsExternalCompilerHome()
public JavacCompiler getJavacCompiler()
public java.util.Collection<BackendCompiler> getRegisteredJavaCompilers()
public java.lang.String[] getResourceFilePatterns()
public void addResourceFilePattern(java.lang.String namePattern) throws MalformedPatternException
addResourceFilePattern
in class CompilerConfiguration
MalformedPatternException
public ExcludesConfiguration getExcludedEntriesConfiguration()
getExcludedEntriesConfiguration
in class CompilerConfiguration
public boolean isExcludedFromCompilation(VirtualFile virtualFile)
isExcludedFromCompilation
in class CompilerConfiguration
public boolean isResourceFile(VirtualFile virtualFile)
isResourceFile
in class CompilerConfiguration
public boolean isAddNotNullAssertions()
isAddNotNullAssertions
in class CompilerConfiguration
public void setAddNotNullAssertions(boolean enabled)
setAddNotNullAssertions
in class CompilerConfiguration
public ProcessorConfigProfile getDefaultProcessorProfile()
public void setDefaultProcessorProfile(ProcessorConfigProfile profile)
public java.util.List<ProcessorConfigProfile> getModuleProcessorProfiles()
public void setModuleProcessorProfiles(java.util.Collection<? extends ProcessorConfigProfile> moduleProfiles)
public ProcessorConfigProfile findModuleProcessorProfile(java.lang.String name)
public void removeModuleProcessorProfile(ProcessorConfigProfile profile)
public void addModuleProcessorProfile(ProcessorConfigProfile profile)
public ProcessorConfigProfile getAnnotationProcessingConfiguration(Module module)
getAnnotationProcessingConfiguration
in class CompilerConfiguration
public boolean isAnnotationProcessorsEnabled()
CompilerConfiguration
isAnnotationProcessorsEnabled
in class CompilerConfiguration
public void removeResourceFilePatterns()
public static boolean isPatternNegated(java.lang.String wildcardPattern)
public boolean isResourceFile(java.lang.String name)
isResourceFile
in class CompilerConfiguration
public void loadState(Element parentNode)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<Element>
parentNode
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public BackendCompiler getDefaultCompiler()
public void setDefaultCompiler(BackendCompiler defaultCompiler)
defaultCompiler
- The compiler that is passed as a parameter to setDefaultCompiler()
must be one of the registered compilers in compiler configuration.
Otherwise because of lazy compiler initialization, the value of default compiler will point to some other compiler instancepublic void convertPatterns()
public boolean isCompilableResourceFile(Project project, VirtualFile file)
isCompilableResourceFile
in class CompilerConfiguration