as3

package module
v0.0.0-...-c5d5a29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2017 License: MIT Imports: 2 Imported by: 0

README

go-as3

GoDoc Build Status Go Report Card Go Coverage

The as3 package provides utilities to read an ActionScript 3 bytecode file and manipulate it

Documentation

Overview

Package as3 provides utilities to read an ActionScript 3 bytecode file and manipulate it

Index

Constants

This section is empty.

Variables

View Source
var ErrLinkerUnknownTrait = errors.New("linker unknown trait")

ErrLinkerUnknownTrait means that an unknown trait_info kind was found when build a TraitsObject

Functions

This section is empty.

Types

type AbcFile

type AbcFile struct {
	Source  *bytecode.AbcFile
	Classes []Class
	Methods []Method
}

AbcFile represents a linked AbcFile

func Link(abcFile *bytecode.AbcFile) (AbcFile, error)

Link produces a linked version of the AbcFile provided. It : - Links instance_info and class_info and resolve informations about each class - Resolve method names, parameters and return types and link method_body_info when the method has a body

func (AbcFile) GetClassByName

func (f AbcFile) GetClassByName(name string) (Class, bool)

GetClassByName finds a class by its name. If multiple classes have the same name (but not the same namespace) the first occurence is returned

type Class

type Class struct {
	InstanceInfo   bytecode.InstanceInfo
	ClassInfo      bytecode.ClassInfo
	Name           string
	Namespace      string
	SuperName      string
	Interfaces     []string
	InstanceTraits TraitsObject
	ClassTraits    TraitsObject
}

Class represents an actionscript Class

type Method

type Method struct {
	Info       bytecode.MethodInfo
	BodyInfo   bytecode.MethodBodyInfo
	HasBody    bool
	Name       string
	ReturnType string
	ParamTypes []string
}

Method represents a linked method

type Trait

type Trait struct {
	Source   bytecode.TraitsInfo
	Name     string
	Typename string
}

Trait represents a single trait from a TraitsObject

type TraitsObject

type TraitsObject struct {
	Slots     []Trait
	Classes   []Trait
	Functions []Trait
	Methods   []Trait
}

TraitsObject represents an object that has traits

Directories

Path Synopsis
Package bytecode provides utilities to parse ActionScript 3 bytecode Terms are used according to the specification's definitions (see http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/actionscript/articles/avm2overview.pdf)
Package bytecode provides utilities to parse ActionScript 3 bytecode Terms are used according to the specification's definitions (see http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/actionscript/articles/avm2overview.pdf)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL