This is an automated email from the ASF dual-hosted git repository.
Harbs pushed a commit to branch codegraph
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/codegraph by this push:
new 0141844f6 Enhance CODEGRAPH functionality and improve code graph export
0141844f6 is described below
commit 0141844f6d5030c68c3653ba85c4d1957d63714d
Author: Harbs <[email protected]>
AuthorDate: Fri Jul 31 15:11:44 2026 +0300
Enhance CODEGRAPH functionality and improve code graph export
- Updated CODEGRAPH to include module name in the exported graph.
- Refactored CodeGraphExporter to exclude definitions marked as private
from the public API.
- Added support for unresolved types in the code graph, ensuring they are
explicitly marked in the output.
- Enhanced CodeGraphSymbol to include additional properties such as
visibility, origin, and modifiers (static, final, dynamic, override, abstract,
native).
- Improved CodeGraphWriter to output new properties in the JSON
representation of the code graph.
- Added tests to verify the inclusion of unresolved types and the correct
export of source files.
- Updated existing test cases to ensure compatibility with the new features.
---
CODEGRAPH_EXPORTER_IMPLEMENTATION_PLAN.md | 21 +-
.../apache/royale/compiler/clients/CODEGRAPH.java | 10 +-
.../internal/codegen/graph/CodeGraphExporter.java | 140 ++++++++++--
.../internal/codegen/graph/CodeGraphIdFactory.java | 3 +
.../internal/codegen/graph/CodeGraphMetadata.java | 22 ++
.../internal/codegen/graph/CodeGraphModel.java | 3 +
.../internal/codegen/graph/CodeGraphParameter.java | 3 +
.../internal/codegen/graph/CodeGraphReference.java | 3 +
.../internal/codegen/graph/CodeGraphSymbol.java | 131 ++++++++++++
.../internal/codegen/graph/CodeGraphWriter.java | 61 +++++-
.../royale/compiler/clients/TestCODEGRAPH.java | 40 +++-
.../codegen/graph/TestCodeGraphExporter.java | 22 ++
.../test/resources/codegraph/InvalidCodeGraph.as | 2 +
.../codegraph/conditional/IncludedOnly.as | 6 +
.../test/resources/codegraph/golden/GraphRoot.as | 14 ++
.../test/resources/codegraph/golden/GraphRoot.json | 237 ++++++++++++++++++++-
16 files changed, 685 insertions(+), 33 deletions(-)
diff --git a/CODEGRAPH_EXPORTER_IMPLEMENTATION_PLAN.md
b/CODEGRAPH_EXPORTER_IMPLEMENTATION_PLAN.md
index 5db62fc7d..7239db7db 100644
--- a/CODEGRAPH_EXPORTER_IMPLEMENTATION_PLAN.md
+++ b/CODEGRAPH_EXPORTER_IMPLEMENTATION_PLAN.md
@@ -114,7 +114,7 @@ The exact JSON shape should be finalized with tests, but
version 1 needs these c
{
"schemaVersion": "1.0",
"target": "js",
- "module": null,
+ "module": "UIBase",
"symbols": [],
"externalSymbols": []
}
@@ -287,6 +287,21 @@ Before considering the first compiler PR review-ready:
Passing the existing suite is necessary but not sufficient: the new client
must have direct regression coverage for configuration, target setup,
filtering, error handling, and output generation.
+## Current Implementation Status
+
+Implemented and covered by focused compiler-backed tests:
+
+- Public classes, interfaces, implicit interface members, package definitions,
and directly declared public members.
+- Expanded directory-valued include sources and unreferenced included source
files.
+- Stable IDs, deterministic JSON, source-root-relative provenance, module
identity, and external library origins.
+- Resolved and explicitly unresolved signature references, with compiler
diagnostics retained for unresolved types.
+- Base, interface, override, and implementation relationships.
+- Visibility, declaration modifiers, parameter defaults, and variable/constant
initial values.
+- Parsed ASDoc, `@private` exclusion, structured metadata, metadata ASDoc, and
type-bearing metadata references.
+- JS/SWF conditional selection, compiler error gating, two-run determinism,
and an exact golden document.
+
+Deferred extensions remain effective inherited-member views, `@copy`
resolution, JSON Schema/versioning policy, and aggregate build-tool integration.
+
## Suggested Pull Request Sequence
### PR 1: Semantic exporter MVP
@@ -300,8 +315,8 @@ Passing the existing suite is necessary but not sufficient:
the new client must
### PR 2: Completeness
- Package-level definitions. Implemented with focused
function/variable/constant coverage and a compiler-backed reachable
package-function fixture.
-- External and unresolved symbol records.
-- Inheritance/override edges.
+- External and unresolved symbol records. Implemented with explicit unresolved
markers, origins, and compiler-problem coverage.
+- Inheritance/override edges. Implemented for base types, interfaces,
overridden methods, and interface implementations.
- Effective inherited public member view if clients require it.
- `@copy` resolution.
- JSON Schema and schema compatibility policy.
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/CODEGRAPH.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/CODEGRAPH.java
index d9ab6c39d..3ccf2e40b 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/CODEGRAPH.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/CODEGRAPH.java
@@ -44,6 +44,9 @@ import org.apache.royale.compiler.targets.ITargetSettings;
import org.apache.royale.compiler.units.ICompilationUnit;
import org.apache.royale.compiler.units.requests.ISyntaxTreeRequestResult;
+/**
+ * Compiler client that exports a deterministic public ActionScript API graph.
+ */
public class CODEGRAPH extends MXMLJSCRoyale
{
public CODEGRAPH()
@@ -103,7 +106,8 @@ public class CODEGRAPH extends MXMLJSCRoyale
definitions.addAll(compilationUnit.getFileScopeRequest().get().getExternallyVisibleDefinitions());
}
- CodeGraphModel model = new
CodeGraphExporter(project).export(definitions, getGraphTarget(), null);
+ String module = FilenameUtils.getBaseName(config.getTargetFile());
+ CodeGraphModel model = new
CodeGraphExporter(project).export(definitions, getGraphTarget(), module);
syntaxTrees.clear();
File outputFile = getGraphOutputFile();
File parent = outputFile.getParentFile();
@@ -159,9 +163,9 @@ public class CODEGRAPH extends MXMLJSCRoyale
return true;
if (sourceFile.equals(new
File(config.getTargetFile()).getAbsoluteFile()))
return true;
- for (String includeSource : config.getIncludeSources())
+ for (File includeSource : targetSettings.getIncludeSources())
{
- if (sourceFile.equals(new File(includeSource).getAbsoluteFile()))
+ if (sourceFile.equals(includeSource.getAbsoluteFile()))
return true;
}
return false;
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphExporter.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphExporter.java
index 9b47d34b3..4b89c380d 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphExporter.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphExporter.java
@@ -19,6 +19,7 @@
package org.apache.royale.compiler.internal.codegen.graph;
+import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -44,7 +45,12 @@ import
org.apache.royale.compiler.definitions.IVariableDefinition;
import org.apache.royale.compiler.definitions.metadata.IMetaTag;
import org.apache.royale.compiler.definitions.metadata.IMetaTagAttribute;
import org.apache.royale.compiler.projects.ICompilerProject;
+import org.apache.royale.compiler.projects.IASProject;
+import org.apache.royale.compiler.tree.as.IDocumentableDefinitionNode;
+/**
+ * Translates compiler definitions into the portable code graph model.
+ */
public final class CodeGraphExporter
{
private final ICompilerProject project;
@@ -63,12 +69,12 @@ public final class CodeGraphExporter
externalDefinitions.clear();
for (IDefinition definition : definitions)
{
- if (definition.isPublic() && isSupportedType(definition))
+ if (definition.isPublic() && !isExcludedFromPublicAPI(definition)
&& isSupportedType(definition))
exportedQualifiedNames.add(definition.getQualifiedName());
}
for (IDefinition definition : definitions)
{
- if (!definition.isPublic())
+ if (!definition.isPublic() || isExcludedFromPublicAPI(definition))
continue;
if (isSupportedType(definition))
model.addSymbol(exportType((ITypeDefinition)definition));
@@ -81,6 +87,9 @@ public final class CodeGraphExporter
{
CodeGraphSymbol externalSymbol = createSymbol(externalDefinition,
getTypeKind(externalDefinition));
externalSymbol.setExternal(true);
+ String origin = externalDefinition.getContainingFilePath();
+ if (origin != null)
+ externalSymbol.setOrigin(new File(origin).getName());
model.addExternalSymbol(externalSymbol);
}
return model;
@@ -100,8 +109,9 @@ public final class CodeGraphExporter
{
IClassDefinition classDefinition = (IClassDefinition)definition;
IClassDefinition baseClass =
classDefinition.resolveBaseClass(project);
- if (baseClass != null)
- symbol.setBaseType(createReference(baseClass));
+ String baseClassName =
classDefinition.getBaseClassAsDisplayString();
+ if (baseClass != null || (baseClassName != null &&
!baseClassName.isEmpty()))
+ symbol.setBaseType(createReference(baseClass, baseClassName));
for (IInterfaceDefinition interfaceDefinition :
classDefinition.resolveImplementedInterfaces(project))
symbol.addInterface(createReference(interfaceDefinition));
IFunctionDefinition constructor = classDefinition.getConstructor();
@@ -119,7 +129,9 @@ public final class CodeGraphExporter
{
boolean isConstructor = memberDefinition instanceof
IFunctionDefinition
&& ((IFunctionDefinition)memberDefinition).isConstructor();
- if (!memberDefinition.isPublic() || memberDefinition.isImplicit()
|| isConstructor)
+ boolean isPublic = memberDefinition.isPublic() || definition
instanceof IInterfaceDefinition;
+ if (!isPublic || memberDefinition.isImplicit() || isConstructor
+ || isExcludedFromPublicAPI(memberDefinition))
continue;
if (memberDefinition instanceof IFunctionDefinition)
symbol.addMember(exportFunction((IFunctionDefinition)memberDefinition,
definition));
@@ -156,26 +168,34 @@ public final class CodeGraphExporter
CodeGraphSymbol symbol = new CodeGraphSymbol(id,
definition.getQualifiedName(), definition.getBaseName(),
definition.getPackageName(), kind);
+ addDefinitionDetails(symbol, definition);
+ if (symbol.getVisibility().isEmpty() && declaringType != null)
+
symbol.setVisibility(declaringType.getNamespaceReference().getBaseName());
addMetadata(symbol, definition);
addASDoc(symbol, definition);
if (declaringType != null)
symbol.setDeclaringType(createReference(declaringType));
+ IFunctionDefinition overriddenFunction =
definition.resolveOverriddenFunction(project);
+ if (overriddenFunction != null)
+
symbol.setOverriddenMember(createFunctionReference(overriddenFunction));
+ IFunctionDefinition implementedFunction =
definition.resolveImplementedFunction(project);
+ if (implementedFunction != null)
+
symbol.setImplementedMember(createFunctionReference(implementedFunction));
if (definition instanceof IGetterDefinition || definition instanceof
ISetterDefinition)
{
ITypeDefinition typeDefinition = definition.resolveType(project);
- if (typeDefinition != null)
- symbol.setType(createReference(typeDefinition));
+ symbol.setType(createReference(typeDefinition,
definition.getTypeAsDisplayString()));
}
else if (!definition.isConstructor())
{
ITypeDefinition returnType = definition.resolveReturnType(project);
- if (returnType != null)
- symbol.setReturnType(createReference(returnType));
+ symbol.setReturnType(createReference(returnType,
definition.getReturnTypeAsDisplayString()));
}
for (IParameterDefinition parameterDefinition :
definition.getParameters())
{
ITypeDefinition parameterType =
parameterDefinition.resolveType(project);
- CodeGraphReference typeReference = parameterType == null ? null :
createReference(parameterType);
+ CodeGraphReference typeReference = createReference(parameterType,
+ parameterDefinition.getTypeAsDisplayString());
Object defaultValue = parameterDefinition.hasDefaultValue()
? parameterDefinition.resolveDefaultValue(project) : null;
symbol.addParameter(new
CodeGraphParameter(parameterDefinition.getBaseName(), typeReference,
@@ -208,20 +228,81 @@ public final class CodeGraphExporter
: CodeGraphIdFactory.member(declaringType.getQualifiedName(),
definition.getBaseName());
CodeGraphSymbol symbol = new CodeGraphSymbol(id,
definition.getQualifiedName(), definition.getBaseName(),
definition.getPackageName(), kind);
+ addDefinitionDetails(symbol, definition);
addMetadata(symbol, definition);
addASDoc(symbol, definition);
if (declaringType != null)
symbol.setDeclaringType(createReference(declaringType));
ITypeDefinition typeDefinition = definition.resolveType(project);
- if (typeDefinition != null)
- symbol.setType(createReference(typeDefinition));
+ symbol.setType(createReference(typeDefinition,
definition.getTypeAsDisplayString()));
+ if (definition.getVariableNode() != null &&
definition.getVariableNode().getAssignedValueNode() != null)
+ symbol.setInitialValue(definition.resolveInitialValue(project));
return symbol;
}
+ private boolean isExcludedFromPublicAPI(IDefinition definition)
+ {
+ if (!(definition instanceof IDocumentableDefinition))
+ return false;
+ IASDocComment comment =
((IDocumentableDefinition)definition).getExplicitSourceComment();
+ if (comment == null)
+ return false;
+ if (comment.getDescription() == null)
+ comment.compile();
+ return comment.hasTag("private");
+ }
+
private CodeGraphSymbol createSymbol(IDefinition definition, String kind)
{
- return new
CodeGraphSymbol(CodeGraphIdFactory.definition(definition.getQualifiedName()),
+ CodeGraphSymbol symbol = new
CodeGraphSymbol(CodeGraphIdFactory.definition(definition.getQualifiedName()),
definition.getQualifiedName(), definition.getBaseName(),
definition.getPackageName(), kind);
+ addDefinitionDetails(symbol, definition);
+ return symbol;
+ }
+
+ private void addDefinitionDetails(CodeGraphSymbol symbol, IDefinition
definition)
+ {
+ symbol.setVisibility(definition.getNamespaceReference().getBaseName());
+ symbol.setStatic(definition.isStatic());
+ symbol.setFinal(definition.isFinal());
+ symbol.setDynamic(definition.isDynamic());
+ symbol.setOverride(definition.isOverride());
+ symbol.setAbstract(definition.isAbstract());
+ symbol.setNative(definition.isNative());
+ String source = definition.getContainingSourceFilePath(project);
+ if (source == null)
+ return;
+ File sourceFile = new File(source).getAbsoluteFile();
+ if (project instanceof IASProject)
+ {
+ for (File sourceRoot : ((IASProject)project).getSourcePath())
+ {
+ String relativeSource =
relativize(sourceRoot.getAbsoluteFile(), sourceFile);
+ if (relativeSource != null)
+ {
+ symbol.setSource(relativeSource);
+ return;
+ }
+ }
+ }
+ symbol.setSource(sourceFile.getName());
+ }
+
+ private String relativize(File root, File file)
+ {
+ String rootPath = root.toURI().normalize().getPath();
+ String filePath = file.toURI().normalize().getPath();
+ if (!filePath.startsWith(rootPath))
+ return null;
+ return filePath.substring(rootPath.length());
+ }
+
+ private CodeGraphReference createFunctionReference(IFunctionDefinition
definition)
+ {
+ ITypeDefinition owner =
(ITypeDefinition)definition.getAncestorOfType(ITypeDefinition.class);
+ String id = createCallableId(definition, owner);
+ boolean external = owner != null &&
!exportedQualifiedNames.contains(owner.getQualifiedName());
+ return new CodeGraphReference(id, definition.getQualifiedName(),
external, false);
}
private String getTypeKind(ITypeDefinition definition)
@@ -239,18 +320,38 @@ public final class CodeGraphExporter
for (IMetaTagAttribute attribute : metaTag.getAllAttributes())
{
metadata.addAttribute(new
CodeGraphMetadataAttribute(attribute.getKey(), attribute.getValue()));
+ if ("type".equals(attribute.getKey()) &&
isTypeBearingMetadata(metaTag.getTagName()))
+ {
+ IDefinition typeDefinition =
project.resolveQNameToDefinition(attribute.getValue());
+ metadata.addReference(createReference(typeDefinition
instanceof ITypeDefinition
+ ? (ITypeDefinition)typeDefinition : null,
attribute.getValue()));
+ }
}
+ if (metaTag.getTagNode() instanceof IDocumentableDefinitionNode)
+
metadata.setASDoc(createASDoc(((IDocumentableDefinitionNode)metaTag.getTagNode()).getASDocComment()));
symbol.addMetadata(metadata);
}
}
+ private boolean isTypeBearingMetadata(String name)
+ {
+ return "Event".equals(name) || "Style".equals(name) ||
"Effect".equals(name);
+ }
+
private void addASDoc(CodeGraphSymbol symbol, IDefinition definition)
{
if (!(definition instanceof IDocumentableDefinition))
return;
IASDocComment comment =
((IDocumentableDefinition)definition).getExplicitSourceComment();
+ CodeGraphASDoc asDoc = createASDoc(comment);
+ if (asDoc != null)
+ symbol.setASDoc(asDoc);
+ }
+
+ private CodeGraphASDoc createASDoc(IASDocComment comment)
+ {
if (comment == null)
- return;
+ return null;
if (comment.getDescription() == null)
comment.compile();
CodeGraphASDoc asDoc = new
CodeGraphASDoc(normalizeASDocText(comment.getDescription()));
@@ -271,7 +372,7 @@ public final class CodeGraphExporter
asDoc.addTag(new CodeGraphASDocTag(tagName,
normalizeASDocText(tag.getDescription())));
}
}
- symbol.setASDoc(asDoc);
+ return asDoc;
}
private String normalizeASDocText(String value)
@@ -289,4 +390,13 @@ public final class CodeGraphExporter
externalDefinitions.put(qualifiedName, definition);
return new
CodeGraphReference(CodeGraphIdFactory.definition(qualifiedName), qualifiedName,
external, false);
}
+
+ private CodeGraphReference createReference(ITypeDefinition definition,
String displayName)
+ {
+ if (definition != null)
+ return createReference(definition);
+ if (displayName == null || displayName.isEmpty())
+ return null;
+ return new
CodeGraphReference(CodeGraphIdFactory.definition(displayName), displayName,
true, true);
+ }
}
\ No newline at end of file
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphIdFactory.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphIdFactory.java
index 82fbb5a1e..05b46e1d1 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphIdFactory.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphIdFactory.java
@@ -21,6 +21,9 @@ package org.apache.royale.compiler.internal.codegen.graph;
import java.util.List;
+/**
+ * Creates stable identifiers for ActionScript definitions and members.
+ */
public final class CodeGraphIdFactory
{
private static final String SCHEME = "as3://";
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphMetadata.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphMetadata.java
index a55a68ff7..1f0a9640c 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphMetadata.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphMetadata.java
@@ -30,6 +30,8 @@ public final class CodeGraphMetadata
{
private final String name;
private final List<CodeGraphMetadataAttribute> attributes = new
ArrayList<CodeGraphMetadataAttribute>();
+ private final List<CodeGraphReference> references = new
ArrayList<CodeGraphReference>();
+ private CodeGraphASDoc asDoc;
public CodeGraphMetadata(String name)
{
@@ -50,4 +52,24 @@ public final class CodeGraphMetadata
{
return Collections.unmodifiableList(attributes);
}
+
+ public void addReference(CodeGraphReference reference)
+ {
+ references.add(reference);
+ }
+
+ public List<CodeGraphReference> getReferences()
+ {
+ return Collections.unmodifiableList(references);
+ }
+
+ public CodeGraphASDoc getASDoc()
+ {
+ return asDoc;
+ }
+
+ public void setASDoc(CodeGraphASDoc asDoc)
+ {
+ this.asDoc = asDoc;
+ }
}
\ No newline at end of file
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphModel.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphModel.java
index 11babebec..36ce5724d 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphModel.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphModel.java
@@ -23,6 +23,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+/**
+ * Root document containing exported and external graph symbols.
+ */
public final class CodeGraphModel
{
public static final String SCHEMA_VERSION = "1.0";
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphParameter.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphParameter.java
index d12244315..38e678e3f 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphParameter.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphParameter.java
@@ -19,6 +19,9 @@
package org.apache.royale.compiler.internal.codegen.graph;
+/**
+ * A callable parameter and its resolved signature details.
+ */
public final class CodeGraphParameter
{
private final String name;
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphReference.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphReference.java
index 884e9d0be..329b2e42b 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphReference.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphReference.java
@@ -19,6 +19,9 @@
package org.apache.royale.compiler.internal.codegen.graph;
+/**
+ * A resolved or explicitly unresolved reference to another graph symbol.
+ */
public final class CodeGraphReference
{
private final String id;
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphSymbol.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphSymbol.java
index 7c0e84040..4db1eae69 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphSymbol.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphSymbol.java
@@ -23,6 +23,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+/**
+ * A public ActionScript definition represented in the code graph.
+ */
public final class CodeGraphSymbol
{
private final String id;
@@ -32,10 +35,22 @@ public final class CodeGraphSymbol
private final String kind;
private boolean external;
private String source;
+ private String origin;
+ private String visibility;
+ private boolean staticDefinition;
+ private boolean finalDefinition;
+ private boolean dynamicDefinition;
+ private boolean overrideDefinition;
+ private boolean abstractDefinition;
+ private boolean nativeDefinition;
+ private boolean hasInitialValue;
+ private Object initialValue;
private CodeGraphReference declaringType;
private CodeGraphReference type;
private CodeGraphReference returnType;
private CodeGraphReference baseType;
+ private CodeGraphReference overriddenMember;
+ private CodeGraphReference implementedMember;
private CodeGraphASDoc asDoc;
private final List<CodeGraphReference> interfaces = new
ArrayList<CodeGraphReference>();
private final List<CodeGraphParameter> parameters = new
ArrayList<CodeGraphParameter>();
@@ -96,6 +111,102 @@ public final class CodeGraphSymbol
this.source = source;
}
+ public String getOrigin()
+ {
+ return origin;
+ }
+
+ public void setOrigin(String origin)
+ {
+ this.origin = origin;
+ }
+
+ public String getVisibility()
+ {
+ return visibility;
+ }
+
+ public void setVisibility(String visibility)
+ {
+ this.visibility = visibility;
+ }
+
+ public boolean isStatic()
+ {
+ return staticDefinition;
+ }
+
+ public void setStatic(boolean value)
+ {
+ staticDefinition = value;
+ }
+
+ public boolean isFinal()
+ {
+ return finalDefinition;
+ }
+
+ public void setFinal(boolean value)
+ {
+ finalDefinition = value;
+ }
+
+ public boolean isDynamic()
+ {
+ return dynamicDefinition;
+ }
+
+ public void setDynamic(boolean value)
+ {
+ dynamicDefinition = value;
+ }
+
+ public boolean isOverride()
+ {
+ return overrideDefinition;
+ }
+
+ public void setOverride(boolean value)
+ {
+ overrideDefinition = value;
+ }
+
+ public boolean isAbstract()
+ {
+ return abstractDefinition;
+ }
+
+ public void setAbstract(boolean value)
+ {
+ abstractDefinition = value;
+ }
+
+ public boolean isNative()
+ {
+ return nativeDefinition;
+ }
+
+ public void setNative(boolean value)
+ {
+ nativeDefinition = value;
+ }
+
+ public boolean hasInitialValue()
+ {
+ return hasInitialValue;
+ }
+
+ public Object getInitialValue()
+ {
+ return initialValue;
+ }
+
+ public void setInitialValue(Object initialValue)
+ {
+ hasInitialValue = true;
+ this.initialValue = initialValue;
+ }
+
public CodeGraphReference getDeclaringType()
{
return declaringType;
@@ -136,6 +247,26 @@ public final class CodeGraphSymbol
this.baseType = baseType;
}
+ public CodeGraphReference getOverriddenMember()
+ {
+ return overriddenMember;
+ }
+
+ public void setOverriddenMember(CodeGraphReference overriddenMember)
+ {
+ this.overriddenMember = overriddenMember;
+ }
+
+ public CodeGraphReference getImplementedMember()
+ {
+ return implementedMember;
+ }
+
+ public void setImplementedMember(CodeGraphReference implementedMember)
+ {
+ this.implementedMember = implementedMember;
+ }
+
public CodeGraphASDoc getASDoc()
{
return asDoc;
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphWriter.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphWriter.java
index 22d4b51f0..0dcbda427 100644
---
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphWriter.java
+++
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/graph/CodeGraphWriter.java
@@ -26,6 +26,9 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
+/**
+ * Writes code graph models as deterministic JSON documents.
+ */
public final class CodeGraphWriter
{
private static final Comparator<CodeGraphSymbol> SYMBOL_COMPARATOR = new
Comparator<CodeGraphSymbol>()
@@ -86,6 +89,14 @@ public final class CodeGraphWriter
writeBooleanProperty(writer, level + 1, "external", true,
--optionalPropertyCount > 0);
if (symbol.getSource() != null)
writeProperty(writer, level + 1, "source",
symbol.getSource().replace('\\', '/'), --optionalPropertyCount > 0);
+ if (symbol.getOrigin() != null)
+ writeProperty(writer, level + 1, "origin",
symbol.getOrigin().replace('\\', '/'), --optionalPropertyCount > 0);
+ if (symbol.getVisibility() != null)
+ writeProperty(writer, level + 1, "visibility",
symbol.getVisibility(), --optionalPropertyCount > 0);
+ if (hasModifiers(symbol))
+ writeModifiers(writer, symbol, level + 1, --optionalPropertyCount
> 0);
+ if (symbol.hasInitialValue())
+ writeValueProperty(writer, level + 1, "initialValue",
symbol.getInitialValue(), --optionalPropertyCount > 0);
if (symbol.getDeclaringType() != null)
writeReferenceProperty(writer, level + 1, "declaringType",
symbol.getDeclaringType(), --optionalPropertyCount > 0);
if (symbol.getType() != null)
@@ -94,6 +105,10 @@ public final class CodeGraphWriter
writeReferenceProperty(writer, level + 1, "returnType",
symbol.getReturnType(), --optionalPropertyCount > 0);
if (symbol.getBaseType() != null)
writeReferenceProperty(writer, level + 1, "baseType",
symbol.getBaseType(), --optionalPropertyCount > 0);
+ if (symbol.getOverriddenMember() != null)
+ writeReferenceProperty(writer, level + 1, "overrides",
symbol.getOverriddenMember(), --optionalPropertyCount > 0);
+ if (symbol.getImplementedMember() != null)
+ writeReferenceProperty(writer, level + 1, "implements",
symbol.getImplementedMember(), --optionalPropertyCount > 0);
if (symbol.getASDoc() != null)
writeASDoc(writer, symbol.getASDoc(), level + 1,
--optionalPropertyCount > 0);
if (!symbol.getInterfaces().isEmpty())
@@ -121,6 +136,14 @@ public final class CodeGraphWriter
result++;
if (symbol.getSource() != null)
result++;
+ if (symbol.getOrigin() != null)
+ result++;
+ if (symbol.getVisibility() != null)
+ result++;
+ if (hasModifiers(symbol))
+ result++;
+ if (symbol.hasInitialValue())
+ result++;
if (symbol.getDeclaringType() != null)
result++;
if (symbol.getType() != null)
@@ -129,6 +152,10 @@ public final class CodeGraphWriter
result++;
if (symbol.getBaseType() != null)
result++;
+ if (symbol.getOverriddenMember() != null)
+ result++;
+ if (symbol.getImplementedMember() != null)
+ result++;
if (symbol.getASDoc() != null)
result++;
if (!symbol.getInterfaces().isEmpty())
@@ -142,6 +169,30 @@ public final class CodeGraphWriter
return result;
}
+ private boolean hasModifiers(CodeGraphSymbol symbol)
+ {
+ return symbol.isStatic() || symbol.isFinal() || symbol.isDynamic() ||
symbol.isOverride()
+ || symbol.isAbstract() || symbol.isNative();
+ }
+
+ private void writeModifiers(Writer writer, CodeGraphSymbol symbol, int
level, boolean comma) throws IOException
+ {
+ indent(writer, level);
+ writeString(writer, "modifiers");
+ writer.write(": {\n");
+ writeBooleanProperty(writer, level + 1, "static", symbol.isStatic(),
true);
+ writeBooleanProperty(writer, level + 1, "final", symbol.isFinal(),
true);
+ writeBooleanProperty(writer, level + 1, "dynamic", symbol.isDynamic(),
true);
+ writeBooleanProperty(writer, level + 1, "override",
symbol.isOverride(), true);
+ writeBooleanProperty(writer, level + 1, "abstract",
symbol.isAbstract(), true);
+ writeBooleanProperty(writer, level + 1, "native", symbol.isNative(),
false);
+ indent(writer, level);
+ writer.write('}');
+ if (comma)
+ writer.write(',');
+ writer.write('\n');
+ }
+
private void writeASDoc(Writer writer, CodeGraphASDoc asDoc, int level,
boolean comma) throws IOException
{
indent(writer, level);
@@ -284,7 +335,15 @@ public final class CodeGraphWriter
}
if (!metadataTag.getAttributes().isEmpty())
indent(writer, level + 2);
- writer.write("]\n");
+ writer.write(']');
+ if (!metadataTag.getReferences().isEmpty() ||
metadataTag.getASDoc() != null)
+ writer.write(',');
+ writer.write('\n');
+ if (!metadataTag.getReferences().isEmpty())
+ writeReferences(writer, "references",
metadataTag.getReferences(), level + 2,
+ metadataTag.getASDoc() != null);
+ if (metadataTag.getASDoc() != null)
+ writeASDoc(writer, metadataTag.getASDoc(), level + 2, false);
indent(writer, level + 1);
writer.write('}');
if (i + 1 < metadata.size())
diff --git
a/compiler-jx/src/test/java/org/apache/royale/compiler/clients/TestCODEGRAPH.java
b/compiler-jx/src/test/java/org/apache/royale/compiler/clients/TestCODEGRAPH.java
index 30489930b..f669d83eb 100644
---
a/compiler-jx/src/test/java/org/apache/royale/compiler/clients/TestCODEGRAPH.java
+++
b/compiler-jx/src/test/java/org/apache/royale/compiler/clients/TestCODEGRAPH.java
@@ -30,6 +30,7 @@ import java.util.List;
import org.apache.commons.io.FileUtils;
import org.apache.royale.compiler.problems.ICompilerProblem;
+import org.apache.royale.compiler.problems.UnknownTypeProblem;
import org.apache.royale.utils.ITestAdapter;
import org.apache.royale.utils.TestAdapterFactory;
import org.junit.After;
@@ -65,12 +66,16 @@ public class TestCODEGRAPH
}
@Test
- public void testCreateTargetWithErrorsAllowsOutput()
+ public void testCreateTargetWithErrorsAllowsOutput() throws IOException
{
int exitCode = compile(true);
assertEquals(2, exitCode);
assertTrue(problems.toString(), outputFile.exists());
+ assertTrue(problems.toString(),
containsProblem(UnknownTypeProblem.class));
+ String output = FileUtils.readFileToString(outputFile, "UTF-8");
+ assertTrue(output, output.contains("\"qualifiedName\":
\"MissingType\""));
+ assertTrue(output, output.contains("\"unresolved\": true"));
}
@Test
@@ -116,24 +121,55 @@ public class TestCODEGRAPH
assertFalse(swfOutput, swfOutput.contains("#jsOnly()"));
}
+ @Test
+ public void testIncludeSourcesDirectoryExportsAllSources() throws
IOException
+ {
+ File sourceDirectory = testAdapter.getUnitTestBaseDir();
+ File includeDirectory = new File(sourceDirectory,
"codegraph/conditional");
+ File sourceFile = new File(includeDirectory, "ConditionalGraph.as");
+ outputFile = new File(testAdapter.getTempDir(),
"codegraph/IncludedDirectory.json");
+
+ int exitCode = compile(sourceFile, sourceDirectory, includeDirectory,
false, false);
+ assertEquals(problems.toString(), 0, exitCode);
+ String output = FileUtils.readFileToString(outputFile, "UTF-8");
+ assertTrue(output,
output.contains("as3://codegraph/conditional/ConditionalGraph"));
+ assertTrue(output,
output.contains("as3://codegraph/conditional/IncludedOnly"));
+ }
+
private int compile(boolean createTargetWithErrors)
{
File sourceFile = new File(testAdapter.getUnitTestBaseDir(),
"codegraph/InvalidCodeGraph.as");
return compile(sourceFile, null, createTargetWithErrors);
}
+ private boolean containsProblem(Class<? extends ICompilerProblem>
problemType)
+ {
+ for (ICompilerProblem problem : problems)
+ {
+ if (problemType.isInstance(problem))
+ return true;
+ }
+ return false;
+ }
+
private int compile(File sourceFile, File sourceDirectory, boolean
createTargetWithErrors)
{
return compile(sourceFile, sourceDirectory, createTargetWithErrors,
null);
}
private int compile(File sourceFile, File sourceDirectory, boolean
createTargetWithErrors, Boolean swf)
+ {
+ return compile(sourceFile, sourceDirectory, sourceFile,
createTargetWithErrors, swf);
+ }
+
+ private int compile(File sourceFile, File sourceDirectory, File
includeSource,
+ boolean createTargetWithErrors, Boolean swf)
{
File jsSWC = new File("../compiler-externc/target/js.swc");
List<String> arguments = new ArrayList<String>();
arguments.add("-external-library-path=" + jsSWC.getPath());
arguments.add("-output=" + outputFile.getPath());
- arguments.add("-include-sources=" + sourceFile.getPath());
+ arguments.add("-include-sources=" + includeSource.getPath());
if (sourceDirectory != null)
arguments.add("-source-path=" + sourceDirectory.getPath());
if (createTargetWithErrors)
diff --git
a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/graph/TestCodeGraphExporter.java
b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/graph/TestCodeGraphExporter.java
index 0df5e9848..fb04c3d21 100644
---
a/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/graph/TestCodeGraphExporter.java
+++
b/compiler-jx/src/test/java/org/apache/royale/compiler/internal/codegen/graph/TestCodeGraphExporter.java
@@ -153,6 +153,28 @@ public class TestCodeGraphExporter extends ASTestBase
assertEquals("Number", constant.getType().getQualifiedName());
}
+ @Test
+ public void testUnresolvedSignatureTypesAreExplicit()
+ {
+ IClassNode classNode = getClassNode("public class Widget {"
+ + "public var value:MissingFieldType;"
+ + "public function
work(value:MissingParameterType):MissingReturnType { return null; }"
+ + "}");
+
+ CodeGraphModel model = new CodeGraphExporter(project).export(
+
Collections.singleton(classNode.getDefinition()), "js", null);
+ CodeGraphSymbol classSymbol = model.getSymbols().get(0);
+ CodeGraphSymbol field = findMember(classSymbol, "field");
+ CodeGraphSymbol method = findMember(classSymbol, "method");
+
+ assertEquals("MissingFieldType",
field.getType().getQualifiedName());
+ assertTrue(field.getType().isUnresolved());
+ assertEquals("MissingReturnType",
method.getReturnType().getQualifiedName());
+ assertTrue(method.getReturnType().isUnresolved());
+ assertEquals("MissingParameterType",
method.getParameters().get(0).getType().getQualifiedName());
+
assertTrue(method.getParameters().get(0).getType().isUnresolved());
+ }
+
private CodeGraphSymbol findSymbol(CodeGraphModel model, String kind)
{
for (CodeGraphSymbol symbol : model.getSymbols())
diff --git a/compiler-jx/src/test/resources/codegraph/InvalidCodeGraph.as
b/compiler-jx/src/test/resources/codegraph/InvalidCodeGraph.as
index 2d35835c1..f7ad08b7e 100644
--- a/compiler-jx/src/test/resources/codegraph/InvalidCodeGraph.as
+++ b/compiler-jx/src/test/resources/codegraph/InvalidCodeGraph.as
@@ -2,6 +2,8 @@ package codegraph
{
public class InvalidCodeGraph
{
+ public var unresolved:MissingType;
+
public function broken():void
{
missingName;
diff --git
a/compiler-jx/src/test/resources/codegraph/conditional/IncludedOnly.as
b/compiler-jx/src/test/resources/codegraph/conditional/IncludedOnly.as
new file mode 100644
index 000000000..3cd1e0dc6
--- /dev/null
+++ b/compiler-jx/src/test/resources/codegraph/conditional/IncludedOnly.as
@@ -0,0 +1,6 @@
+package codegraph.conditional
+{
+ public class IncludedOnly
+ {
+ }
+}
\ No newline at end of file
diff --git a/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.as
b/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.as
index cd6192f94..1c84a39f8 100644
--- a/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.as
+++ b/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.as
@@ -1,5 +1,6 @@
package codegraph.golden
{
+ /** Dispatched when graph work completes. */
[Event(name="complete", type="codegraph.golden.GraphEvent")]
[DefaultProperty("label")]
/**
@@ -11,6 +12,8 @@ package codegraph.golden
*/
public class GraphRoot extends GraphBase implements IGraphContract
{
+ public static const VERSION:String = "1";
+
public function GraphRoot(value:String)
{
}
@@ -20,8 +23,19 @@ package codegraph.golden
return packageFunction(required);
}
+ override public function inheritedMethod():void
+ {
+ }
+
private function hidden():void
{
}
+
+ /**
+ * @private
+ */
+ public function documentedPrivate():void
+ {
+ }
}
}
\ No newline at end of file
diff --git a/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.json
b/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.json
index 14c3fd075..9952718a5 100644
--- a/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.json
+++ b/compiler-jx/src/test/resources/codegraph/golden/GraphRoot.json
@@ -1,7 +1,7 @@
{
"schemaVersion": "1.0",
"target": "js",
- "module": null,
+ "module": "GraphRoot",
"symbols": [
{
"id": "as3://codegraph/golden/GraphBase",
@@ -9,6 +9,8 @@
"baseName": "GraphBase",
"package": "codegraph.golden",
"kind": "class",
+ "source": "codegraph/golden/GraphBase.as",
+ "visibility": "public",
"baseType": {
"id": "as3://Object",
"qualifiedName": "Object",
@@ -22,6 +24,8 @@
"baseName": "inheritedMethod",
"package": "codegraph.golden",
"kind": "method",
+ "source": "codegraph/golden/GraphBase.as",
+ "visibility": "public",
"declaringType": {
"id": "as3://codegraph/golden/GraphBase",
"qualifiedName": "codegraph.golden.GraphBase",
@@ -41,6 +45,8 @@
"baseName": "label",
"package": "codegraph.golden",
"kind": "field",
+ "source": "codegraph/golden/GraphBase.as",
+ "visibility": "public",
"declaringType": {
"id": "as3://codegraph/golden/GraphBase",
"qualifiedName": "codegraph.golden.GraphBase",
@@ -73,6 +79,8 @@
"baseName": "GraphRoot",
"package": "codegraph.golden",
"kind": "class",
+ "source": "codegraph/golden/GraphRoot.as",
+ "visibility": "public",
"baseType": {
"id": "as3://codegraph/golden/GraphBase",
"qualifiedName": "codegraph.golden.GraphBase",
@@ -116,7 +124,19 @@
"key": "type",
"value": "codegraph.golden.GraphEvent"
}
- ]
+ ],
+ "references": [
+ {
+ "id": "as3://codegraph/golden/GraphEvent",
+ "qualifiedName": "codegraph.golden.GraphEvent",
+ "external": true,
+ "unresolved": true
+ }
+ ],
+ "asdoc": {
+ "description": "Dispatched when graph work completes.",
+ "tags": []
+ }
},
{
"name": "DefaultProperty",
@@ -129,12 +149,44 @@
}
],
"members": [
+ {
+ "id": "as3://codegraph/golden/GraphRoot#VERSION",
+ "qualifiedName": "VERSION",
+ "baseName": "VERSION",
+ "package": "codegraph.golden",
+ "kind": "constant",
+ "source": "codegraph/golden/GraphRoot.as",
+ "visibility": "public",
+ "modifiers": {
+ "static": true,
+ "final": false,
+ "dynamic": false,
+ "override": false,
+ "abstract": false,
+ "native": false
+ },
+ "initialValue": "1",
+ "declaringType": {
+ "id": "as3://codegraph/golden/GraphRoot",
+ "qualifiedName": "codegraph.golden.GraphRoot",
+ "external": false,
+ "unresolved": false
+ },
+ "type": {
+ "id": "as3://String",
+ "qualifiedName": "String",
+ "external": true,
+ "unresolved": false
+ }
+ },
{
"id": "as3://codegraph/golden/GraphRoot#constructor(String)",
"qualifiedName": "codegraph.golden.GraphRoot",
"baseName": "GraphRoot",
"package": "codegraph.golden",
"kind": "constructor",
+ "source": "codegraph/golden/GraphRoot.as",
+ "visibility": "public",
"declaringType": {
"id": "as3://codegraph/golden/GraphRoot",
"qualifiedName": "codegraph.golden.GraphRoot",
@@ -162,6 +214,8 @@
"baseName": "execute",
"package": "codegraph.golden",
"kind": "method",
+ "source": "codegraph/golden/GraphRoot.as",
+ "visibility": "public",
"declaringType": {
"id": "as3://codegraph/golden/GraphRoot",
"qualifiedName": "codegraph.golden.GraphRoot",
@@ -174,6 +228,12 @@
"external": true,
"unresolved": false
},
+ "implements": {
+ "id":
"as3://codegraph/golden/IGraphContract#execute(String,Number,Array)",
+ "qualifiedName": "execute",
+ "external": false,
+ "unresolved": false
+ },
"parameters": [
{
"name": "required",
@@ -212,6 +272,41 @@
"defaultValue": null
}
]
+ },
+ {
+ "id": "as3://codegraph/golden/GraphRoot#inheritedMethod()",
+ "qualifiedName": "inheritedMethod",
+ "baseName": "inheritedMethod",
+ "package": "codegraph.golden",
+ "kind": "method",
+ "source": "codegraph/golden/GraphRoot.as",
+ "visibility": "public",
+ "modifiers": {
+ "static": false,
+ "final": false,
+ "dynamic": false,
+ "override": true,
+ "abstract": false,
+ "native": false
+ },
+ "declaringType": {
+ "id": "as3://codegraph/golden/GraphRoot",
+ "qualifiedName": "codegraph.golden.GraphRoot",
+ "external": false,
+ "unresolved": false
+ },
+ "returnType": {
+ "id": "as3://void",
+ "qualifiedName": "void",
+ "external": true,
+ "unresolved": false
+ },
+ "overrides": {
+ "id": "as3://codegraph/golden/GraphBase#inheritedMethod()",
+ "qualifiedName": "inheritedMethod",
+ "external": false,
+ "unresolved": false
+ }
}
]
},
@@ -220,7 +315,70 @@
"qualifiedName": "codegraph.golden.IGraphContract",
"baseName": "IGraphContract",
"package": "codegraph.golden",
- "kind": "interface"
+ "kind": "interface",
+ "source": "codegraph/golden/IGraphContract.as",
+ "visibility": "public",
+ "members": [
+ {
+ "id":
"as3://codegraph/golden/IGraphContract#execute(String,Number,Array)",
+ "qualifiedName": "execute",
+ "baseName": "execute",
+ "package": "codegraph.golden",
+ "kind": "method",
+ "source": "codegraph/golden/IGraphContract.as",
+ "visibility": "public",
+ "declaringType": {
+ "id": "as3://codegraph/golden/IGraphContract",
+ "qualifiedName": "codegraph.golden.IGraphContract",
+ "external": false,
+ "unresolved": false
+ },
+ "returnType": {
+ "id": "as3://Boolean",
+ "qualifiedName": "Boolean",
+ "external": true,
+ "unresolved": false
+ },
+ "parameters": [
+ {
+ "name": "required",
+ "type": {
+ "id": "as3://String",
+ "qualifiedName": "String",
+ "external": true,
+ "unresolved": false
+ },
+ "optional": false,
+ "rest": false,
+ "defaultValue": null
+ },
+ {
+ "name": "optional",
+ "type": {
+ "id": "as3://Number",
+ "qualifiedName": "Number",
+ "external": true,
+ "unresolved": false
+ },
+ "optional": true,
+ "rest": false,
+ "defaultValue": 2
+ },
+ {
+ "name": "rest",
+ "type": {
+ "id": "as3://Array",
+ "qualifiedName": "Array",
+ "external": true,
+ "unresolved": false
+ },
+ "optional": false,
+ "rest": true,
+ "defaultValue": null
+ }
+ ]
+ }
+ ]
},
{
"id": "as3://codegraph/golden/packageFunction(String)",
@@ -228,6 +386,8 @@
"baseName": "packageFunction",
"package": "codegraph.golden",
"kind": "function",
+ "source": "codegraph/golden/packageFunction.as",
+ "visibility": "public",
"returnType": {
"id": "as3://Boolean",
"qualifiedName": "Boolean",
@@ -257,7 +417,17 @@
"baseName": "Array",
"package": "",
"kind": "class",
- "external": true
+ "external": true,
+ "origin": "js.swc",
+ "visibility": "public",
+ "modifiers": {
+ "static": false,
+ "final": false,
+ "dynamic": true,
+ "override": false,
+ "abstract": false,
+ "native": false
+ }
},
{
"id": "as3://Boolean",
@@ -265,7 +435,17 @@
"baseName": "Boolean",
"package": "",
"kind": "class",
- "external": true
+ "external": true,
+ "origin": "js.swc",
+ "visibility": "public",
+ "modifiers": {
+ "static": false,
+ "final": true,
+ "dynamic": false,
+ "override": false,
+ "abstract": false,
+ "native": false
+ }
},
{
"id": "as3://Number",
@@ -273,7 +453,17 @@
"baseName": "Number",
"package": "",
"kind": "class",
- "external": true
+ "external": true,
+ "origin": "js.swc",
+ "visibility": "public",
+ "modifiers": {
+ "static": false,
+ "final": true,
+ "dynamic": false,
+ "override": false,
+ "abstract": false,
+ "native": false
+ }
},
{
"id": "as3://Object",
@@ -281,7 +471,17 @@
"baseName": "Object",
"package": "",
"kind": "class",
- "external": true
+ "external": true,
+ "origin": "js.swc",
+ "visibility": "public",
+ "modifiers": {
+ "static": false,
+ "final": false,
+ "dynamic": true,
+ "override": false,
+ "abstract": false,
+ "native": false
+ }
},
{
"id": "as3://String",
@@ -289,7 +489,17 @@
"baseName": "String",
"package": "",
"kind": "class",
- "external": true
+ "external": true,
+ "origin": "js.swc",
+ "visibility": "public",
+ "modifiers": {
+ "static": false,
+ "final": true,
+ "dynamic": false,
+ "override": false,
+ "abstract": false,
+ "native": false
+ }
},
{
"id": "as3://void",
@@ -297,7 +507,16 @@
"baseName": "void",
"package": "",
"kind": "class",
- "external": true
+ "external": true,
+ "visibility": "public",
+ "modifiers": {
+ "static": false,
+ "final": true,
+ "dynamic": false,
+ "override": false,
+ "abstract": false,
+ "native": false
+ }
}
]
}