Package org.broadinstitute.gatk.utils.exceptions

Examples of org.broadinstitute.gatk.utils.exceptions.DynamicClassResolutionException


                                (argumentCollection.DO_NOT_USE_STANDARD_COVARIATES || !standardClasses.contains(covClass))) {
                            try {
                                final Covariate covariate = covClass.newInstance(); // now that we've found a matching class, try to instantiate it
                                optionalCovariates.add(covariate);
                            } catch (Exception e) {
                                throw new DynamicClassResolutionException(covClass, e);
                            }
                        }
                    }
                }
View Full Code Here


        for (Class<?> covClass : classes) {
            try {
                final Covariate covariate = (Covariate) covClass.newInstance();
                dest.add(covariate);
            } catch (Exception e) {
                throw new DynamicClassResolutionException(covClass, e);
            }
        }
        return dest;
    }
View Full Code Here

            try {
                final LocusMetric stats = (LocusMetric) stat.newInstance();
                stats.initialize(thresholds);
                thresholds.locusMetricList.add(stats);
            } catch (Exception e) {
                throw new DynamicClassResolutionException(stat, e);
            }
        }

        for (Class<?> stat : new PluginManager<SampleMetric>(SampleMetric.class).getPlugins()) {
            try {
                final SampleMetric stats = (SampleMetric) stat.newInstance();
                stats.initialize(thresholds);
                thresholds.sampleMetricList.add(stats);
            } catch (Exception e) {
                throw new DynamicClassResolutionException(stat, e);
            }
        }

        for (Class<?> stat : new PluginManager<IntervalMetric>(IntervalMetric.class).getPlugins()) {
            try {
                final IntervalMetric stats = (IntervalMetric) stat.newInstance();
                stats.initialize(thresholds);
                thresholds.intervalMetricList.add(stats);
            } catch (Exception e) {
                throw new DynamicClassResolutionException(stat, e);
            }
        }
    }
View Full Code Here

     */
    private Object createInstanceOfClass(Class type,OutputStream outputStream) {
        try {
            return getConstructorForClass(type).newInstance(outputStream);
        } catch (Exception e) {
            throw new DynamicClassResolutionException(type, e);
        }
    }
View Full Code Here

            throw e;
        } catch (InvocationTargetException e) {
            throw new UserException.CommandLineException(String.format("Failed to parse value %s for argument %s.  This is most commonly caused by providing an incorrect data type (e.g. a double when an int is required)",
                    value, source.field.getName()));
        } catch (Exception e) {
            throw new DynamicClassResolutionException(String.class, e);
        }

        // TODO FIXME!

        // WARNING: Side effect!
View Full Code Here

            }
        }
        try {
            return plugin.newInstance();
        } catch (Exception e) {
            throw new DynamicClassResolutionException(plugin, e);
        }
    }
View Full Code Here

            Constructor<? extends PluginType> noArgsConstructor = pluginType.getDeclaredConstructor((Class[])null);
            noArgsConstructor.setAccessible(true);
            return noArgsConstructor.newInstance();
        } catch (Exception e) {
            logger.error("Couldn't initialize the plugin. Typically this is because of wrong global class variable initializations.");
            throw new DynamicClassResolutionException(pluginType, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.exceptions.DynamicClassResolutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.