/** * Create a Java type. * @param clazz The java class. * @param kind The kind of type as defined in OAVJavaType. * @return The new type. */ public OAVJavaType createJavaType(Class clazz, String kind) { OAVJavaType type = new OAVJavaType(clazz, kind, this); if(contains(type)) throw new RuntimeException("Type already exists: "+clazz); types.put(SReflect.getClassName(clazz), type); return type; }
/** * Create a Java type. * @param clazz The java class. * @param kind The kind of type as defined in OAVJavaType. * @return The new type. */ public OAVJavaType createJavaType(Class clazz, String kind) { OAVJavaType type = new OAVJavaType(clazz, kind, this); if(contains(type)) throw new RuntimeException("Type already exists: "+clazz); types.put(SReflect.getClassName(clazz), type); return type; }
ret = new OAVJavaType(clazz, kind, this);
ret = new OAVJavaType(clazz, kind, this);
ret = new OAVJavaType(clazz, kind, this);
ret = new OAVJavaType(clazz, kind, this);
/** * Create a java type if it does not already exist. * Required because some (user) Java types are created * on the fly when loading agent models * (e.g. Map in TranslationC1). */ protected static OAVJavaType createJavaType(Class clazz, String kind) { OAVJavaType ret; if(bdi_rt_model.contains(new OAVJavaType(clazz, kind, bdi_rt_model))) { ret = bdi_rt_model.getJavaType(clazz); } else { ret = bdi_rt_model.createJavaType(clazz, kind); } return ret; } }