Documentation ¶
Overview ¶
Package bind implements a code generator for gobind.
See the documentation on the gobind command for usage details and the list of currently supported types. (http://godoc.org/github.com/thommil/tge-mobile/cmd/gobind)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenGo ¶
func GenGo(conf *GeneratorConfig) error
GenGo generates a Go stub to support foreign language APIs.
func JavaClassName ¶
JavaClassName returns the name of the Java class that contains Go package level identifiers.
Types ¶
type ClassGen ¶
type ClassGen struct { *Printer // JavaPkg is the Java package prefix for the generated classes. The prefix is prepended to the Go // package name to create the full Java package name. JavaPkg string // contains filtered or unexported fields }
ClassGen generates Go and C stubs for Java classes so import statements on the form
import "Java/classpath/to/Class"
will work.
func (*ClassGen) GenInterfaces ¶
func (g *ClassGen) GenInterfaces()
func (*ClassGen) GenPackage ¶
type Generator ¶
type Generator struct { *Printer Fset *token.FileSet AllPkg []*types.Package Files []*ast.File Pkg *types.Package // contains filtered or unexported fields }
Generator contains the common Go package information needed for the specific Go, Java, ObjC generators.
After setting Printer, Fset, AllPkg, Pkg, the Init method is used to initialize the auxiliary information about the package to be generated, Pkg.
type GeneratorConfig ¶
type JavaGen ¶
type JavaGen struct { // JavaPkg is the Java package prefix for the generated classes. The prefix is prepended to the Go // package name to create the full Java package name. JavaPkg string *Generator // contains filtered or unexported fields }
func (*JavaGen) ClassNames ¶
ClassNames returns the list of names of the generated Java classes and interfaces.
type ObjcGen ¶
type ObjcWrapper ¶
type ObjcWrapper struct { *Printer // contains filtered or unexported fields }
ObjCWrapper generates Go and C stubs for ObjC interfaces and protocols.
func (*ObjcWrapper) GenGo ¶
func (g *ObjcWrapper) GenGo()
func (*ObjcWrapper) GenH ¶
func (g *ObjcWrapper) GenH()
func (*ObjcWrapper) GenInterfaces ¶
func (g *ObjcWrapper) GenInterfaces()
func (*ObjcWrapper) GenM ¶
func (g *ObjcWrapper) GenM()
func (*ObjcWrapper) GenPackage ¶
func (g *ObjcWrapper) GenPackage(idx int)
func (*ObjcWrapper) Init ¶
func (g *ObjcWrapper) Init(types []*objc.Named, genNames []string)
Init initializes the ObjC types wrapper generator. Types is the list of types to wrap, genNames the list of generated type names.
func (*ObjcWrapper) Packages ¶
func (g *ObjcWrapper) Packages() []string
Packages return the list of Go packages to be generated.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package java implements the Java language bindings.
|
Package java implements the Java language bindings. |
Package objc implements the Objective-C language bindings.
|
Package objc implements the Objective-C language bindings. |
Package seq implements the machine-dependent seq serialization format.
|
Package seq implements the machine-dependent seq serialization format. |