Class BindPoint

java.lang.Object
io.nosqlbench.virtdata.core.templates.BindPoint

public class BindPoint
extends java.lang.Object

A bind point is a named injection point in a field value or statement needed for an operation of some type. A bind point can be specified as either a named reference to a binding recipe specified elsewhere (a binding reference), or it can contain its own binding recipe (a binding definition).

BindPoint references take the form of

{name}
and only allow a simple binding name with no spaces, whereas BindPoint definitions take the form of
{{NumberNameToString()}}
and allow any characters which do not match the closing double braces.

  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  BindPoint.Type
    Type type of bindpoint indicates whether is was specified as a reference or a definition.
  • Constructor Summary

    Constructors 
    Constructor Description
    BindPoint​(java.lang.String anchor, java.lang.String bindspec)  
    BindPoint​(java.lang.String anchor, java.lang.String bindspec, BindPoint.Type type)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    java.lang.String getAnchor()
    The name of the anchor for a binding as it appears in a user-specified template, parsed by ParsedTemplate.
    java.lang.String getBindspec()  
    BindPoint.Type getType()
    The type of a bind point determines how it should be processed.
    int hashCode()  
    static BindPoint of​(java.lang.String userid, java.lang.String bindspec, BindPoint.Type type)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BindPoint

      public BindPoint​(java.lang.String anchor, java.lang.String bindspec, BindPoint.Type type)
    • BindPoint

      public BindPoint​(java.lang.String anchor, java.lang.String bindspec)
  • Method Details

    • of

      public static BindPoint of​(java.lang.String userid, java.lang.String bindspec, BindPoint.Type type)
    • getType

      public BindPoint.Type getType()
      The type of a bind point determines how it should be processed. BindPoint.Type.definition instances should be taken as binding recipes to be evaluated directly. BindPoint.Type.reference instances should be looked up in an externally supplied set of named bindings. In practical terms, these can be processed identically so long as the bindspec is populated.
      Returns:
      A binding type, from BindPoint.Type
    • getAnchor

      public java.lang.String getAnchor()
      The name of the anchor for a binding as it appears in a user-specified template, parsed by ParsedTemplate.
      Returns:
      A string name for the bind point anchor, or null for BindPoint.Type.definition types.
    • getBindspec

      public java.lang.String getBindspec()
      Returns:
      The Binding specification. This is the binding recipe as it appears either in the binding directly for BindPoint.Type.definition types, or as back-filled by a parser for BindPoint.Type.reference types.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object