/** * Work around for RFE #4093999 in Sun's bug database * ("Relax constraint on placement of this()/super() call in constructors"). */ @Workaround(library="JDK", version="1.7") private static Map<String,?> getProperties(final MathTransform transform) { ensureNonNull("transform", transform); if (transform instanceof Parameterized) { final ParameterDescriptorGroup parameters = ((Parameterized) transform).getParameterDescriptors(); if (parameters != null) { return getProperties(parameters, null); } } return Collections.singletonMap(NAME_KEY, NilReferencingObject.UNNAMED); }
/** * Work around for RFE #4093999 in Sun's bug database * ("Relax constraint on placement of this()/super() call in constructors"). */ @Workaround(library="JDK", version="1.7") private static Map<String,?> getProperties(final MathTransform transform) { ensureNonNull("transform", transform); if (transform instanceof Parameterized) { final ParameterDescriptorGroup parameters = ((Parameterized) transform).getParameterDescriptors(); if (parameters != null) { return getProperties(parameters, null); } } return Collections.singletonMap(NAME_KEY, NilReferencingObject.UNNAMED); }
/** * Convenience constructor that creates an operation method from a math transform. * The information provided in the newly created object are approximations, and * usually acceptable only as a fallback when no other information are available. * * @param transform the math transform to describe. */ public DefaultOperationMethod(final MathTransform transform) { super(getProperties(transform)); sourceDimensions = transform.getSourceDimensions(); targetDimensions = transform.getTargetDimensions(); if (transform instanceof Parameterized) { parameters = ((Parameterized) transform).getParameterDescriptors(); } else { parameters = null; } formula = null; }
/** * Convenience constructor that creates an operation method from a math transform. * The information provided in the newly created object are approximative, and * usually acceptable only as a fallback when no other information are available. * * @param transform the math transform to describe. */ public DefaultOperationMethod(final MathTransform transform) { super(getProperties(transform)); sourceDimensions = transform.getSourceDimensions(); targetDimensions = transform.getTargetDimensions(); if (transform instanceof Parameterized) { parameters = ((Parameterized) transform).getParameterDescriptors(); } else { parameters = null; } formula = null; }