CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-org-aspectj--aspectjrt

The AspectJ runtime is a small library necessary to run Java programs enhanced by AspectJ aspects during a previous compile-time or post-compile-time (binary weaving) build step.

Pending
Overview
Eval results
Files

runtime-utilities.mddocs/

Runtime Utilities

Supporting classes for control flow tracking, exception handling, and other runtime services that enable advanced AspectJ features. These utilities provide the infrastructure needed for control flow pointcuts, exception softening, and aspect lifecycle management.

Capabilities

Control Flow Support

/**
 * Represents control flow for cflow and cflowbelow pointcuts
 */
public class CFlow {
    public CFlow();
    public CFlow(Object _aspect);
    public Object getAspect();
    public void setAspect(Object _aspect);
    public Object get(int index);
}

Exception Handling

/**
 * Wrapper for checked exceptions matched by a 'declare soft'
 */
public class SoftException extends RuntimeException {
    public SoftException(Throwable inner);
    public Throwable getWrappedThrowable();
    public Throwable getCause();
}

/**
 * Thrown when there is no aspect of that type currently bound
 */
public class NoAspectBoundException extends RuntimeException {
    public NoAspectBoundException(String aspectName, Throwable inner);
    public NoAspectBoundException();
    public Throwable getCause();
}

Source Location

/**
 * Represents source code location information
 */
public interface SourceLocation {
    Class getWithinType();
    String getFileName();
    int getLine();
    int getColumn();
}

Usage Examples

// Exception handling
try {
    riskyOperation();
} catch (SoftException e) {
    Throwable original = e.getWrappedThrowable();
    System.out.println("Softened exception: " + original.getClass().getName());
}

// Source location access
@Before("execution(* com.example..*.*(..))")
public void logLocation(JoinPoint joinPoint) {
    SourceLocation loc = joinPoint.getSourceLocation();
    if (loc != null) {
        System.out.println("Called from: " + loc.getFileName() + ":" + loc.getLine());
    }
}

Install with Tessl CLI

npx tessl i tessl/maven-org-aspectj--aspectjrt

docs

annotation-based-definition.md

aspect-management.md

index.md

join-point-introspection.md

reflection-api.md

runtime-utilities.md

signature-system.md

tile.json