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.
-
VtpMetavariable(int)
- Builds a new Metavariable.
-
VtpMetavariable(int, Constraint)
- Builds a new Metavariable.
-
VtpMetavariable(String)
- Builds a new Metavariable.
-
VtpMetavariable(String, int)
- Builds a new Metavariable.
-
VtpMetavariable(String, int, Constraint)
- Builds a new Metavariable.
-
clone()
-
-
getConstraint()
- Returns the constraint associated with the metvariable or null
if no constraint is present.
-
getMetaClass()
- Gives the class of the metavariable.
-
name()
- Returns the name of the metavariable.
-
setConstraint(Constraint)
- Sets the constraint of the metavariable.
-
setMetaClass(int)
- Sets the Class of the metavariable.
-
toString()
- Returns a String.
-
verify(int)
- Checks if the class is verified on the String.
-
verify(String)
- Checks if the class is verified on the String.
-
verify(Tree)
- Checks if the constraint and the class are verified on the tree.
-
verifyClass(Tree)
- Checks if the class of the metavarible and the arity of the tree
are compatible.
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.
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
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
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
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
clone
public Object clone()
- Overrides:
- clone in class Object
setMetaClass
public void setMetaClass(int cl)
- Sets the Class of the metavariable.
- Parameters:
- cl - The class of the metavariable.
- See Also:
- MetavariableClass
getMetaClass
public int getMetaClass()
- Gives the class of the metavariable.
- Returns:
- The class of the metavariable.
- See Also:
- MetavariableClass
name
public String name()
- Returns the name of the metavariable.
setConstraint
public void setConstraint(Constraint constr)
- Sets the constraint of the metavariable.
- Parameters:
- constr - The constraint.
getConstraint
public Constraint getConstraint()
- Returns the constraint associated with the metvariable or null
if no constraint is present.
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.
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.
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.
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.
toString
public String toString()
- Returns a String.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index