@Override public Object apply(final CacheKey k, final Object v) { if (v instanceof PropertyAccessor) { return v; } final Class<?> standardImpl = getImplementation(type); final PropertyAccessor accessor; if (SpecialCases.isSpecialCase(type)) { accessor = new SpecialCases(citation, type, k.type, standardImpl); } else { accessor = new PropertyAccessor(citation, type, k.type, standardImpl); } return accessor; } });
/** * Creates a new property accessor for the specified metadata implementation. * * @param standard the standard which define the {@code type} interface. * @param type the interface implemented by the metadata, which must be * the value returned by {@link MetadataStandard#findInterface(CacheKey)}. * @param implementation the class of metadata implementations, or {@code type} if none. * @param standardImpl the implementation specified by the {@link MetadataStandard}, or {@code null} if none. * This is the same than {@code implementation} unless a custom implementation is used. */ SpecialCases(final Citation standard, final Class<?> type, final Class<?> implementation, final Class<?> standardImpl) { super(standard, type, implementation, standardImpl); assert isSpecialCase(type) : type; westBoundLongitude = indexOf("westBoundLongitude", true); eastBoundLongitude = indexOf("eastBoundLongitude", true); southBoundLatitude = indexOf("southBoundLatitude", true); northBoundLatitude = indexOf("northBoundLatitude", true); }
/** * Creates a new property accessor for the specified metadata implementation. * * @param standard the standard which define the {@code type} interface. * @param type the interface implemented by the metadata, which must be * the value returned by {@link MetadataStandard#findInterface(CacheKey)}. * @param implementation the class of metadata implementations, or {@code type} if none. * @param standardImpl the implementation specified by the {@link MetadataStandard}, or {@code null} if none. * This is the same than {@code implementation} unless a custom implementation is used. */ SpecialCases(final Citation standard, final Class<?> type, final Class<?> implementation, final Class<?> standardImpl) { super(standard, type, implementation, standardImpl); assert isSpecialCase(type) : type; westBoundLongitude = indexOf("westBoundLongitude", true); eastBoundLongitude = indexOf("eastBoundLongitude", true); southBoundLatitude = indexOf("southBoundLatitude", true); northBoundLatitude = indexOf("northBoundLatitude", true); }
if (SpecialCases.isSpecialCase(type)) { accessor = new SpecialCases(citation, type, k.type, standardImpl); } else {