Help us shape the future of Go! Take the 2026 Go Developer Survey

servicemap

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildServiceMap

func BuildServiceMap(
	frameworksBasePath string,
) (map[string]ServiceMapEntry, error)

BuildServiceMap reads Context.java and SystemServiceRegistry.java from the given frameworks-base path and returns a map from service name to ServiceMapEntry. The returned map is keyed by service name (e.g. "power", "account").

func ExtractContextConstants

func ExtractContextConstants(src string) map[string]string

ExtractContextConstants parses a Java source string and returns a map of constant name to service name value for all fields matching the pattern: public static final String XXX_SERVICE = "value".

func ExtractStringConstants

func ExtractStringConstants(src string) map[string]string

ExtractStringConstants parses a Java source string and returns a map of constant name to string value for all public static final String fields.

Types

type Registration

type Registration struct {
	ContextConstant string // e.g. "ACCOUNT_SERVICE"
	AIDLInterface   string // e.g. "IAccountManager"
}

Registration represents a service registration extracted from SystemServiceRegistry.java.

func ExtractRegistrations

func ExtractRegistrations(src string) []Registration

ExtractRegistrations parses a Java source string (typically SystemServiceRegistry.java) and returns the service registrations that use AIDL binder interfaces. Only registerService calls containing a Stub.asInterface invocation are included.

type ServiceMapEntry

type ServiceMapEntry struct {
	ServiceName    string `json:"service_name"`    // e.g. "activity"
	ConstantName   string `json:"constant_name"`   // e.g. "ACTIVITY_SERVICE"
	AIDLInterface  string `json:"aidl_interface"`  // e.g. "IActivityManager" (simple name)
	AIDLDescriptor string `json:"aidl_descriptor"` // e.g. "android.app.IActivityManager" (fully qualified)
}

ServiceMapEntry represents a fully resolved service mapping from service name to its AIDL interface descriptor.

Jump to

Keyboard shortcuts

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