Class QueryReferences

    • Constructor Detail

      • QueryReferences

        public QueryReferences​(GProp<?>[] props,
                               org.eclipse.jdt.core.IJavaElement[] javaElements,
                               boolean includeChildren)
        Creates a Query Reference message.
        Parameters:
        props - The properties to search references for.
        javaElements - The Java elements to search references for.
        includeChildren - Flag to extend search to the children of the source props or javaElements.
    • Method Detail

      • getProps

        public GProp<?>[] getProps()
        Gets the source properties for the query.
      • getJavaElements

        public org.eclipse.jdt.core.IJavaElement[] getJavaElements()
        Gets the Java elements for the query.
      • areChildrenIncluded

        public boolean areChildrenIncluded()
        Check if children should be searched for.
      • isReferenceValid

        public GProp<?> isReferenceValid​(GProp<?> prop)
        Checks if a property is valid as reference to one of the sources, it is on of the source properties, or if areChildrenIncluded() is true, one of their children.
        Parameters:
        prop - The property to test.
        Returns:
        The source property matching, null for no valid reference.
      • add

        public void add​(QueryPropReference ref)
        Adds a reference to a Property element being referenced by any of the source properties or Java elements.
        Parameters:
        ref - The instance of a QueryPropReference.
        Throws:
        java.lang.NullPointerException - If ref is null.
      • add

        public void add​(QueryJavaReference ref)
        Adds a reference to a Java element being referenced by any of the source properties.
        Parameters:
        ref - The instance of a QueryJavaReference.
        Throws:
        java.lang.NullPointerException - If ref is null.
      • getReferencedProps

        public java.util.Set<QueryPropReference> getReferencedProps()
        Gets the set of found property references.
      • getReferencedJavaElements

        public java.util.List<QueryJavaReference> getReferencedJavaElements()
        Gets the array of Java element references.