All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.adoptopenjdk.jitwatch.model.JITEvent Maven / Gradle / Ivy

Go to download

A Maven plugin that scans the project artifact and its dependencies for methods that cannot be inlined by the JIT compiler. It uses the JarScan utility from the JITWatch project to do that. See https://github.com/AdoptOpenJDK/jitwatch .

There is a newer version: 1.1
Show newest version
/*
 * Copyright (c) 2013, 2014 Chris Newland.
 * Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
 * Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
 */
package org.adoptopenjdk.jitwatch.model;

import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_COLON;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_SPACE;

import org.adoptopenjdk.jitwatch.util.StringUtil;

public class JITEvent
{
    private long stamp;
    private EventType eventType;
    private IMetaMember eventMember;
    private String stampString;

    public JITEvent(long stamp, EventType eventType, IMetaMember eventMember)
    {
        this.stamp = stamp;
        this.eventType = eventType;
        this.eventMember = eventMember;

        this.stampString = StringUtil.formatTimestamp(stamp, true);
    }

    public long getStamp()
    {
        return stamp;
    }

    public EventType getEventType()
    {
        return eventType;
    }

    public IMetaMember getEventMember()
    {
        return eventMember;
    }

    @Override
    public String toString()
    {
        StringBuilder sb = new StringBuilder();

        sb.append(stampString).append(C_SPACE);

        sb.append(StringUtil.alignRight(eventType.getText(), 14)).append(C_SPACE).append(C_COLON).append(C_SPACE);
     
        sb.append(eventMember.toString());

        return sb.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy