Example usage for com.google.gwt.dev.javac CompiledClass getSourceName

List of usage examples for com.google.gwt.dev.javac CompiledClass getSourceName

Introduction

In this page you can find the example usage for com.google.gwt.dev.javac CompiledClass getSourceName.

Prototype

public String getSourceName() 

Source Link

Document

Returns the qualified source name, e.g.

Usage

From source file:com.googlecode.gwt.test.internal.handlers.GeneratorCreateHandler.java

License:Apache License

public Class<?> generate(Class<?> classLiteral) throws UnableToCompleteException {
    CompiledClass compiledClass = compile(classLiteral.getCanonicalName());
    if (compiledClass == null) {
        return classLiteral;
    }/*  www  .  ja v  a2  s. c  o  m*/

    try {
        return GwtFactory.get().getClassLoader().loadClass(compiledClass.getSourceName());
    } catch (ClassNotFoundException e) {
        throw new RuntimeException(e);
    }
}