/** * Finds an assimilates a class file from the given fully.qualified.Source.Name. * * Make sure you commit any {@link StandardGeneratorContext} before expecting to * find generated types this way. * * @throws NoClassDefFoundError if class is unavailable to gwt classpath */ @Override public JDeclaredType searchForTypeBySource(String sourceTypeName) { JDeclaredType type = program.getFromTypeMap(sourceTypeName); if (type == null) { CompiledClass cc = classFileMapBySource.get(sourceTypeName); if (cc == null) { // TODO: error throw new NoClassDefFoundError(sourceTypeName); } assimilateUnit(cc.getUnit()); type = program.getFromTypeMap(sourceTypeName); assert type != null || errorsFound; } return type; }
/** * Finds an assimilates a class file from the given fully.qualified.Binary$Name. * * Make sure you commit any {@link StandardGeneratorContext} before expecting to * find generated types this way. * * @throws NoClassDefFoundError if class is unavailable to gwt classpath */ @Override public JDeclaredType searchForTypeByBinary(String binaryTypeName) { JDeclaredType type = program.getFromTypeMap(binaryTypeName); if (type == null) { CompiledClass cc = classFileMap.get(BinaryName.toInternalName(binaryTypeName)); if (cc == null) { // TODO: error throw new NoClassDefFoundError(binaryTypeName); } assimilateUnit(cc.getUnit()); type = program.getFromTypeMap(binaryTypeName); assert type != null || errorsFound; } return type; }
JType asType = ast.getProgram().getFromTypeMap(cls.getQualifiedSourceName()); if (asType == null) { continue;
answer = answer.substring(0, answer.lastIndexOf('.') + 1) + "impl.AsyncProxy_" + names[names.length - 1]; JDeclaredType answerType = null; final JDeclaredType knownType = ast.getProgram().getFromTypeMap(answer);
continue; final JType asType = ast.getProgram().getFromTypeMap( cls.getQualifiedSourceName()); if (asType == null) {
answer = answer.substring(0, answer.lastIndexOf('.') + 1) + "impl.AsyncFor_" + names[names.length - 1]; JDeclaredType answerType = null; final JDeclaredType knownType = ast.getProgram().getFromTypeMap(answer);
names[names.length - 1]; JDeclaredType answerType = null; final JDeclaredType knownType = ast.getProgram().getFromTypeMap(answer); if (knownType != null) {// if the singleton already exists, just use it answerType = ast.searchForTypeBySource(answer);