1 package de.lathanda.eos.vm;
3 import java.util.Map.Entry;
5 import de.lathanda.eos.vm.exceptions.TypeMissMatchException;
7 import java.util.TreeMap;
16 private TreeMap<String, MProcedure> methods;
17 private TreeMap<String, MType> properties;
19 private boolean isAbstract;
26 methods =
new TreeMap<>();
27 properties =
new TreeMap<>();
34 methods.put(signature, m);
38 return methods.get(signature.toString());
42 properties.put(signature, t);
49 while (objType instanceof
MClass) {
50 if (objType ==
this) {
53 objType = ((
MClass) objType).sup;
56 }
else if (sup !=
null) {
85 for (Entry<String, MType> p : properties.entrySet()) {
86 String s = p.getKey();
87 prop.put(s, m.createInitVariable(p.getKey(), p.getValue()));
MProcedure getMethod(String signature)
void addProperty(String signature, MType t)
Object newInstance(Machine m)
MClass(String id, MType sup)
void addMethod(String signature, MProcedure m)
Object createJavaObject(Machine m)
TreeMap< String, Variable > createProperties(Machine m)
Object checkAndCast(Object obj)
Object checkAndCast(Object obj)
Object createJavaObject(Machine m)
TreeMap< String, Variable > createProperties(Machine m)