Example usage for com.google.gwt.core.ext CachedGeneratorResult getResultTypeName

List of usage examples for com.google.gwt.core.ext CachedGeneratorResult getResultTypeName

Introduction

In this page you can find the example usage for com.google.gwt.core.ext CachedGeneratorResult getResultTypeName.

Prototype

String getResultTypeName();

Source Link

Document

Returns the cached result rebind type name.

Usage

From source file:net.sf.mmm.util.gwt.base.rebind.AbstractIncrementalGenerator.java

License:Apache License

/**
 * {@inheritDoc}/*from ww w. j ava2 s  .c  o m*/
 */
@Override
public RebindResult generateIncrementally(TreeLogger logger, GeneratorContext context, String typeName)
        throws UnableToCompleteException {

    CachedGeneratorResult cachedGeneratorResult = context.getCachedGeneratorResult();
    if (cachedGeneratorResult != null) {
        boolean obsolete = isCachedResultObsolete(cachedGeneratorResult, typeName);
        if (!obsolete) {
            return new RebindResult(RebindMode.USE_ALL_CACHED, cachedGeneratorResult.getResultTypeName());
        }
    }
    TypeOracle typeOracle = context.getTypeOracle();
    JClassType inputType = typeOracle.findType(typeName);
    String resultType = generate(inputType, logger, context);
    return new RebindResult(RebindMode.USE_ALL_NEW, resultType);
}