public class ResourceBundleCompilationUnit extends CompilationUnitBase
ICompilationUnit.Operation, ICompilationUnit.UnitType| Modifier and Type | Field and Description |
|---|---|
static String |
LOCALE
Parent folder name for properties files in a swc.
|
abc, DEFAULT_DO_ABC_TAG_NAME, fileScopeRequest, problems, syntaxTreeRequest| Constructor and Description |
|---|
ResourceBundleCompilationUnit(CompilerProject project,
ISWCFileEntry fileEntry,
String qname,
String locale)
Constructor.
|
ResourceBundleCompilationUnit(CompilerProject project,
String path,
DefinitionPriority.BasePriority basePriority,
String qname,
String locale)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBundleNameInColonSyntax()
Returns the name of the bundle processed by this compilation unit.
|
ICompilationUnit.UnitType |
getCompilationUnitType() |
byte[] |
getFileContent(Collection<ICompilerProblem> problems)
Returns the content of the file processed by this compilation unit.
|
long |
getFileLastModified()
Get the time-stamp of the properties file processed by this compilation
unit.
|
String |
getLocale()
Returns the locale of the properties file associated with this
compilation unit depends on or
null if the file is not
locale dependent. |
protected IABCBytesRequestResult |
handleABCBytesRequest()
Builds a IABCBytesRequestResult.
|
protected IFileScopeRequestResult |
handleFileScopeRequest()
Builds a
IFileScopeRequestResult. |
protected IOutgoingDependenciesRequestResult |
handleOutgoingDependenciesRequest()
Builds a IOutgoingDependenciesRequestResult.
|
protected ISWFTagsRequestResult |
handleSWFTagsRequest()
Builds a ISWFTagsRequestResult.
|
protected ISyntaxTreeRequestResult |
handleSyntaxTreeRequest()
Builds a
ISyntaxTreeRequestResult. |
void |
startBuildAsync(ITarget.TargetType targetType)
This method starts to build the compilation unit asynchronously.
|
void |
waitForBuildFinish(Collection<ICompilerProblem> problems,
ITarget.TargetType targetType)
Wait till the compilation unit finishes building, and collect compiler
problems.
|
addScopeToProjectScope, clean, clearIncludedFilesFromWorkspace, clearProject, getABCBytesRequest, getAbsoluteFilename, getDefinitionPriority, getDefinitionPromises, getEmbeddedFilenames, getEncodedDebugFiles, getFilenameNoPath, getFileScopeRequest, getFileSpecificationGetter, getName, getOutgoingDependenciesRequest, getProject, getQualifiedNames, getRootFileSpecification, getShortNames, getSWFTagsRequest, getSyntaxTreeRequest, handleClean, isInvisible, makeInvisible, operationsCompleted, removeAST, setFileSpecificationGetter, startParsingImports, startProfile, stopProfile, toString, updateEmbedCompilationUnitDependencies, updateStyleCompilationUnitDependencies, verifyASTpublic static final String LOCALE
public ResourceBundleCompilationUnit(CompilerProject project, String path, DefinitionPriority.BasePriority basePriority, String qname, String locale)
project - project this compilation unit is associated withpath - path of the properties filebasePriority - base priorityqname - qualified name for the properties file that will be
processed by this comp unitlocale - the locale this compilation unit depends on or null
if the compilation unit is not locale dependentpublic ResourceBundleCompilationUnit(CompilerProject project, ISWCFileEntry fileEntry, String qname, String locale)
project - project this compilation unit is associated withfileEntry - swc entry for the properties file that will be processed
by this compilation unitqname - qualified name for the properties file that will be
processed by this comp unitlocale - the locale this compilation unit depends on or null
if the compilation unit is not locale dependentpublic ICompilationUnit.UnitType getCompilationUnitType()
public String getBundleNameInColonSyntax()
public String getLocale()
null if the file is not
locale dependent.null
if the compilation unit is not locale dependent.protected ISyntaxTreeRequestResult handleSyntaxTreeRequest() throws InterruptedException
CompilationUnitBaseISyntaxTreeRequestResult. In many cases the ISyntaxTreeRequestResult
is built by parsing a source file into a syntax tree.
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleSyntaxTreeRequest in class CompilationUnitBaseISyntaxTreeRequestResult for this compilation unit.InterruptedExceptionprotected IFileScopeRequestResult handleFileScopeRequest() throws InterruptedException
CompilationUnitBaseIFileScopeRequestResult. In many cases the
IFileScopeRequestResult is built by walking an AST produced by a parser.
Called by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleFileScopeRequest in class CompilationUnitBaseIFileScopeRequestResult for this compilation unit.InterruptedExceptionprotected IABCBytesRequestResult handleABCBytesRequest() throws InterruptedException
CompilationUnitBaseCalled by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleABCBytesRequest in class CompilationUnitBaseInterruptedExceptionprotected ISWFTagsRequestResult handleSWFTagsRequest() throws InterruptedException
CompilationUnitBaseCalled by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleSWFTagsRequest in class CompilationUnitBaseInterruptedExceptionprotected IOutgoingDependenciesRequestResult handleOutgoingDependenciesRequest() throws InterruptedException
CompilationUnitBaseCalled by this class from potentially any thread. This class guarantees that this method will only be entered from one thread at a time for a given instance of this class, so implementations do not need to make this a synchronized method.
handleOutgoingDependenciesRequest in class CompilationUnitBaseInterruptedExceptionpublic void waitForBuildFinish(Collection<ICompilerProblem> problems, ITarget.TargetType targetType) throws InterruptedException
ICompilationUnitwaitForBuildFinish in interface ICompilationUnitwaitForBuildFinish in class CompilationUnitBaseproblems - Problems from executing the requests.targetType - type of the active TargetInterruptedException - Concurrency error.ICompilationUnit.startBuildAsync(org.apache.flex.compiler.targets.ITarget.TargetType)public void startBuildAsync(ITarget.TargetType targetType)
ICompilationUnitstartBuildAsync in interface ICompilationUnitstartBuildAsync in class CompilationUnitBasetargetType - type of the active Targetpublic long getFileLastModified()
public byte[] getFileContent(Collection<ICompilerProblem> problems)
null if
any problem occurs.Copyright © 2016 The Apache Software Foundation. All rights reserved.