royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-compiler] 02/05: added ICompilationUnit to common files with some tweaking of interfaces and new interfaces
Date Wed, 15 Nov 2017 20:58:18 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/rename
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 1e1512c8e07aadfef3eb1eac7ee72c49c21f1530
Author: Alex Harui <aharui@apache.org>
AuthorDate: Tue Nov 14 22:05:38 2017 -0800

    added ICompilationUnit to common files with some tweaking of interfaces and new interfaces
---
 .../compiler/common/IDefinitionPriority.java       |  0
 .../compiler/config/ApplicationDomainTarget.java   |  0
 .../apache/royale/compiler/config/RSLSettings.java |  0
 .../definitions/references/IReference.java         |  4 +-
 .../royale/compiler}/embedding/EmbedAttribute.java |  2 +-
 .../royale/compiler/embedding/IEmbedData.java      | 99 ++++++++++++++++++++++
 .../embedding/transcoders/ITranscoder.java         | 80 +++++++++++++++++
 .../royale/compiler/internal/config/FrameInfo.java |  0
 .../compiler/internal/parsing/as/OffsetCue.java    |  0
 .../compiler/internal/parsing/as/OffsetLookup.java |  3 +-
 .../internal/targets/ITargetAttributes.java        |  0
 .../apache/royale/compiler/targets/ISWFTarget.java |  0
 .../apache/royale/compiler/targets/ITarget.java    |  0
 .../compiler/targets/ITargetProgressMonitor.java   |  0
 .../royale/compiler/targets/ITargetReport.java     |  0
 .../royale/compiler/targets/ITargetSettings.java   |  0
 .../apache/royale/compiler/tree/as/IFileNode.java  |  0
 .../royale/compiler/units/ICompilationUnit.java    |  8 +-
 .../units/requests/IABCBytesRequestResult.java     |  4 +-
 .../units/requests/IFileScopeRequestResult.java    |  0
 .../IOutgoingDependenciesRequestResult.java        |  0
 .../royale/compiler/units/requests/IRequest.java   |  0
 .../compiler/units/requests/IRequestResult.java    |  0
 .../units/requests/ISWFTagsRequestResult.java      |  0
 .../units/requests/ISyntaxTreeRequestResult.java   |  0
 .../compiler/internal/embedding/EmbedData.java     |  8 +-
 .../embedding/transcoders/TranscoderBase.java      |  3 +-
 27 files changed, 194 insertions(+), 17 deletions(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/common/IDefinitionPriority.java
b/compiler-common/src/main/java/org/apache/royale/compiler/common/IDefinitionPriority.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/common/IDefinitionPriority.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/common/IDefinitionPriority.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/config/ApplicationDomainTarget.java
b/compiler-common/src/main/java/org/apache/royale/compiler/config/ApplicationDomainTarget.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/config/ApplicationDomainTarget.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/config/ApplicationDomainTarget.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/config/RSLSettings.java b/compiler-common/src/main/java/org/apache/royale/compiler/config/RSLSettings.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/config/RSLSettings.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/config/RSLSettings.java
diff --git a/compiler-common/src/main/java/org/apache/royale/compiler/definitions/references/IReference.java
b/compiler-common/src/main/java/org/apache/royale/compiler/definitions/references/IReference.java
index 4326da4..84974fe 100644
--- a/compiler-common/src/main/java/org/apache/royale/compiler/definitions/references/IReference.java
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/definitions/references/IReference.java
@@ -21,7 +21,7 @@ package org.apache.royale.compiler.definitions.references;
 
 import org.apache.royale.compiler.common.DependencyType;
 import org.apache.royale.compiler.definitions.IDefinition;
-import org.apache.royale.compiler.internal.scopes.ASScope;
+import org.apache.royale.compiler.scopes.IASScope;
 import org.apache.royale.compiler.projects.ICompilerProject;
 
 /**
@@ -66,7 +66,7 @@ public interface IReference
      * <code>with</code> scope.
      * @return The {@link IDefinition} the reference resolves to.
      */
-    IDefinition resolve(ICompilerProject project, ASScope scope,
+    IDefinition resolve(ICompilerProject project, IASScope scope,
                         DependencyType dependencyType,
                         boolean canEscapeWith);
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedAttribute.java
b/compiler-common/src/main/java/org/apache/royale/compiler/embedding/EmbedAttribute.java
similarity index 97%
rename from compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedAttribute.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/embedding/EmbedAttribute.java
index d7e5e3d..a1563fa 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedAttribute.java
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/embedding/EmbedAttribute.java
@@ -17,7 +17,7 @@
  *
  */
 
-package org.apache.royale.compiler.internal.embedding;
+package org.apache.royale.compiler.embedding;
 
 /**
  * enum to map all the attributes supported by the Embed directive
diff --git a/compiler-common/src/main/java/org/apache/royale/compiler/embedding/IEmbedData.java
b/compiler-common/src/main/java/org/apache/royale/compiler/embedding/IEmbedData.java
new file mode 100644
index 0000000..f8e2393
--- /dev/null
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/embedding/IEmbedData.java
@@ -0,0 +1,99 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.royale.compiler.embedding;
+
+import java.util.Collection;
+
+import org.apache.royale.compiler.common.ISourceLocation;
+import org.apache.royale.compiler.embedding.transcoders.ITranscoder;
+import org.apache.royale.compiler.problems.ICompilerProblem;
+import org.apache.royale.compiler.projects.ICompilerProject;
+import org.apache.royale.swc.ISWCFileEntry;
+
+/**
+ * This is the main class which contains all information extracted from embed
+ * meta data.
+ */
+public interface IEmbedData
+{
+    /**
+     * Add an attribute
+     * 
+     * @param project containing project
+     * @param location source location of the attribute
+     * @param key attribute key
+     * @param value attribute value
+     * @param problems any problems with the key or value
+     * @return true if there was an error
+     */
+    boolean addAttribute(ICompilerProject project, ISourceLocation location, String key,
String value, Collection<ICompilerProblem> problems);
+
+    /**
+     * Returns the value of an attribute.
+     * 
+     * @param attribute An embed attribute.
+     * @return value of an attribute.  null if attribute does not exist
+     */
+    Object getAttribute(EmbedAttribute attribute);
+
+    /**
+     * @return All attributes
+     */
+    EmbedAttribute[] getAttributes();
+
+    /**
+     * @param project The compiler project.
+     * @param location The source location.
+     * @param problems The colleciton of compiler projects to which this method should add
problems.
+     * @return true if the transcoder was successfully constructed
+     */
+    boolean createTranscoder(ICompilerProject project, ISourceLocation location, Collection<ICompilerProblem>
problems);
+
+    /**
+     * Returns the qname of the class generated from the EmbedData.  The name
+     * is guaranteed to be unique and not conflict with user space names, unless
+     * a user defined class has been decorated with the embed metadata, in which
+     * case, the users class name will be returned.
+     * @return qname
+     */
+    String getQName();
+
+    /**
+     * Check if the generated class extends another
+     * 
+     * @return true if another class is extended
+     */
+    boolean generatedClassExtendsAnother();
+
+    /**
+     * Get the transcoder used by this embed.  This can be null if there was
+     * a problem with the Embed directive
+     * 
+     * @return transcoder
+     */
+    ITranscoder getTranscoder();
+
+    /**
+     * 
+     * @return ISWCFileEntry entry to source asset contained within swc.  null if not contained
within SWC
+     */
+    ISWCFileEntry getSWCSource();
+
+}
diff --git a/compiler-common/src/main/java/org/apache/royale/compiler/embedding/transcoders/ITranscoder.java
b/compiler-common/src/main/java/org/apache/royale/compiler/embedding/transcoders/ITranscoder.java
new file mode 100644
index 0000000..5f155e5
--- /dev/null
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/embedding/transcoders/ITranscoder.java
@@ -0,0 +1,80 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.royale.compiler.embedding.transcoders;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.commons.io.IOUtils;
+
+import org.apache.royale.compiler.common.ISourceLocation;
+import org.apache.royale.compiler.tree.as.IFileNode;
+import org.apache.royale.compiler.problems.ICompilerProblem;
+import org.apache.royale.compiler.projects.ICompilerProject;
+import org.apache.royale.swf.tags.ICharacterTag;
+import org.apache.royale.swf.tags.ITag;
+
+/**
+ * Base interface for all embed transcoders
+ */
+public interface ITranscoder
+{
+    /**
+     * The relevant SWF tags
+     * @param tags The transcoded asset tags
+     * @param problems The collection of compiler problems to which this method will add
problems.
+     * @return map of symbol name to character asset tags.  null if error.  the
+     * returned map may not be modified.
+     */
+    Map<String, ICharacterTag> getTags(Collection<ITag> tags, Collection<ICompilerProblem>
problems);
+
+    String getBaseClassQName();
+
+    /**
+     * @return The name of the base class of the generated class
+     */
+    String getBaseClassName();
+
+    /**
+     * Analyze the attributes
+     * @param location Source location from where the embed came from
+     * @param problems Any problems discovered in the EmbedNode
+     * @return false if analyze failed
+     */
+    boolean analyze(ISourceLocation location, Collection<ICompilerProblem> problems);
+    
+    /**
+     * Build an AST to represent the embedded asset class
+     * 
+     * @param problems The collection of compiler problems to which this method will add
problems.
+     * @param filename The path to the file being embedded.
+     * @return generated class AST
+     */
+    IFileNode buildAST(Collection<ICompilerProblem> problems, String filename);
+
+    /**
+     * Build ABC to represent the embedded asset class
+     * 
+     * @param project The compiler project.
+     * @param problems The collecton of compiler problems to which this method will add problems.
+     * @return generated class ABC
+     */
+    byte[] buildABC(ICompilerProject project, Collection<ICompilerProblem> problems);
+}
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/config/FrameInfo.java
b/compiler-common/src/main/java/org/apache/royale/compiler/internal/config/FrameInfo.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/internal/config/FrameInfo.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/internal/config/FrameInfo.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetCue.java
b/compiler-common/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetCue.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetCue.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetCue.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetLookup.java
b/compiler-common/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetLookup.java
similarity index 98%
rename from compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetLookup.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetLookup.java
index 5d64ade..376fb47 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetLookup.java
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/internal/parsing/as/OffsetLookup.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 
-import org.apache.royale.compiler.internal.scopes.ASFileScope;
 import com.google.common.base.Joiner;
 import com.google.common.base.Predicate;
 import com.google.common.collect.ImmutableList;
@@ -35,7 +34,7 @@ import com.google.common.collect.Ordering;
  * their start and end offsets are absolute offsets.
  * <P>
  * This class can translate an "absolute" offset to a tuple of filename and
- * "local offset" in the file. Each {@link ASFileScope} has an
+ * "local offset" in the file. Each ASFileScope has an
  * {@code OffsetLookup} object.
  */
 public class OffsetLookup
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/targets/ITargetAttributes.java
b/compiler-common/src/main/java/org/apache/royale/compiler/internal/targets/ITargetAttributes.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/internal/targets/ITargetAttributes.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/internal/targets/ITargetAttributes.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/targets/ISWFTarget.java b/compiler-common/src/main/java/org/apache/royale/compiler/targets/ISWFTarget.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/targets/ISWFTarget.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/targets/ISWFTarget.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/targets/ITarget.java b/compiler-common/src/main/java/org/apache/royale/compiler/targets/ITarget.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/targets/ITarget.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/targets/ITarget.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/targets/ITargetProgressMonitor.java
b/compiler-common/src/main/java/org/apache/royale/compiler/targets/ITargetProgressMonitor.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/targets/ITargetProgressMonitor.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/targets/ITargetProgressMonitor.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/targets/ITargetReport.java
b/compiler-common/src/main/java/org/apache/royale/compiler/targets/ITargetReport.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/targets/ITargetReport.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/targets/ITargetReport.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/targets/ITargetSettings.java
b/compiler-common/src/main/java/org/apache/royale/compiler/targets/ITargetSettings.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/targets/ITargetSettings.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/targets/ITargetSettings.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/tree/as/IFileNode.java b/compiler-common/src/main/java/org/apache/royale/compiler/tree/as/IFileNode.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/tree/as/IFileNode.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/tree/as/IFileNode.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/ICompilationUnit.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/ICompilationUnit.java
similarity index 96%
rename from compiler/src/main/java/org/apache/royale/compiler/units/ICompilationUnit.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/ICompilationUnit.java
index 8825257..c4e9e46 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/units/ICompilationUnit.java
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/units/ICompilationUnit.java
@@ -28,8 +28,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.royale.compiler.common.IDefinitionPriority;
 import org.apache.royale.compiler.definitions.IDefinition;
-import org.apache.royale.compiler.internal.targets.Target;
-import org.apache.royale.compiler.internal.units.CompilationUnitBase;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 import org.apache.royale.compiler.projects.ICompilerProject;
 import org.apache.royale.compiler.targets.ITarget.TargetType;
@@ -71,7 +69,7 @@ public interface ICompilationUnit
         }
         
         /**
-         * This mask is used by {@link CompilationUnitBase}  to update
+         * This mask is used by CompilationUnitBase  to update
          * a {@link AtomicInteger} that keeps track of which operations have
          * been completed.
          */
@@ -235,7 +233,7 @@ public interface ICompilationUnit
      * 
      * @see ICompilationUnit#startBuildAsync
      * @param problems Problems from executing the requests.
-     * @param targetType type of the active {@link Target}
+     * @param targetType type of the active Target
      * @throws InterruptedException Concurrency error.
      */
     void waitForBuildFinish(Collection<ICompilerProblem> problems, TargetType targetType)
throws InterruptedException;
@@ -244,7 +242,7 @@ public interface ICompilationUnit
      * This method starts to build the compilation unit asynchronously. It kicks
      * off all the request methods on the compilation unit.
      * 
-     * @param targetType type of the active {@link Target}
+     * @param targetType type of the active Target
      */
     void startBuildAsync(TargetType targetType);
 
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/requests/IABCBytesRequestResult.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IABCBytesRequestResult.java
similarity index 94%
rename from compiler/src/main/java/org/apache/royale/compiler/units/requests/IABCBytesRequestResult.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IABCBytesRequestResult.java
index f7968d8..e6c3a83 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/units/requests/IABCBytesRequestResult.java
+++ b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IABCBytesRequestResult.java
@@ -21,7 +21,7 @@ package org.apache.royale.compiler.units.requests;
 
 import java.util.Collection;
 
-import org.apache.royale.compiler.internal.embedding.EmbedData;
+import org.apache.royale.compiler.embedding.IEmbedData;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 
 /**
@@ -49,5 +49,5 @@ public interface IABCBytesRequestResult extends IRequestResult
     /**
      * @return any embedded asset generated for the CompilationUnit. This value is guaranteed
to be non-null.
      */
-    Collection<EmbedData> getEmbeds();
+    Collection<IEmbedData> getEmbeds();
 }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/requests/IFileScopeRequestResult.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IFileScopeRequestResult.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/units/requests/IFileScopeRequestResult.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IFileScopeRequestResult.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/requests/IOutgoingDependenciesRequestResult.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IOutgoingDependenciesRequestResult.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/units/requests/IOutgoingDependenciesRequestResult.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IOutgoingDependenciesRequestResult.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/requests/IRequest.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IRequest.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/units/requests/IRequest.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IRequest.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/requests/IRequestResult.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IRequestResult.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/units/requests/IRequestResult.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/requests/IRequestResult.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/requests/ISWFTagsRequestResult.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/ISWFTagsRequestResult.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/units/requests/ISWFTagsRequestResult.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/requests/ISWFTagsRequestResult.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/units/requests/ISyntaxTreeRequestResult.java
b/compiler-common/src/main/java/org/apache/royale/compiler/units/requests/ISyntaxTreeRequestResult.java
similarity index 100%
rename from compiler/src/main/java/org/apache/royale/compiler/units/requests/ISyntaxTreeRequestResult.java
rename to compiler-common/src/main/java/org/apache/royale/compiler/units/requests/ISyntaxTreeRequestResult.java
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java
b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java
index 9bfe9c1..1152a01 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/EmbedData.java
@@ -71,7 +71,7 @@ import org.apache.royale.utils.StringEncoder;
  * This is the main class which contains all information extracted from embed
  * meta data.
  */
-public class EmbedData
+public class EmbedData implements IEmbedData
 {
     private static final String EMBED_SWC_SEP = "|";
 
@@ -151,7 +151,7 @@ public class EmbedData
      * @param problems any problems with the key or value
      * @return true if there was an error
      */
-    public boolean addAttribute(CompilerProject project, ISourceLocation location, String
key, String value, Collection<ICompilerProblem> problems)
+    public boolean addAttribute(ICompilerProject project, ISourceLocation location, String
key, String value, Collection<ICompilerProblem> problems)
     {
         boolean hadError = false;
         try
@@ -392,7 +392,7 @@ public class EmbedData
      * @param problems The colleciton of compiler projects to which this method should add
problems.
      * @return true if the transcoder was successfully constructed
      */
-    public boolean createTranscoder(CompilerProject project, ISourceLocation location, Collection<ICompilerProblem>
problems)
+    public boolean createTranscoder(ICompilerProject project, ISourceLocation location, Collection<ICompilerProblem>
problems)
     {
         // there should always be a source, with the exception of skin embedding, so don't
         // create a transcoder in this error state
@@ -547,7 +547,7 @@ public class EmbedData
      * 
      * @return transcoder
      */
-    public final TranscoderBase getTranscoder()
+    public final ITranscoder getTranscoder()
     {
         return transcoder;
     }
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java
b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java
index 777bba7..bd075d2 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/embedding/transcoders/TranscoderBase.java
@@ -29,6 +29,7 @@ import org.apache.commons.io.IOUtils;
 
 import org.apache.royale.compiler.common.ISourceLocation;
 import org.apache.royale.compiler.constants.INamespaceConstants;
+import org.apache.royale.compiler.embedding.transcoders.ITranscoder;
 import org.apache.royale.compiler.filespecs.IBinaryFileSpecification;
 import org.apache.royale.compiler.internal.embedding.EmbedAttribute;
 import org.apache.royale.compiler.internal.embedding.EmbedData;
@@ -54,7 +55,7 @@ import org.apache.royale.swf.tags.ITag;
 /**
  * Base class for all embed transcoders
  */
-public abstract class TranscoderBase
+public abstract class TranscoderBase implements ITranscoder
 {
     public static final String CORE_PACKAGE = "mx.core";
     protected static final String UTILS_PACKAGE = "mx.utils";

-- 
To stop receiving notification emails like this one, please contact
"commits@royale.apache.org" <commits@royale.apache.org>.

Mime
View raw message