@Test public void obtaining_existing_data_type() throws Exception { ListDataType t = ListDataType.list_of(m_type, m_scope); assertSame(m_list_type, t); }
public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new ListDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, ListDataType.class); return (ListDataType) found; }
ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new ListDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, ListDataType.class); return (ListDataType) found; } }
ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new ListDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, ListDataType.class); return (ListDataType) found; } ListDataType(DataType inner_type, AnyType any); }
ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new ListDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, ListDataType.class); return (ListDataType) found; } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Override boolean is_abstract(); }
ListDataType extends CollectionDataType { public static ListDataType list_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_list_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new ListDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, ListDataType.class); return (ListDataType) found; } ListDataType(DataType inner_type, AnyType any); static final String build_list_name(DataType inner); static ListDataType list_of(DataType inner, PrimitiveScope pscope); @Override ListDataValue make(); @Override boolean is_abstract();  }