NativeOverrides uses the method
Elements#overrides(ExecutableElement, ExecutableElement, TypeElement) while
ExplicitOverrides reimplements that method in a way that is more consistent between
compilers, in particular between javac and ecj (the Eclipse compiler).
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract boolean |
| Overrides | back to summary |
|---|---|
| pack-priv Overrides() | |
| overrides | back to summary |
|---|---|
| pack-priv abstract boolean overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement in) | |
| Modifier and Type | Class and Description |
|---|---|
| private class | Overrides.ExplicitOverrides.TypeSubstVisitor
Visitor that replaces type variables with their values in the types it sees. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private TypeElement | |
| pack-priv @Nullable ImmutableList | erasedParameterTypes(ExecutableElement method, TypeElement in)
Returns the list of erased parameter types of the given method as they appear in the given type. |
| private boolean | |
| pack-priv @Nullable ExecutableElement | methodFromSuperclasses(TypeElement in, ExecutableElement method)
Returns the given method as it appears in the given type. |
| pack-priv @Nullable ExecutableElement | methodFromSuperinterfaces(TypeElement in, ExecutableElement method)
Returns the given interface method as it appears in the given type. |
| private @Nullable 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. |
| public boolean | overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement in)
Implements abstract com. |
| private @Nullable TypeElement | |
| private ImmutableList |
| typeUtils | back to summary |
|---|---|
| private final Types typeUtils | |
| ExplicitOverrides | back to summary |
|---|---|
| pack-priv ExplicitOverrides(Types typeUtils) | |
| asTypeElement | back to summary |
|---|---|
| private TypeElement asTypeElement(TypeMirror typeMirror) | |
| erasedParameterTypes | back to summary |
|---|---|
| pack-priv @Nullable ImmutableList Returns the list of erased parameter types of the given method as they appear in the given
type. For example, if the method is | |
| isSubsignature | back to summary |
|---|---|
| private boolean isSubsignature(ExecutableElement overrider, ExecutableElement overridden, TypeElement in) | |
| methodFromSuperclasses | back to summary |
|---|---|
| pack-priv @Nullable 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 | back to summary |
|---|---|
| pack-priv @Nullable 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 | back to summary |
|---|---|
| private @Nullable 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. | |
| overrides | back to summary |
|---|---|
| public boolean overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement in) Implements abstract com.
| |
| superclass | back to summary |
|---|---|
| private @Nullable TypeElement superclass(TypeElement type) | |
| superinterfaces | back to summary |
|---|---|
| private ImmutableList | |
E is String, then we can return String for E,
List<String> for List<E>, String[] for E[], etc. We don't
have to cover all types here because (1) the type is going to end up being erased, and
(2) wildcards can't appear in direct supertypes. So for example it is illegal to write
class MyList implements List<? extends Number>. It's legal to write
class MyList implements List<Set<? extends Number>> but that doesn't matter
because the E of the List is going to be erased to raw Set.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | typeBindings
The bindings of type variables. |
| Access | Constructor and Description |
|---|---|
| private |
| typeBindings | back to summary |
|---|---|
| private final Map<TypeParameterElement, TypeMirror> typeBindings The bindings of type variables. We can put them all in one map because E in | |
| TypeSubstVisitor | back to summary |
|---|---|
| private TypeSubstVisitor() | |
| defaultAction | back to summary |
|---|---|
| protected TypeMirror defaultAction(TypeMirror e, Void p) Overrides javax. Doc from javax. The default action for visit methods.
| |
| erasedParameterTypes | back to summary |
|---|---|
| pack-priv @Nullable ImmutableList | |
| visitArray | back to summary |
|---|---|
| public TypeMirror visitArray(ArrayType t, Void p) Overrides javax. Implements javax. Doc from javax. Visits an array type.
| |
| visitDeclared | back to summary |
|---|---|
| public TypeMirror visitDeclared(DeclaredType t, Void p) Overrides javax. Implements javax. Doc from javax. Visits a declared type.
| |
| visitTypeVariable | back to summary |
|---|---|
| public TypeMirror visitTypeVariable(TypeVariable t, Void p) Overrides javax. Implements javax. Doc from javax. Visits a type variable.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Elements |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement in)
Implements abstract com. |
| elementUtils | back to summary |
|---|---|
| private final Elements elementUtils | |
| NativeOverrides | back to summary |
|---|---|
| pack-priv NativeOverrides(Elements elementUtils) | |
| overrides | back to summary |
|---|---|
| pack-priv boolean overrides(ExecutableElement overrider, ExecutableElement overridden, TypeElement in) Implements abstract com.
| |