Class GQLFragmentReference
- java.lang.Object
-
- net.morimekta.providence.graphql.gql.GQLFragmentReference
-
- All Implemented Interfaces:
GQLFragment,GQLSelection
@Immutable public class GQLFragmentReference extends java.lang.Object implements GQLFragment
A reference to a fragment.
-
-
Constructor Summary
Constructors Constructor Description GQLFragmentReference(java.lang.String name, net.morimekta.providence.descriptor.PMessageDescriptor<?> parentDescriptor, java.util.Map<java.lang.String,GQLFragmentDefinition> fragmentMap)A fragment reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)GQLFragmentDefinitiongetDefinition()java.lang.StringgetName()net.morimekta.providence.descriptor.PMessageDescriptor<?>getParentDescriptor()java.util.List<GQLSelection>getSelectionSet()net.morimekta.providence.descriptor.PMessageDescriptor<?>getTypeCondition()All fragments represent a specific message type of a union field, or an interface implementation.inthashCode()java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.graphql.gql.GQLFragment
isApplicableFor
-
Methods inherited from interface net.morimekta.providence.graphql.gql.GQLSelection
getSelection, hasSelection
-
-
-
-
Constructor Detail
-
GQLFragmentReference
public GQLFragmentReference(@Nonnull java.lang.String name, @Nonnull net.morimekta.providence.descriptor.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()
-
getDefinition
@Nullable public GQLFragmentDefinition getDefinition()
-
getParentDescriptor
@Nonnull public net.morimekta.providence.descriptor.PMessageDescriptor<?> getParentDescriptor()
-
getTypeCondition
@Nonnull public net.morimekta.providence.descriptor.PMessageDescriptor<?> getTypeCondition()
Description copied from interface:GQLFragmentAll 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:
getTypeConditionin interfaceGQLFragment- Returns:
- The fragment type descriptor.
-
getSelectionSet
@Nonnull public java.util.List<GQLSelection> getSelectionSet()
- Specified by:
getSelectionSetin interfaceGQLFragment- Specified by:
getSelectionSetin interfaceGQLSelection- Returns:
- List if selections contained within this selection.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-