ZeroDivide.java
/**
* Copyright 2010,2021 Nikolas S Boyd.
Permission is granted to copy this work provided this copyright statement is retained in all copies.
*/
package Hoot.Exceptions;
import Hoot.Runtime.Functions.*;
import Hoot.Runtime.Faces.*;
import Hoot.Runtime.Values.*;
import Hoot.Runtime.Blocks.*;
import Smalltalk.Core.*;
import Smalltalk.Blocks.*;
import Smalltalk.Magnitudes.*;
import Hoot.Behaviors.*;
import Hoot.Behaviors.Nil;
import Hoot.Behaviors.Object;
import Hoot.Behaviors.True;
import Hoot.Behaviors.False;
import Hoot.Behaviors.Boolean;
import Hoot.Magnitudes.*;
import Hoot.Magnitudes.Integer;
import Hoot.Magnitudes.Character;
import Hoot.Magnitudes.Float;
import Hoot.Magnitudes.Double;
import Hoot.Collections.*;
import Hoot.Collections.String;
import Hoot.Magnitudes.Number;
public class ZeroDivide extends ArithmeticError
{
public static Metaclass type() { return (Metaclass)Metaclass.$class; }
@Override public Metaclass $class() { return (Metaclass)Metaclass.$class; }
public static class Metaclass extends ArithmeticError.Metaclass
{
static final ZeroDivide.Metaclass $class = new ZeroDivide.Metaclass();
public Metaclass() {
this(ZeroDivide.Metaclass.class);
}
public Metaclass(java.lang.Class aClass) {
super(aClass);
}
@Override public java.lang.Class outerClass() { return ZeroDivide.class; }
/**
* @return
*/
public ZeroDivide dividend(final Number aDividend)
{
java.lang.String exitID = "ZeroDivideMetatype>>dividend";
Frame f0 = new Frame(exitID);
return f0.evaluate(() -> {
return (ZeroDivide)f0.exit(exitID, ((ZeroDivide)new ZeroDivide(aDividend).signal()));
});
}
}
protected Number dividend;
/**
*
*/
public ZeroDivide(final Number aDividend)
{
super();
java.lang.String exitID = "ZeroDivide>>ZeroDivide";
Frame f0 = new Frame(exitID);
dividend = aDividend;
}
/**
* @return
*/
public Number dividend()
{
java.lang.String exitID = "ZeroDivide>>dividend";
Frame f0 = new Frame(exitID);
return (Number)dividend;
}
/**
* @return
*/
@Override public Boolean isResumable()
{
java.lang.String exitID = "ZeroDivide>>isResumable";
Frame f0 = new Frame(exitID);
return (Boolean)True.literal();
}
}