try name = type.getAttributeType("element_has_name");
OAVAttributeType attr = otype.getAttributeType(attrname); aret.add(new Object[]{attr, key}); otype = attr.getType(); OAVAttributeType attr = otype.getAttributeType(attrname); aret.add(attr); otype = attr.getType(); ret = otype.getAttributeType(slotname);
/** * Ensure that a type has an attribute. * @param object The object. * @param attribute The attribute. * @throws RuntimeException if value is not allowed. */ protected boolean checkTypeHasAttribute(Object object, OAVAttributeType attribute) { if(attribute==null) throw new IllegalArgumentException("Attribute must not null."); OAVObjectType type = attribute.getObjectType() instanceof OAVJavaType ? tmodel.getJavaType(object.getClass()) : (OAVObjectType)types.get(object); if(type==null) throw new RuntimeException("Unknown object type of: "+object); OAVAttributeType attr = type.getAttributeType(attribute.getName()); if(!attribute.equals(attr)) throw new RuntimeException("Attribute must belong to object type: "+attribute+", "+type); return true; }
OAVAttributeType attr = otype.getAttributeType(attrname); aret.add(new Object[]{attr, key}); otype = attr.getType(); OAVAttributeType attr = otype.getAttributeType(attrname); aret.add(attr); otype = attr.getType(); ret = otype.getAttributeType(slotname);
/** * Ensure that a type has an attribute. * @param object The object. * @param attribute The attribute. * @throws RuntimeException if value is not allowed. */ protected boolean checkTypeHasAttribute(Object object, OAVAttributeType attribute) { if(attribute==null) throw new IllegalArgumentException("Attribute must not null."); OAVObjectType type = attribute.getObjectType() instanceof OAVJavaType ? tmodel.getJavaType(object.getClass()) : (OAVObjectType)types.get(object); if(type==null) throw new RuntimeException("Unknown object type of: "+object); OAVAttributeType attr = type.getAttributeType(attribute.getName()); if(!attribute.equals(attr)) throw new RuntimeException("Attribute must belong to object type: "+attribute+", "+type); return true; }
/** * Ensure that a type has an attribute. * @param id The object (oid). * @param attribute The attribute. * @throws RuntimeException if value is not allowed. */ protected boolean checkTypeHasAttribute(Object id, OAVAttributeType attribute) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif if(attribute==null) throw new IllegalArgumentException("Attribute must not null."); OAVObjectType type = attribute.getObjectType() instanceof OAVJavaType ? tmodel.getJavaType(id.getClass()) : getType(id); OAVAttributeType attr = type.getAttributeType(attribute.getName()); if(!attribute.equals(attr)) throw new RuntimeException("Attribute must belong to object type: "+attribute+", "+type); return true; }
/** * Ensure that a type has an attribute. * @param id The object (oid). * @param attribute The attribute. * @throws RuntimeException if value is not allowed. */ protected boolean checkTypeHasAttribute(Object id, OAVAttributeType attribute) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif if(attribute==null) throw new IllegalArgumentException("Attribute must not null."); OAVObjectType type = attribute.getObjectType() instanceof OAVJavaType ? tmodel.getJavaType(id.getClass()) : getType(id); OAVAttributeType attr = type.getAttributeType(attribute.getName()); if(!attribute.equals(attr)) throw new RuntimeException("Attribute must belong to object type: "+attribute+", "+type); return true; }
OAVAttributeType attr = type.getAttributeType( ((FieldAccess)suffixes[i]).getName()); suffs.add(attr);
OAVAttributeType attr = type.getAttributeType( ((FieldAccess)suffixes[i]).getName()); suffs.add(attr);