public abstract class TranscoderBase extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
baseClassQName |
protected static String |
byteArrayNamePostfix |
static String |
CORE_PACKAGE |
protected EmbedData |
data |
protected String |
source |
protected ISWCFileEntry |
swcSource |
protected static String |
UTILS_PACKAGE |
protected Workspace |
workspace |
Modifier | Constructor and Description |
---|---|
protected |
TranscoderBase(EmbedData data,
Workspace workspace) |
Modifier and Type | Method and Description |
---|---|
boolean |
analyze(ISourceLocation location,
Collection<ICompilerProblem> problems)
Analyze the attributes
|
byte[] |
buildABC(ICompilerProject project,
Collection<ICompilerProblem> problems)
Build ABC to represent the embedded asset class
|
FileNode |
buildAST(Collection<ICompilerProblem> problems,
String filename)
Build an AST to represent the embedded asset class
|
protected DefineBinaryDataTag |
buildBinaryDataTag(Collection<ICompilerProblem> problems) |
protected boolean |
checkAttributeValues(ISourceLocation location,
Collection<ICompilerProblem> problems)
Verify the attributes are valid for the specific transcoder
|
protected abstract Map<String,ICharacterTag> |
doTranscode(Collection<ITag> tags,
Collection<ICompilerProblem> problems)
Transcode the embedded asset
|
boolean |
equals(Object o) |
String |
getBaseClassName() |
String |
getBaseClassQName() |
protected byte[] |
getDataBytes(Collection<ICompilerProblem> problems)
Read the original bytes of the embedded asset
|
protected InputStream |
getDataStream(Collection<ICompilerProblem> problems)
Get the input stream of the embedded asset
|
Map<String,ICharacterTag> |
getTags(Collection<ITag> tags,
Collection<ICompilerProblem> problems)
The relevant SWF tags
|
int |
hashCode() |
protected boolean |
setAttribute(EmbedAttribute attribute)
Stores the supported attribute of the transcoder
|
public static final String CORE_PACKAGE
protected static final String UTILS_PACKAGE
protected static final String byteArrayNamePostfix
protected final EmbedData data
protected final Workspace workspace
protected final ISWCFileEntry swcSource
protected String baseClassQName
protected String source
protected abstract Map<String,ICharacterTag> doTranscode(Collection<ITag> tags, Collection<ICompilerProblem> problems)
tags
- The collection of transcoded asset tagsproblems
- The collection of compiler problems to which this method will add problems.public Map<String,ICharacterTag> getTags(Collection<ITag> tags, Collection<ICompilerProblem> problems)
tags
- The transcoded asset tagsproblems
- The collection of compiler problems to which this method will add problems.public String getBaseClassQName()
public String getBaseClassName()
public boolean analyze(ISourceLocation location, Collection<ICompilerProblem> problems)
location
- Source location from where the embed came fromproblems
- Any problems discovered in the EmbedNodeprotected boolean setAttribute(EmbedAttribute attribute)
attribute
- protected boolean checkAttributeValues(ISourceLocation location, Collection<ICompilerProblem> problems)
location
- problems
- protected DefineBinaryDataTag buildBinaryDataTag(Collection<ICompilerProblem> problems)
protected InputStream getDataStream(Collection<ICompilerProblem> problems)
problems
- The collection of compiler problems to which this method will add problems.protected byte[] getDataBytes(Collection<ICompilerProblem> problems)
problems
- public FileNode buildAST(Collection<ICompilerProblem> problems, String filename)
problems
- The collection of compiler problems to which this method will add problems.filename
- The path to the file being embedded.public byte[] buildABC(ICompilerProject project, Collection<ICompilerProblem> problems)
project
- The compiler project.problems
- The collecton of compiler problems to which this method will add problems.Copyright © 2016 The Apache Software Foundation. All rights reserved.