Class ComponentDescriptor


  • public abstract class ComponentDescriptor
    extends java.lang.Object
    Represents a single component in the hierarchy.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  ComponentDescriptor.Builder
      Builder for ComponentDescriptor.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static ComponentDescriptor.Builder builder()  
      abstract com.squareup.javapoet.ClassName component()
      Returns the ClassName for this component descriptor.
      abstract java.util.Optional<com.squareup.javapoet.ClassName> creator()
      Returns the ClassName for the creator interface.
      boolean equals​(java.lang.Object obj)
      Returns true if the given ComponentDescriptor represents the same component().
      int hashCode()  
      boolean isRoot()
      Returns true if the descriptor represents a root component.
      abstract java.util.Optional<ComponentDescriptor> parent()
      Returns the ClassName for the parent, if it exists.
      abstract com.google.common.collect.ImmutableSet<com.squareup.javapoet.ClassName> scopes()
      Returns the ClassNames for the scopes of this component descriptor.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ComponentDescriptor

        public ComponentDescriptor()
    • Method Detail

      • component

        public abstract com.squareup.javapoet.ClassName component()
        Returns the ClassName for this component descriptor.
      • scopes

        public abstract com.google.common.collect.ImmutableSet<com.squareup.javapoet.ClassName> scopes()
        Returns the ClassNames for the scopes of this component descriptor.
      • creator

        public abstract java.util.Optional<com.squareup.javapoet.ClassName> creator()
        Returns the ClassName for the creator interface. if it exists.
      • parent

        public abstract java.util.Optional<ComponentDescriptor> parent()
        Returns the ClassName for the parent, if it exists.
      • isRoot

        public boolean isRoot()
        Returns true if the descriptor represents a root component.
      • equals

        public final boolean equals​(java.lang.Object obj)
        Returns true if the given ComponentDescriptor represents the same component().
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object