Commit 67d3b846 authored by Petr Tuma's avatar Petr Tuma
Browse files

Example for synthetic local variable

parent 8b4182e6
Pipeline #8247 passed with stages
in 3 minutes and 46 seconds
<project name="disl-example" basedir="." default="build">
<import file="../build-example.xml" />
public class Main {
public static void main(String[] args) {
System.out.println("Application: Inside method main");
import ch.usi.dag.disl.annotation.After;
import ch.usi.dag.disl.annotation.AfterReturning;
import ch.usi.dag.disl.annotation.Before;
import ch.usi.dag.disl.annotation.SyntheticLocal;
import ch.usi.dag.disl.marker.BodyMarker;
public class DiSLClass {
public static long timeBefore;
@Before(marker = BodyMarker.class, scope = "Main.main")
public static void beforemain() {
System.out.println("Instrumentation: Before method main");
timeBefore = System.nanoTime ();
@After(marker = BodyMarker.class, scope = "Main.main")
public static void aftermain() {
long timeAfter = System.nanoTime ();
System.out.println("Instrumentation: After method main which took " + (timeAfter - timeBefore) + "ns");
Manifest-Version: 1.0
DiSL-Classes: DiSLClass
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment