Commit 3d597bfe authored by Lubomir Bulej's avatar Lubomir Bulej

DiSLFatalException: added a constructor for formatted messages.

ProcInstance: getApplyType()->getMode() which is consistent with the returned type.
WeavingCode: reflect the changes prior to merge of new WeavingCode.
parent 120ff0a6
package ch.usi.dag.disl.exception;
/**
* This exception means, there is something bad in DiSL implementation.
* User should not experience this normally.
*
* Represents a DiSL internal error, which means that there is something bad in
* the implementation of DiSL itself. Users will hopefully encounter this
* exception very rarely.
*/
public class DiSLFatalException extends RuntimeException {
private static final long serialVersionUID = -1367296993008634784L;
public DiSLFatalException() {
super();
//
public DiSLFatalException (final Throwable cause) {
super (cause);
}
public DiSLFatalException(String message, Throwable cause) {
super(message, cause);
public DiSLFatalException (final String message) {
super (message);
}
public DiSLFatalException(String message) {
super(message);
public DiSLFatalException (final String message, final Throwable cause) {
super (message, cause);
}
public DiSLFatalException(Throwable cause) {
super(cause);
public DiSLFatalException (final String format, final Object ... args) {
super (String.format (format, args));
}
}
......@@ -5,22 +5,28 @@ import java.util.List;
import ch.usi.dag.disl.processorcontext.ArgumentProcessorMode;
public class ProcInstance {
private final ArgumentProcessorMode __mode;
private final List <ProcMethodInstance> __methods;
private ArgumentProcessorMode procApplyType;
private List<ProcMethodInstance> methods;
//
public ProcInstance(ArgumentProcessorMode procApplyType,
List<ProcMethodInstance> methods) {
super();
this.procApplyType = procApplyType;
this.methods = methods;
public ProcInstance (
final ArgumentProcessorMode mode,
final List <ProcMethodInstance> methods
) {
__mode = mode;
__methods = methods;
}
public ArgumentProcessorMode getProcApplyType() {
return procApplyType;
//
public ArgumentProcessorMode getMode () {
return __mode;
}
public List<ProcMethodInstance> getMethods() {
return methods;
public List <ProcMethodInstance> getMethods () {
return __methods;
}
}
......@@ -643,7 +643,7 @@ public class WeavingCode {
ProcInstance processor = piResolver.get(shadow, i);
if (processor != null) {
if (processor.getProcApplyType() == ArgumentProcessorMode.METHOD_ARGS) {
if (processor.getMode() == ArgumentProcessorMode.METHOD_ARGS) {
iList.insert(instr, procInMethod(processor));
} else {
iList.insert(instr, procBeforeInvoke(processor));
......
Markdown is supported
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