Package dagger.model

Class Scope


  • public abstract class Scope
    extends java.lang.Object
    A representation of a Scope.
    • Constructor Summary

      Constructors 
      Constructor Description
      Scope()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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​(javax.lang.model.element.AnnotationMirror scopeAnnotation)
      Returns true if scopeAnnotation() is a Scope annotation.
      static boolean isScope​(javax.lang.model.element.TypeElement scopeAnnotationType)
      Returns true if scopeAnnotationType is a Scope annotation.
      boolean isSingleton()
      Returns true if this scope is the @Singleton scope.
      static Scope scope​(javax.lang.model.element.AnnotationMirror scopeAnnotation)
      Creates a Scope object from the Scope-annotated annotation type.
      javax.lang.model.element.AnnotationMirror scopeAnnotation()
      The AnnotationMirror that represents the scope annotation.
      javax.lang.model.element.TypeElement scopeAnnotationElement()
      The scope annotation element.
      java.lang.String toString()
      Returns a debug representation of the scope.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Scope

        public Scope()
    • Method Detail

      • scopeAnnotation

        public final javax.lang.model.element.AnnotationMirror scopeAnnotation()
        The AnnotationMirror that represents the scope annotation.
      • scopeAnnotationElement

        public final javax.lang.model.element.TypeElement scopeAnnotationElement()
        The scope annotation element.
      • scope

        public static Scope scope​(javax.lang.model.element.AnnotationMirror scopeAnnotation)
        Creates a Scope object from the Scope-annotated annotation type.
      • isScope

        public static boolean isScope​(javax.lang.model.element.AnnotationMirror scopeAnnotation)
        Returns true if scopeAnnotation() is a Scope annotation.
      • isScope

        public static boolean isScope​(javax.lang.model.element.TypeElement scopeAnnotationType)
        Returns true if scopeAnnotationType is a Scope annotation.
      • isSingleton

        public final boolean isSingleton()
        Returns true if this scope is the @Singleton scope.
      • isReusable

        public final boolean isReusable()
        Returns true if this scope is the @Reusable scope.
      • isProductionScope

        public final boolean isProductionScope()
        Returns true if this scope is the @ProductionScope scope.
      • toString

        public final java.lang.String toString()
        Returns a debug representation of the scope.
        Overrides:
        toString in class java.lang.Object