Class GQLFragmentReference

  • All Implemented Interfaces:
    GQLFragment, GQLSelection

    @Immutable
    public class GQLFragmentReference
    extends java.lang.Object
    implements GQLFragment
    A reference to a fragment.
    • Constructor Detail

      • GQLFragmentReference

        public GQLFragmentReference​(@Nonnull
                                    java.lang.String name,
                                    @Nonnull
                                    PMessageDescriptor<?> parentDescriptor,
                                    @Nonnull
                                    java.util.Map<java.lang.String,​GQLFragmentDefinition> fragmentMap)
        A fragment reference. Since the fragment may not be defined yet, this is just given a map to fragments-to-be.
        Parameters:
        name - Name of defined fragment to be referred to.
        parentDescriptor - Descriptor to the containing message type.
        fragmentMap - Map of registered fragments, may not be filled yet.
    • Method Detail

      • getName

        @Nonnull
        public java.lang.String getName()
      • getTypeCondition

        @Nonnull
        public PMessageDescriptor<?> getTypeCondition()
        Description copied from interface: GQLFragment
        All fragments represent a specific message type of a union field, or an interface implementation. This should return the descriptor of that message type.
        Specified by:
        getTypeCondition in interface GQLFragment
        Returns:
        The fragment type descriptor.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object