/** * @see TypeDescription#addFeature(String, String, String) */ public FeatureDescription addFeature(String aFeatureName, String aDescription, String aRangeTypeName) { return addFeature(aFeatureName, aDescription, aRangeTypeName, null, null); }
/** * Creates a new TypeDescription_impl with the specified field values. * * @param aName * name of the Type * @param aDescription - * @param aSupertypeName * name of the type's supertype */ public TypeDescription_impl(String aName, String aDescription, String aSupertypeName) { setName(aName); setDescription(aDescription); setSupertypeName(aSupertypeName); }
/** * @see TypeDescription#addFeature(String, String, String, String, Boolean) */ public FeatureDescription addFeature(String aFeatureName, String aDescription, String aRangeTypeName, String aElementTypeName, Boolean aMultipleReferencesAllowed) { // create new feature description FeatureDescription newFeature = new FeatureDescription_impl(aFeatureName, aDescription, aRangeTypeName, aElementTypeName, aMultipleReferencesAllowed); // add to array FeatureDescription[] features = getFeatures(); if (features == null) { setFeatures(new FeatureDescription[] { newFeature }); } else { FeatureDescription[] newArray = new FeatureDescription[features.length + 1]; System.arraycopy(features, 0, newArray, 0, features.length); newArray[features.length] = newFeature; setFeatures(newArray); } return newFeature; }
/** * @see TypeSystemDescription#addType(String, String, String) */ public TypeDescription addType(String aTypeName, String aDescription, String aSupertypeName) { // create new type description TypeDescription newType = new TypeDescription_impl(aTypeName, aDescription, aSupertypeName); // add to array TypeDescription[] types = getTypes(); if (types == null) { setTypes(new TypeDescription[] { newType }); } else { TypeDescription[] newArray = new TypeDescription[types.length + 1]; System.arraycopy(types, 0, newArray, 0, types.length); newArray[types.length] = newType; setTypes(newArray); } return newType; }