code: public static Type getOuter(final Type type) {
          if (type instanceof ParameterizedType) {
              // could contain outer generics
              return ((ParameterizedType) type).getOwnerType();
          }
          return isInner(type)
                  ? GenericsUtils.resolveClassIgnoringVariables(type).getEnclosingClass()
                  : null;
      }
docs: May return {@link ParameterizedType} if incoming type contains owner declaration like
  {@code Outer<String>.Inner field} ({@code field.getGenericType()} will contain outer generic).
  
  @param type inner class (probably)
  @return outer type or null if type is not inner class