Classes

class Classes : Core<ClassNode> , Annotatable<ClassNode> , FilterableByAccessFlag<ClassNode> , FilterableByVisibility<ClassNode> , FilterableByType<ClassNode> , CommonOperations<ClassNode, Classes> , ParentOperations<ClassNode, Classes> (source)

Classes scope.

See also

Functions

Link copied to clipboard
open override fun annotatedBy(annotation: SiftType)

Filter elements that are decorated by annotation

Link copied to clipboard
inline fun <T> Annotatable<*>.annotatedBy()
Link copied to clipboard
open override fun annotations(filter: SiftType?, f: Annotations.() -> Unit)
open override fun annotations(label: String?, filter: SiftType?, f: Annotations.() -> Unit)
Link copied to clipboard
open override fun editor(vararg ops: TextTransformer): Action<Iter<ClassNode>, IterValues>

internal function primarily used during graphviz dot generation

Link copied to clipboard
open override fun entity(id: Entity.Type, vararg properties: Property<ClassNode>)
open override fun entity(id: Entity.Type, labelFormatter: LabelFormatter, vararg properties: Property<ClassNode>)

register entity

open override fun entity(id: Entity.Type, errorIfExists: Boolean, vararg properties: Property<ClassNode>)

new entity with label inferred from introspected bytecode element

open override fun entity(id: Entity.Type, labelFormatter: LabelFormatter, errorIfExists: Boolean, vararg properties: Property<ClassNode>)

new entity with label from labelFormatter

Link copied to clipboard
fun enums(f: Fields.() -> Unit)
fun enums(label: String?, f: Fields.() -> Unit)
Link copied to clipboard
fun fields(inherited: Boolean = false, f: Fields.() -> Unit)

iterates fields of current classes. When inherited is true, fields inherited from super classes are included too.

fun fields(label: String?, inherited: Boolean = false, f: Fields.() -> Unit)
Link copied to clipboard
open override fun filter(regex: Regex, invert: Boolean)
open fun filter(string: String, invert: Boolean = false)

fun filter(entity: Entity.Type)

Filters elements that belongs to entity.

open override fun filter(vararg modifiers: AccessFlags, invert: Boolean)

filter elements by access modifiers

open override fun filter(modifiers: List<AccessFlags>, invert: Boolean)

filter elements by access flags

open override fun filter(access: Visibility, invert: Boolean)

filter elements by visibility

Link copied to clipboard
open override fun filterType(type: SiftType)

Filters elements to include only those representing a matching type.

Link copied to clipboard
fun implements(type: SiftType)

Filters the currently inspected class nodes by checking if they implement a particular type.

Link copied to clipboard
fun interfaces(recursive: Boolean = false, synthesize: Boolean = false, f: Classes.() -> Unit)

Iterates the interfaces of current class nodes. Includes interfaces of super class. Includes interfaces from all ancestors if recursive is true.

Link copied to clipboard
open override fun label(pattern: String, vararg ops: TextTransformer): LabelFormatter

Set the entity label from a pattern, replacing any ${} variables inside pattern with values from Entity.properties.

Link copied to clipboard
open override fun log(tag: String)

When --debug is passed to the CLI, prints tag and all elements currently in scope.

Link copied to clipboard
open override fun logCount(tag: String)

When --debug is passed to the CLI, prints tag and the count of elements currently in scope.

Link copied to clipboard
fun methods(inherited: Boolean, f: Methods.() -> Unit)

iterates methods of current classes. When inherited is true, fields inherited from super classes are included too.

fun methods(selection: MethodSelectionFilter = MethodSelection.declared, f: Methods.() -> Unit)
fun methods(label: String?, selection: MethodSelectionFilter = MethodSelection.declared, f: Methods.() -> Unit)
Link copied to clipboard
open override fun outerScope(label: String, f: Classes.() -> Unit)

iterates any outer classes

Link copied to clipboard
open override fun property(key: String, extract: Action<Iter<ClassNode>, IterValues>): Property<ClassNode>
open override fun property(entity: Entity.Type, key: String, extract: Action<Iter<ClassNode>, IterValues>)

open override fun property(key: String, strategy: PropertyStrategy, extract: Action<Iter<ClassNode>, IterValues>): Property<ClassNode>

Associates entity property tag with result of extract action.

open override fun property(entity: Entity.Type, key: String, strategy: PropertyStrategy, extract: Action<Iter<ClassNode>, IterValues>)

updates existing entities with property

Link copied to clipboard
open override fun readAnnotation(annotation: SiftType, attribute: String): Action<Iter<ClassNode>, IterValues>

Reads the element value of the attribute name belonging to annotation. If the element value is an array, the array is flattened when added to entity properties.

inline fun <T : Annotation> readAnnotation(field: KProperty1<T, *>): Action<IterClasses, IterValues>
Link copied to clipboard
open override fun readName(shorten: Boolean): Action<Iter<ClassNode>, IterValues>

Reads the short form name of the element

Link copied to clipboard
fun readType(): Action<IterClasses, IterValues>
Link copied to clipboard
open override fun scope(label: String, f: Classes.() -> Unit)
open override fun scope(label: String, op: ScopeEntityPredicate, entity: Entity.Type, f: Classes.() -> Unit)
Link copied to clipboard
open operator override fun Entity.Type.set(key: String, children: Entity.Type)

This entity tracks children under the label denoted by key.

Link copied to clipboard
fun superclass(f: Signature.() -> Unit)
Link copied to clipboard
open override fun <E : Enum<E>> withValue(value: E): Action<Iter<ClassNode>, IterValues>
open override fun withValue(value: Boolean): Action<Iter<ClassNode>, IterValues>
open override fun withValue(value: Number): Action<Iter<ClassNode>, IterValues>
open override fun withValue(value: String): Action<Iter<ClassNode>, IterValues>

open override fun withValue(value: Entity.Type): Action<Iter<ClassNode>, IterValues>

Associates value with entity.