Class ExternalEntityThroughExternalEntityComm.Match

java.lang.Object
org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch
be.kuleuven.cs.distrinet.sparta.queries.ExternalEntityThroughExternalEntityComm.Match
All Implemented Interfaces:
Cloneable, org.eclipse.viatra.query.runtime.api.IPatternMatch
Enclosing class:
ExternalEntityThroughExternalEntityComm

public abstract static class ExternalEntityThroughExternalEntityComm.Match extends org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch
Pattern-specific match representation of the be.kuleuven.cs.distrinet.sparta.queries.externalEntityThroughExternalEntityComm pattern, to be used in conjunction with ExternalEntityThroughExternalEntityComm.Matcher.

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. Each instance is a (possibly partial) substitution of pattern parameters, usable to represent a match of the pattern in the result of a query, or to specify the bound (fixed) input parameters when issuing a query.

See Also:
  • Method Details

    • get

      public Object get(String parameterName)
    • get

      public Object get(int index)
      Specified by:
      get in interface org.eclipse.viatra.query.runtime.api.IPatternMatch
      Overrides:
      get in class org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch
    • getLocation

      public ExternalEntity getLocation()
    • getP2

      public ExternalEntity getP2()
    • getDf

      public DataFlow getDf()
    • getT

      public ThreatType getT()
    • set

      public boolean set(String parameterName, Object newValue)
    • setLocation

      public void setLocation(ExternalEntity pLocation)
    • setP2

      public void setP2(ExternalEntity pP2)
    • setDf

      public void setDf(DataFlow pDf)
    • setT

      public void setT(ThreatType pT)
    • patternName

      public String patternName()
      Specified by:
      patternName in interface org.eclipse.viatra.query.runtime.api.IPatternMatch
      Overrides:
      patternName in class org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch
    • parameterNames

      public List<String> parameterNames()
      Specified by:
      parameterNames in interface org.eclipse.viatra.query.runtime.api.IPatternMatch
      Overrides:
      parameterNames in class org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch
    • toArray

      public Object[] toArray()
    • toImmutable

    • prettyPrint

      public String prettyPrint()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • specification

    • newEmptyMatch

      public static ExternalEntityThroughExternalEntityComm.Match newEmptyMatch()
      Returns an empty, mutable match. Fields of the mutable match can be filled to create a partial match, usable as matcher input.
      Returns:
      the empty match.
    • newMutableMatch

      public static ExternalEntityThroughExternalEntityComm.Match newMutableMatch(ExternalEntity pLocation, ExternalEntity pP2, DataFlow pDf, ThreatType pT)
      Returns a mutable (partial) match. Fields of the mutable match can be filled to create a partial match, usable as matcher input.
      Parameters:
      pLocation - the fixed value of pattern parameter location, or null if not bound.
      pP2 - the fixed value of pattern parameter p2, or null if not bound.
      pDf - the fixed value of pattern parameter df, or null if not bound.
      pT - the fixed value of pattern parameter t, or null if not bound.
      Returns:
      the new, mutable (partial) match object.
    • newMatch

      Returns a new (partial) match. This can be used e.g. to call the matcher with a partial match.

      The returned match will be immutable. Use newEmptyMatch() to obtain a mutable match object.

      Parameters:
      pLocation - the fixed value of pattern parameter location, or null if not bound.
      pP2 - the fixed value of pattern parameter p2, or null if not bound.
      pDf - the fixed value of pattern parameter df, or null if not bound.
      pT - the fixed value of pattern parameter t, or null if not bound.
      Returns:
      the (partial) match object.