Package Type
Class UnknownType
- java.lang.Object
-
- Type.Type
-
- Type.UnknownType
-
public class UnknownType extends Type
-
-
Constructor Summary
Constructors Constructor Description UnknownType()
Constructeur sans nomUnknownType(java.lang.String s, int n)
Constructeur à partir d'un nom de variable et un numéroUnknownType(org.antlr.v4.runtime.tree.ParseTree ctx)
Constructeur à partir d'un ParseTree (standardisation du nom de variable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(UnknownType v)
Test si le type dépend du type variable vboolean
equals(Type t)
Test d'égalitéint
getVarIndex()
Getter du numéro de variable de typejava.lang.String
getVarName()
Getter du nom de variable de typevoid
setVarIndex(int n)
Setter du numéro de variable de typeType
substitute(UnknownType v, Type t)
Substitutionjava.util.Map<UnknownType,Type>
unify(Type t)
Unification-
Methods inherited from class Type.Type
substituteAll
-
-
-
-
Constructor Detail
-
UnknownType
public UnknownType()
Constructeur sans nom
-
UnknownType
public UnknownType(java.lang.String s, int n)
Constructeur à partir d'un nom de variable et un numéro- Parameters:
s
- nom de variablen
- numéro de la variable
-
UnknownType
public UnknownType(org.antlr.v4.runtime.tree.ParseTree ctx)
Constructeur à partir d'un ParseTree (standardisation du nom de variable)- Parameters:
ctx
- ParseTree
-
-
Method Detail
-
getVarName
public java.lang.String getVarName()
Getter du nom de variable de type- Returns:
- variable de type
-
getVarIndex
public int getVarIndex()
Getter du numéro de variable de type- Returns:
- numéro de variable de type
-
setVarIndex
public void setVarIndex(int n)
Setter du numéro de variable de type- Parameters:
n
- numéro de variable de type
-
unify
public java.util.Map<UnknownType,Type> unify(Type t)
Description copied from class:Type
Unification
-
substitute
public Type substitute(UnknownType v, Type t)
Description copied from class:Type
Substitution- Specified by:
substitute
in classType
- Parameters:
v
- type variable à substituert
- type par lequel remplacer v- Returns:
- Type obtenu en remplaçant v par t
-
contains
public boolean contains(UnknownType v)
Description copied from class:Type
Test si le type dépend du type variable v
-
-