@Test public void testType() { assertEquals( ProjectedCRS.class, AuthorityFactoryProxy.getType( ProjectedCRS.class)); assertEquals( ProjectedCRS.class, AuthorityFactoryProxy.getType( DefaultProjectedCRS.class)); assertEquals( GeographicCRS.class, AuthorityFactoryProxy.getType( GeographicCRS.class)); assertEquals( GeographicCRS.class, AuthorityFactoryProxy.getType(DefaultGeographicCRS.class)); assertEquals( DerivedCRS.class, AuthorityFactoryProxy.getType( DefaultDerivedCRS.class)); assertEquals(CoordinateReferenceSystem.class, AuthorityFactoryProxy.getType( AbstractDerivedCRS.class)); assertEquals( GeodeticDatum.class, AuthorityFactoryProxy.getType(DefaultGeodeticDatum.class)); }
public static Class getType( final Class type) throws IllegalArgumentException { for (int i=0; i<TYPES.length; i++) { final Class candidate = TYPES[i]; if (candidate.isAssignableFrom(type)) { return candidate; } } throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_CLASS_$2, type, IdentifiedObject.class)); }
AuthorityFactoryProxy { public static Class getType( final Class type) throws IllegalArgumentException { for (int i=0; i<TYPES.length; i++) { final Class candidate = TYPES[i]; if (candidate.isAssignableFrom(type)) { return candidate; } } throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_CLASS_$2, type, IdentifiedObject.class)); } }
AuthorityFactoryProxy { public static Class getType( final Class type) throws IllegalArgumentException { for (int i=0; i<TYPES.length; i++) { final Class candidate = TYPES[i]; if (candidate.isAssignableFrom(type)) { return candidate; } } throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_CLASS_$2, type, IdentifiedObject.class)); } AuthorityFactoryProxy(); }
AuthorityFactoryProxy { public static Class getType( final Class type) throws IllegalArgumentException { for (int i=0; i<TYPES.length; i++) { final Class candidate = TYPES[i]; if (candidate.isAssignableFrom(type)) { return candidate; } } throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_CLASS_$2, type, IdentifiedObject.class)); } AuthorityFactoryProxy(); static AuthorityFactoryProxy getInstance(final AuthorityFactory factory,
                                                    Class/*<? extends IdentifiedObject>*/ type); static Class getType(
            final Class/*<? extends IdentifiedObject>*/ type); abstract Class getType(); abstract AuthorityFactory getAuthorityFactory(); final Set getAuthorityCodes(); abstract IdentifiedObject create(String code); @Override String toString(); }
AuthorityFactoryProxy { public static Class getType( final Class type) throws IllegalArgumentException { for (int i=0; i<TYPES.length; i++) { final Class candidate = TYPES[i]; if (candidate.isAssignableFrom(type)) { return candidate; } } throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_CLASS_$2, type, IdentifiedObject.class)); } AuthorityFactoryProxy(); static AuthorityFactoryProxy getInstance(final AuthorityFactory factory,
                                                    Class/*<? extends IdentifiedObject>*/ type); static Class getType(
            final Class/*<? extends IdentifiedObject>*/ type); abstract Class getType(); abstract AuthorityFactory getAuthorityFactory(); final Set getAuthorityCodes(); abstract IdentifiedObject create(String code); @Override String toString();  }