|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectro.isdc.wro.util.AbstractDecorator<LazyInitializer<ResourcePreProcessor>>
ro.isdc.wro.model.resource.processor.decorator.LazyProcessorDecorator
public final class LazyProcessorDecorator
Decorates a LazyInitializer which creates a processor. Allows defer the initialization of the decorated
processor, making it unnecessary dependency unless it is really used.
| Constructor Summary | |
|---|---|
LazyProcessorDecorator(LazyInitializer<ResourcePreProcessor> processor)
|
|
| Method Summary | |
|---|---|
SupportedResourceType |
getSupportedResourceType()
|
boolean |
isImportAware()
|
boolean |
isMinimize()
|
boolean |
isSupported()
|
void |
process(Reader reader,
Writer writer)
Perform actual resource processing. |
void |
process(Resource resource,
Reader reader,
Writer writer)
Process a content supplied by a reader and perform some sort of processing. |
String |
toString()
|
| Methods inherited from class ro.isdc.wro.util.AbstractDecorator |
|---|
getDecoratedObject, getOriginalDecoratedObject, getOriginalDecoratedObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LazyProcessorDecorator(LazyInitializer<ResourcePreProcessor> processor)
| Method Detail |
|---|
public void process(Resource resource,
Reader reader,
Writer writer)
throws IOException
Resource, because
this way you can ignore the other preProcessors from the chain.RuntimeException and the processing chain is interrupted (by default)WroConfiguration.isIgnoreFailingProcessor() is true)
process in interface ResourcePreProcessorresource - the original resource as it found in the model.reader - Reader used to read processed resource content.writer - Writer where used to write processed results.
IOException - when an exception occurs. The future version will change the exception type to Exception, because
any exception may occur during processing. The processing failure will be handled based on value of
WroConfiguration.isIgnoreFailingProcessor() configuration flag.
public void process(Reader reader,
Writer writer)
throws IOException
process in interface ResourcePostProcessorreader - source stream.writer - destination stream.
IOExceptionpublic SupportedResourceType getSupportedResourceType()
getSupportedResourceType in interface SupportedResourceTypeAwareSupportedResourceType to be used by processor.public boolean isMinimize()
isMinimize in interface MinimizeAwarepublic boolean isSupported()
isSupported in interface SupportAwarepublic boolean isImportAware()
isImportAware in interface ImportAwarepublic String toString()
AbstractDecorator
toString in class AbstractDecorator<LazyInitializer<ResourcePreProcessor>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||