package api
- Alphabetic
- Public
- All
Type Members
-
case class
ApexSummary(typeSummary: TypeSummary, diagnostics: List[Diagnostic]) extends Product with Serializable
Summary of an Apex class with diagnostic information
-
case class
BlockSummary(isStatic: Boolean, dependents: Set[DependentSummary]) extends Product with Serializable
Summary of a initialiser block
-
case class
ConstructorSummary(idRange: Option[RangeLocation], modifiers: List[String], parameters: List[ParameterSummary], dependents: Set[DependentSummary]) extends Product with Serializable
Summary of a type constructor
-
class
DefaultLogger extends Logger
Default logging support, info goes to stdout, error & debug to stderr
-
sealed
trait
DependentSummary extends AnyRef
Dependency information interface for detailing types of dependency
-
case class
Diagnostic(category: String, location: Location, message: String) extends Product with Serializable
A diagnostic message, category tells us what type of diagnostic this is while location and messages provide details
-
case class
FieldDependentSummary(typeId: TypeIdentifier, name: String) extends DependentSummary with Product with Serializable
Dependency information for a field
Dependency information for a field
- Annotations
- @key( "Field" )
-
case class
FieldSummary(idRange: Option[RangeLocation], name: String, modifiers: List[String], typeName: TypeName, readAccess: String, writeAccess: String, dependents: Set[DependentSummary]) extends Product with Serializable
Summary of a type field (or property)
-
class
IssueOptions extends AnyRef
Options available when retrieving Org issues.
-
case class
LineLocation(line: Int) extends Location with Product with Serializable
Single line location
-
case class
LineRangeLocation(start: Int, end: Int) extends Location with Product with Serializable
Range of lines location
-
sealed
trait
Location extends AnyRef
Location interface for identify a sub-part of a file
-
trait
Logger extends AnyRef
Logging interface
-
case class
MethodDependentSummary(typeId: TypeIdentifier, name: String, parameters: List[ParameterSummary]) extends DependentSummary with Product with Serializable
Dependency information for a method
Dependency information for a method
- Annotations
- @key( "Method" )
-
case class
MethodSummary(idRange: Option[RangeLocation], name: String, modifiers: List[String], typeName: TypeName, parameters: List[ParameterSummary], dependents: Set[DependentSummary]) extends Product with Serializable
Summary of a type method
-
case class
Name(value: String) extends Product with Serializable
Case insensitive string for symbol names.
Case insensitive string for symbol names.
The value of the Name is stored as is but equality and hashing are performed against a normalised lower case value.
- Annotations
- @key( "Name" )
-
trait
Org extends AnyRef
A virtual Org used to present the analysis functionality in a familiar way.
A virtual Org used to present the analysis functionality in a familiar way.
All analysis works within the context of a virtual Org. You can manage multiple of these at the same time but most use cases just need one creating, see Org.newOrg(). The Org functions as a container of multiple Package objects and maintains a set of discovered issues from the analysis of the package metadata. All orgs have at least one 'unmanaged' package identifiable by having no namespace.
In the simple case after creating an Org, you should add one or more packages detailing where package metadata is stored. Adding large packages can take considerable CPU and memory resources. Once the packages are loaded the metadata within them can be mutated using the Package methods. At any point you can list of current issues with the packages from getIssues.
The disk cache that supports quicker loading is only updated by calling flush(). You should call this after all packages have been loaded and periodically after that if mutating metadata to ensure the cache is kept upto date.
Orgs and Packages are not thread safe, serialise all calls to them.
-
trait
Package extends AnyRef
A virtual Package constructed from metadata.
A virtual Package constructed from metadata.
Packages must be created in the context of a specific Org. Each Package manages a set of Types which are created from the metadata of the package. Once constructed you can use the package APIs to introspect dependency relationships between Types, obtain summary and view information about Types and replace or delete Types.
A key concept to understand in this API is that a Type may be created from multiple metadata files, e.g. the System.Labels Type is always present but can be constructed from several labels files. The API methods expose Types via the TypeIdentifiers which you don't need to understand to use the API as long as you keep in mind the 1:M mapping between Types and Paths.
The term dependency can be rather ambiguous, we use it here to mean a 'using' relationship. So if class A calls a method on class B, we say A has a dependency that is B. The reverse relationship is a 'dependency holder', so B has a dependency holder that is A. Transitives of dependencies or dependency holder relationships are not exposed by these APIs but can be easily obtained by recursive iteration.
The package upsert & deletion model does not support invalidation handling that is typically used to cause dependency holders to be re-analysed when a dependency changes. This again can be handled via recursive iteration of the methods provided.
Summary and View information provide two different levels of looking at the structure of Types. In summary form only the most important details are provided but it is essentially free to access since it is the same format used in the disk cache. View information requires both more CPU and memory to use but can provide fuller details on the implementations of Apex classes.
Packages only handle metadata that is important to Apex class analysis, other forms of metadata that might appear in the package directory are ignored.
-
case class
ParameterSummary(name: String, typeName: TypeName) extends Product with Serializable
Summary of a constructor or method parameters
-
case class
PathLocation(path: String, location: Location) extends Product with Serializable
Combined path and location within the path
-
case class
PointLocation(position: Position) extends Location with Product with Serializable
Single position location
-
case class
Position(line: Int, offset: Int) extends Product with Serializable
Position in a file
-
case class
RangeLocation(start: Position, end: Position) extends Location with Product with Serializable
Range between to positions
-
case class
TypeDependentSummary(typeId: TypeIdentifier, sourceHash: Int) extends DependentSummary with Product with Serializable
Dependency information for a type
Dependency information for a type
- Annotations
- @key( "Type" )
-
case class
TypeIdentifier(namespace: Option[Name], typeName: TypeName) extends Product with Serializable
Identifier for a specific type within an Org.
Identifier for a specific type within an Org.
The provided namespace is used to locate a package which qualifies the meaning of the type name. This is useful when the type name may not contain a namespace or it may be visible across package such as with global classes.
-
case class
TypeName(name: Name, params: Seq[TypeName], outer: Option[TypeName]) extends Product with Serializable
Representation of a type name with optional type arguments.
Representation of a type name with optional type arguments.
The outer value provides an optional enclosing type name to allow for qualifying inner types. The outer may also be used to scope a type to a specific namespace. The mapping between a type name and its toString value is mostly straight forward but for some internally defined types toString will produce better formatted output so it is advised you always use this when displaying a TypeName.
- Annotations
- @key( "TypeName" )
-
case class
TypeSummary(sourceHash: Int, idRange: Option[RangeLocation], name: String, typeName: TypeName, nature: String, modifiers: List[String], superClass: Option[TypeName], interfaces: List[TypeName], blocks: List[BlockSummary], fields: List[FieldSummary], constructors: List[ConstructorSummary], methods: List[MethodSummary], nestedTypes: List[TypeSummary], dependents: Set[DependentSummary]) extends Product with Serializable
Summary of a type
-
trait
ViewInfo extends AnyRef
Detailed view of an ApexClass.
Detailed view of an ApexClass.
This is currently WIP and will be expanded later.
Value Members
- object ApexSummary extends Serializable
- object BlockSummary extends Serializable
- object ConstructorSummary extends Serializable
- object DependentSummary
- object Diagnostic extends Serializable
- object FieldDependentSummary extends Serializable
- object FieldSummary extends Serializable
- object LineLocation extends Serializable
- object LineRangeLocation extends Serializable
- object Location
- object MethodDependentSummary extends Serializable
- object MethodSummary extends Serializable
- object Name extends Serializable
- object Org
- object ParameterSummary extends Serializable
- object PathLocation extends Serializable
- object PointLocation extends Serializable
- object Position extends Serializable
- object RangeLocation extends Serializable
-
object
ServerOps
Collection of Ops functions for changing global behaviours
- object TypeDependentSummary extends Serializable
- object TypeIdentifier extends Serializable
- object TypeName extends Serializable
- object TypeSummary extends Serializable