IJavaBuilder
public class ComponentsBuilder extends Resource implements IJavaBuilder
IJavaComponent
for the
supported folder structure.IJavaBuilder.Initializer
Modifier and Type | Field | Description |
---|---|---|
protected static java.util.logging.Logger |
logger |
INSTANCE
Constructor | Description |
---|---|
ComponentsBuilder() |
Modifier and Type | Method | Description |
---|---|---|
<T> T |
as(java.lang.Class<T> clz) |
Retrieve a typed representation of the resource.
|
void |
invalidate() |
This method gets called whenever a dependency resource has been invalidated or this resource needs
to be invalidated.
|
void |
make(IComponentDescriptor cd,
java.io.File originFolder,
java.io.File instanceFolder,
java.util.logging.Logger exLogger) |
Note: we synchronize here, as we have to traverse the component graph and use file locks
to avoid cross-process overwrites.
|
void |
setCompiler(ICompiler compiler) |
|
void |
setOffline(boolean offline) |
public <T> T as(java.lang.Class<T> clz)
com.zfabrik.resources.provider.Resource
public void invalidate() throws ResourceBusyException
com.zfabrik.resources.provider.Resource
This code should be executed in a life cycle code block of this resource instance, i.e. where dependencies are effectively managed, so that race conditions can be avoided.
State changing methods of a resource should always be synchronized (e.g. on this). This is
in particular true for cross-resource dependencies. In order to assure consistency under race conditions,
a dependent resource should first declare its dependency and then retrieve the resource implementation.
In case of failures, resources should clean up by calling handle().invalidate(true);
invalidate
in class Resource
ResourceBusyException
public void setCompiler(ICompiler compiler)
public void setOffline(boolean offline)
public void make(IComponentDescriptor cd, java.io.File originFolder, java.io.File instanceFolder, java.util.logging.Logger exLogger)
make
in interface IJavaBuilder
originFolder
- Folder holding Java component resources as provided by the component repositoryinstanceFolder
- Folder for instance specific resources. Origin resources will be copied and modified by compilation