MCPcopy Index your code
hub / github.com/google/dagger / accessibleType

Method accessibleType

java/dagger/internal/codegen/DaggerTypes.java:139–148  ·  view source on GitHub ↗

Returns a TypeMirror for the binding that is accessible to the component.

(TypeMirror type, ClassName requestingClass)

Source from the content-addressed store, hash-verified

137
138 /** Returns a {@link TypeMirror} for the binding that is accessible to the component. */
139 protected final TypeMirror accessibleType(TypeMirror type, ClassName requestingClass) {
140 if (Accessibility.isTypeAccessibleFrom(type, requestingClass.packageName())) {
141 return type;
142 } else if (type.getKind().equals(TypeKind.DECLARED)
143 && Accessibility.isRawTypeAccessible(type, requestingClass.packageName())) {
144 return getDeclaredType(MoreTypes.asTypeElement(type));
145 } else {
146 return elements.getTypeElement(Object.class).asType();
147 }
148 }
149
150 /**
151 * Throws {@link TypeNotPresentException} if {@code type} is an {@link

Callers 3

returnTypeMethod · 0.45
instanceExpressionMethod · 0.45

Calls 7

isTypeAccessibleFromMethod · 0.95
isRawTypeAccessibleMethod · 0.95
getDeclaredTypeMethod · 0.95
packageNameMethod · 0.80
asTypeMethod · 0.80
equalsMethod · 0.45
getTypeElementMethod · 0.45

Tested by

no test coverage detected