Package ch.unibe.jexample.internal

Examples of ch.unibe.jexample.internal.ExampleGraph


public abstract class For {

    public static <T> T example(String reference) {
        try {
            MethodReference ref = MethodLocator.parse(reference).resolve();
            ExampleGraph g = new ExampleGraph();
            g.add(ref.jclass);
            Example e = g.findExample(ref);
            return (T) runExample(e);
        } catch (SecurityException ex) {
            throw new RuntimeException(ex);
        } catch (JExampleError ex) {
            throw new RuntimeException(ex);
View Full Code Here


        return e.returnValue.getValue();
    }

    private static Example findExample(Class jClass, String method) {
        try {
            ExampleGraph graph = new ExampleGraph();
            graph.add(jClass);
            return graph.findExample(jClass, method);
        } catch (InitializationError ex) {
            throw new RuntimeException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of ch.unibe.jexample.internal.ExampleGraph

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.