blob: f8cc9f8e165504943e1be45904a254b4ebf4ee46 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2011, 2018 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.rj.server.dbg;
import java.io.IOException;
import org.eclipse.statet.rj.data.RJIO;
import org.eclipse.statet.rj.data.RJIOExternalizable;
public class TracepointEvent implements Tracepoint, RJIOExternalizable {
public static final byte KIND_ABOUT_TO_HIT= 0x01;
private final byte kind;
private final int type;
private final String filePath;
private final long id;
private final String label;
private final int flags;
private final String message;
public TracepointEvent(final byte kind, final int type, final String filePath, final long id,
final String label, final int flags, final String message) {
this.kind= kind;
this.type= type;
this.filePath= filePath;
this.id= id;
this.label= label;
this.flags= flags;
this.message= message;
}
public TracepointEvent(final RJIO io) throws IOException {
this.kind= io.readByte();
this.type= io.readInt();
this.filePath= io.readString();
this.id= io.readLong();
this.label= io.readString();
this.flags= io.readInt();
this.message= io.readString();
}
@Override
public void writeExternal(final RJIO io) throws IOException {
io.writeByte(this.kind);
io.writeInt(this.type);
io.writeString(this.filePath);
io.writeLong(this.id);
io.writeString(this.label);
io.writeInt(this.flags);
io.writeString(this.message);
}
public byte getKind() {
return this.kind;
}
@Override
public int getType() {
return this.type;
}
public String getFilePath() {
return this.filePath;
}
public long getId() {
return this.id;
}
public String getLabel() {
return this.label;
}
public int getFlags() {
return this.flags;
}
}