Class BaseQuerySpecification<Matcher extends ViatraQueryMatcher<? extends IPatternMatch>>

    • Field Detail

      • wrappedPQuery

        protected final PQuery wrappedPQuery
    • Constructor Detail

      • BaseQuerySpecification

        public BaseQuerySpecification​(PQuery wrappedPQuery)
        Instantiates query specification for the given internal query representation.
    • Method Detail

      • processInitializerError

        protected static ViatraQueryException processInitializerError​(java.lang.ExceptionInInitializerError err)
        Since:
        1.6
      • instantiate

        public Matcher instantiate()
        For backward compatibility of code generated with previous versions of viatra query, this method has a default implementation returning null, indicating that a matcher can only be created using the old method, which ignores the hints provided by the user.
        Specified by:
        instantiate in interface IQuerySpecification<Matcher extends ViatraQueryMatcher<? extends IPatternMatch>>
        Since:
        1.4
      • ensureInitializedInternal

        protected void ensureInitializedInternal()
      • getAllAnnotations

        public java.util.List<PAnnotation> getAllAnnotations()
        Description copied from interface: PQueryHeader
        Returns the list of annotations specified for this query
        Specified by:
        getAllAnnotations in interface PQueryHeader
        Returns:
        a non-null, but possibly empty list of annotations
      • getAnnotationsByName

        public java.util.List<PAnnotation> getAnnotationsByName​(java.lang.String annotationName)
        Description copied from interface: PQueryHeader
        Returns the list of annotations with a specified name
        Specified by:
        getAnnotationsByName in interface PQueryHeader
        Returns:
        a non-null, but possibly empty list of annotations
      • getFirstAnnotationByName

        public java.util.Optional<PAnnotation> getFirstAnnotationByName​(java.lang.String annotationName)
        Description copied from interface: PQueryHeader
        Returns the first annotation with a specified name
        Specified by:
        getFirstAnnotationByName in interface PQueryHeader
      • getFullyQualifiedName

        public java.lang.String getFullyQualifiedName()
        Description copied from interface: PQueryHeader
        Identifies the pattern for which matchers can be instantiated.
        Specified by:
        getFullyQualifiedName in interface PQueryHeader
      • getParameterNames

        public java.util.List<java.lang.String> getParameterNames()
        Description copied from interface: PQueryHeader
        Return the list of parameter names
        Specified by:
        getParameterNames in interface PQueryHeader
        Returns:
        a non-null, but possibly empty list of parameter names
      • getParameters

        public java.util.List<PParameter> getParameters()
        Description copied from interface: PQueryHeader
        Returns a list of parameter descriptions
        Specified by:
        getParameters in interface PQueryHeader
        Returns:
        a non-null, but possibly empty list of parameter descriptions
      • getPositionOfParameter

        public java.lang.Integer getPositionOfParameter​(java.lang.String parameterName)
        Description copied from interface: PQueryHeader
        Returns the index of a named parameter
        Specified by:
        getPositionOfParameter in interface PQueryHeader
        Returns:
        the index, or null of no such parameter is available