Class Overrides.ExplicitOverrides

java.lang.Object
com.google.auto.common.Overrides
com.google.auto.common.Overrides.ExplicitOverrides
Enclosing class:
Overrides

static class Overrides.ExplicitOverrides extends Overrides
  • Field Details

    • typeUtils

      private final Types typeUtils
  • Constructor Details

    • ExplicitOverrides

      ExplicitOverrides(Types typeUtils)
  • Method Details

    • overrides

      public boolean overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement in)
      Specified by:
      overrides in class Overrides
    • isSubsignature

      private boolean isSubsignature(ExecutableElement overrider, ExecutableElement overridden, TypeElement in)
    • erasedParameterTypes

      com.google.common.collect.ImmutableList<TypeMirror> erasedParameterTypes(ExecutableElement method, TypeElement in)
      Returns the list of erased parameter types of the given method as they appear in the given type. For example, if the method is add(E) from List<E> and we ask how it appears in class NumberList implements List<Number>, the answer will be Number. That will also be the answer for class NumberList<E extends Number> implements List<E>. The parameter types are erased since the purpose of this method is to determine whether two methods are candidates for one to override the other.
    • methodFromSuperclasses

      ExecutableElement methodFromSuperclasses(TypeElement in, ExecutableElement method)
      Returns the given method as it appears in the given type. This is the method itself, or the nearest override in a superclass of the given type, or null if the method is not found in the given type or any of its superclasses.
    • methodFromSuperinterfaces

      ExecutableElement methodFromSuperinterfaces(TypeElement in, ExecutableElement method)
      Returns the given interface method as it appears in the given type. This is the method itself, or the nearest override in a superinterface of the given type, or null if the method is not found in the given type or any of its transitive superinterfaces.
    • methodInType

      private ExecutableElement methodInType(TypeElement type, ExecutableElement method)
      Returns the method from within the given type that has the same erased signature as the given method, or null if there is no such method.
    • superclass

      private TypeElement superclass(TypeElement type)
    • superinterfaces

      private com.google.common.collect.ImmutableList<TypeElement> superinterfaces(TypeElement type)
    • asTypeElement

      private TypeElement asTypeElement(TypeMirror typeMirror)