Package ch.unibe.jexample.internal

Examples of ch.unibe.jexample.internal.Example


    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


            throw new RuntimeException(ex);
        }
    }

    public static <T> T example(Class jClass, String method) {
        Example e = findExample(jClass, method);
        if (e == null) throw new NoSuchMethodError("Method not found.");
        return (T) runExample(e);
    }
View Full Code Here

TOP

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

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.