private List<ITypeBinding> getTypeBindings() {
    final List<AbstractTypeDeclaration> declTypes = searchLocallyForTypeDeclarations();
    if (declTypes == null || declTypes.isEmpty()) return Collections.emptyList();
    final List<ITypeBinding> typeBindings = new ArrayList<ITypeBinding>(declTypes.size());

    for (AbstractTypeDeclaration decl : declTypes) {
      getTypeBindings(decl.resolveBinding(), typeBindings);
    }
    return typeBindings;
  }