Constructor and Description |
---|
Scope() |
Modifier and Type | Method and Description |
---|---|
boolean |
canReleaseReferences()
Returns
true for scopes that are annotated with CanReleaseReferences or some
other annotation that is itself annotated with CanReleaseReferences . |
boolean |
isProductionScope()
Returns
true if this scope is the @ProductionScope scope. |
boolean |
isReusable()
Returns
true if this scope is the @Reusable scope. |
static boolean |
isScope(AnnotationMirror scopeAnnotation)
|
static boolean |
isScope(TypeElement scopeAnnotationType)
|
boolean |
isSingleton()
Returns
true if this scope is the @Singleton scope. |
ImmutableSet<AnnotationMirror> |
releasableReferencesMetadata()
Returns the set of annotations on the scope that are themselves annotated with
CanReleaseReferences . |
Optional<AnnotationMirror> |
releasableReferencesMetadata(TypeMirror metadataType)
Returns the releasable references metadata
annotation of the given type, if there is one for this scope.
|
static Scope |
scope(AnnotationMirror scopeAnnotation)
|
AnnotationMirror |
scopeAnnotation()
The
AnnotationMirror that represents the scope annotation. |
TypeElement |
scopeAnnotationElement()
The scope annotation element.
|
String |
toString()
Returns a debug representation of the scope.
|
public final AnnotationMirror scopeAnnotation()
AnnotationMirror
that represents the scope annotation.public final TypeElement scopeAnnotationElement()
public static Scope scope(AnnotationMirror scopeAnnotation)
public static boolean isScope(AnnotationMirror scopeAnnotation)
public static boolean isScope(TypeElement scopeAnnotationType)
public final boolean isSingleton()
true
if this scope is the @Singleton
scope.public final boolean isReusable()
true
if this scope is the @Reusable
scope.public final boolean isProductionScope()
true
if this scope is the @ProductionScope
scope.public final boolean canReleaseReferences()
true
for scopes that are annotated with CanReleaseReferences
or some
other annotation that is itself annotated with CanReleaseReferences
.public final ImmutableSet<AnnotationMirror> releasableReferencesMetadata()
CanReleaseReferences
. These annotations are used as metadata for TypedReleasableReferenceManager
.public final Optional<AnnotationMirror> releasableReferencesMetadata(TypeMirror metadataType)
Copyright © 2012–2017 The Dagger Authors. All rights reserved.