JIVE Platform
Release 0.2.2

edu.buffalo.cse.jive.ui.search
Class JiveSearchPattern

java.lang.Object
  extended by edu.buffalo.cse.jive.ui.search.JiveSearchPattern

public class JiveSearchPattern
extends Object

A pattern used for encapsulating a common IJiveSearchQuery input or portion of input. The input is broken into four parts: class name, instance number, method name, and variable name. An empty string supplied as part of the pattern will be converted to null.

This class is convenient for passing query input strings to query objects at construction time.


Nested Class Summary
static interface JiveSearchPattern.Importer
          A builder for a JiveSearchPattern.
 
Constructor Summary
protected JiveSearchPattern(String type, String instance, String method, String variable)
          Constructs the search pattern with the supplied input.
 
Method Summary
static JiveSearchPattern createPattern(JiveSearchPattern.Importer builder)
          Creates a new pattern using the supplied builder.
 String getClassName()
          Returns the fully-qualified class name of the pattern, or null if none exists.
 String getInstanceNumber()
          Returns the instance number for the pattern, or null if none exists.
 String getMethodName()
          Returns the method name of the pattern, or null if none exists.
 String getVariableName()
          Returns the variable name of the pattern, or null if none exists.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JiveSearchPattern

protected JiveSearchPattern(String type,
                            String instance,
                            String method,
                            String variable)
Constructs the search pattern with the supplied input.

Parameters:
type - the fully-qualified class name
instance - the instance number
method - the method name
variable - the variable name
Method Detail

createPattern

public static JiveSearchPattern createPattern(JiveSearchPattern.Importer builder)
Creates a new pattern using the supplied builder.

Parameters:
builder - the builder for the pattern
Returns:
a new pattern as described by the builder

getClassName

public String getClassName()
Returns the fully-qualified class name of the pattern, or null if none exists.

Returns:
the fully-qualified class name

getInstanceNumber

public String getInstanceNumber()
Returns the instance number for the pattern, or null if none exists.

Returns:
the instance number

getMethodName

public String getMethodName()
Returns the method name of the pattern, or null if none exists.

Returns:
the method name

getVariableName

public String getVariableName()
Returns the variable name of the pattern, or null if none exists.

Returns:
the variable name

toString

public String toString()
Overrides:
toString in class Object

JIVE Platform
Release 0.2.2