All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aioli.vtp.VtpMetavariable

java.lang.Object
   |
   +----aioli.vtp.VtpMetavariable

public class VtpMetavariable
extends Object
implements Metavariable, Cloneable
Implements the notion of metavariable used in pattern expressions.


Constructor Index

 o VtpMetavariable(int)
Builds a new Metavariable.
 o VtpMetavariable(int, Constraint)
Builds a new Metavariable.
 o VtpMetavariable(String)
Builds a new Metavariable.
 o VtpMetavariable(String, int)
Builds a new Metavariable.
 o VtpMetavariable(String, int, Constraint)
Builds a new Metavariable.

Method Index

 o clone()
 o getConstraint()
Returns the constraint associated with the metvariable or null if no constraint is present.
 o getMetaClass()
Gives the class of the metavariable.
 o name()
Returns the name of the metavariable.
 o setConstraint(Constraint)
Sets the constraint of the metavariable.
 o setMetaClass(int)
Sets the Class of the metavariable.
 o toString()
Returns a String.
 o verify(int)
Checks if the class is verified on the String.
 o verify(String)
Checks if the class is verified on the String.
 o verify(Tree)
Checks if the constraint and the class are verified on the tree.
 o verifyClass(Tree)
Checks if the class of the metavarible and the arity of the tree are compatible.

Constructors

 o VtpMetavariable
 public VtpMetavariable(String n)
Builds a new Metavariable.

Parameters:
n - The name of the metavariable. Default values for class is MetavariableClass.tree and there's no constraint.
 o VtpMetavariable
 public VtpMetavariable(String n,
                        int cl)
Builds a new Metavariable.

Parameters:
n - The name of the metavariable.
cl - the class of the metavariable. there's no constraint.
See Also:
MetavariableClass
 o VtpMetavariable
 public VtpMetavariable(int cl)
Builds a new Metavariable.

Parameters:
cl - the class of the metavariable. This constructor is for all kind of anonym metavariable.
See Also:
MetavariableClass
 o VtpMetavariable
 public VtpMetavariable(int cl,
                        Constraint constr)
Builds a new Metavariable.

Parameters:
cl - the class of the metavariable.
constr - The constraint. This constructor is for all kind of anonym metavariable.
See Also:
MetavariableClass
 o VtpMetavariable
 public VtpMetavariable(String n,
                        int cl,
                        Constraint constr)
Builds a new Metavariable.

Parameters:
n - The name of the metavariable.
cl - the class of the metavariable.
constr - The constraint.
See Also:
MetavariableClass

Methods

 o clone
 public Object clone()
Overrides:
clone in class Object
 o setMetaClass
 public void setMetaClass(int cl)
Sets the Class of the metavariable.

Parameters:
cl - The class of the metavariable.
See Also:
MetavariableClass
 o getMetaClass
 public int getMetaClass()
Gives the class of the metavariable.

Returns:
The class of the metavariable.
See Also:
MetavariableClass
 o name
 public String name()
Returns the name of the metavariable.

 o setConstraint
 public void setConstraint(Constraint constr)
Sets the constraint of the metavariable.

Parameters:
constr - The constraint.
 o getConstraint
 public Constraint getConstraint()
Returns the constraint associated with the metvariable or null if no constraint is present.

 o verify
 public boolean verify(Tree tree)
Checks if the constraint and the class are verified on the tree.

Parameters:
tree - The tree we want to check the constraint on.
Returns:
true if the constraint is verified or if there's no constraint, false otherwise.
 o verify
 public boolean verify(String str)
Checks if the class is verified on the String.

Parameters:
str - The string we want to check the constraint on.
Returns:
true if the cclass is verified, false otherwise.
 o verify
 public boolean verify(int i)
Checks if the class is verified on the String.

Parameters:
i - The interger we want to check the constraint on.
Returns:
true if the class is verified , false otherwise.
 o verifyClass
 public boolean verifyClass(Tree tree)
Checks if the class of the metavarible and the arity of the tree are compatible.

Returns:
true if the class and the tree are compatible, false otherwise.
 o toString
 public String toString()
Returns a String.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index