Class QueryReferences

All Implemented Interfaces:
IPostEventProcessing

public class QueryReferences extends QueryDesignerPropEvent
Queries the workspace for references.
Author:
Christopher Mindus
  • Constructor Details

    • QueryReferences

      public QueryReferences(GProp<?>[] props, 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 Details

    • getType

      public QueryDesignerPropEvent.Type getType()
      Gets the type of message.
      Specified by:
      getType in class QueryDesignerPropEvent
    • getProps

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

      public 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:
      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:
      NullPointerException - If ref is null.
    • getReferencedProps

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

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