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, 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 boolean
equals(java.lang.Object o)
GQLFragmentDefinition
getDefinition()
java.lang.String
getName()
PMessageDescriptor<?>
getParentDescriptor()
java.util.List<GQLSelection>
getSelectionSet()
PMessageDescriptor<?>
getTypeCondition()
All fragments represent a specific message type of a union field, or an interface implementation.int
hashCode()
java.lang.String
toString()
-
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, hasSelectionPath
-
-
-
-
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()
-
getDefinition
@Nullable public GQLFragmentDefinition getDefinition()
-
getParentDescriptor
@Nonnull public PMessageDescriptor<?> getParentDescriptor()
-
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 interfaceGQLFragment
- Returns:
- The fragment type descriptor.
-
getSelectionSet
@Nonnull public java.util.List<GQLSelection> getSelectionSet()
- Specified by:
getSelectionSet
in interfaceGQLFragment
- Specified by:
getSelectionSet
in interfaceGQLSelection
- Returns:
- List if selections contained within this selection.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-