@Nonnull
  private DAType findFixedResolution(Element element) {
    Name qualifiedName = element.accept(QualifiedNameExtractor.QUALIFIED_NAME_EXTRACTOR, null);
    // qualified reference to Type in code
    if (qualifiedName != null && !qualifiedName.contentEquals(element.getSimpleName())) {
      return ensureNonnull(scanResult.findFixedByQualifiedName(qualifiedName.toString()), element);
    }

    Optional<String> importQualifiedName = scanResult.getImports().findBySimpleName(element.getSimpleName());
    if (!importQualifiedName.isPresent()) {
      throw new IllegalStateException("Type for Element " + element + " is neither imported nor explicitly qualified");
    }

    return ensureNonnull(scanResult.findFixedByQualifiedName(importQualifiedName.get()), element);
  }
@ Nonnull private DAType findFixedResolution ( Element element ) { Name qualifiedName = element . accept ( QualifiedNameExtractor . QUALIFIED_NAME_EXTRACTOR , null ) ; if ( qualifiedName != null && ! qualifiedName . contentEquals ( element . getSimpleName ( ) ) ) { return ensureNonnull ( scanResult . findFixedByQualifiedName ( qualifiedName . toString ( ) ) , element ) ; } Optional < String > importQualifiedName = scanResult . getImports ( ) . findBySimpleName ( element . getSimpleName ( ) ) ; if ( ! importQualifiedName . isPresent ( ) ) { throw new IllegalStateException ( "Type for Element " + element + " is neither imported nor explicitly qualified" ) ; } return ensureNonnull ( scanResult . findFixedByQualifiedName ( importQualifiedName . get ( ) ) , element ) ; }
Look for a DAType for the specified Element of the TypeMirror of kind ERROR.
<p>
<ol>
<li>look for the fixed reference in the current {@link ReferenceScanResult} for the qualified reference in
Element</li>
<li>look for the fixed reference in the current {@link ReferenceScanResult} for the import (explicit or
implicit) with the simpleName of the specified Element</li>
<li>if neither search returned a DAType, throw a {@link IllegalStateException}, this is not supposed to happen</li>
</ol>
</p>

@param element a {@link Element}

@return a {@link DAType}

@throws IllegalStateException if no {@link DAType} can be found