Object match = _internal2Java.maps(intType, extType); if (match != null) { currConstrDistance += ((JavaType)match).distance;
public Object put(Object key, Object value) { Vector vector = (Vector)get(key); if (vector == null) super.put(key, vector = new Vector()); vector.add(value); return vector; }
Object match = _internal2Java.maps(intType, extType); if (match != null) { currMethodDistance += ((JavaType)match).distance;
public Object maps(Object from, Object to) { if (from == null) return null; final Vector vector = (Vector) get(from); if (vector != null) { final int n = vector.size(); for (int i = 0; i < n; i++) { final Object item = vector.elementAt(i); if (item.equals(to)) { return item; } } } return null; } }
/** * Type checking a cast expression amounts to verifying that the * type conversion is legal. Cast expressions are created during * type checking, but typeCheck() is usually not called on them. * As a result, this method is called from the constructor. */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { Type tleft = _left.getType(); if (tleft == null) { tleft = _left.typeCheck(stable); } if (tleft instanceof NodeType) { tleft = Type.Node; // multiple instances } else if (tleft instanceof ResultTreeType) { tleft = Type.ResultTree; // multiple instances } if (InternalTypeMap.maps(tleft, _type) != null) { return _type; } // throw new TypeCheckError(this); throw new TypeCheckError(new ErrorMsg( ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString())); }
public Object put(Object key, Object value) { Vector vector = (Vector)get(key); if (vector == null) super.put(key, vector = new Vector()); vector.add(value); return vector; }
Object match = _internal2Java.maps(intType, extType); if (match != null) { currConstrDistance += ((JavaType)match).distance;
public Object maps(Object from, Object to) { if (from == null) return null; final Vector vector = (Vector) get(from); if (vector != null) { final int n = vector.size(); for (int i = 0; i < n; i++) { final Object item = vector.elementAt(i); if (item.equals(to)) { return item; } } } return null; } }
Object match = _internal2Java.maps(intType, extType); if (match != null) { currConstrDistance += ((JavaType)match).distance;
Object match = _internal2Java.maps(intType, extType); if (match != null) { currConstrDistance += ((JavaType)match).distance;
Object match = _internal2Java.maps(intType, extType); if (match != null) { currMethodDistance += ((JavaType)match).distance;
Object match = _internal2Java.maps(intType, extType); if (match != null) { currMethodDistance += ((JavaType)match).distance;
Object match = _internal2Java.maps(intType, extType); if (match != null) { currMethodDistance += ((JavaType)match).distance;
/** * Type checking a cast expression amounts to verifying that the * type conversion is legal. Cast expressions are created during * type checking, but typeCheck() is usually not called on them. * As a result, this method is called from the constructor. */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { Type tleft = _left.getType(); if (tleft == null) { tleft = _left.typeCheck(stable); } if (tleft instanceof NodeType) { tleft = Type.Node; // multiple instances } else if (tleft instanceof ResultTreeType) { tleft = Type.ResultTree; // multiple instances } if (InternalTypeMap.maps(tleft, _type) != null) { return _type; } // throw new TypeCheckError(this); throw new TypeCheckError(new ErrorMsg( ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString())); }
/** * Type checking a cast expression amounts to verifying that the * type conversion is legal. Cast expressions are created during * type checking, but typeCheck() is usually not called on them. * As a result, this method is called from the constructor. */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { Type tleft = _left.getType(); if (tleft == null) { tleft = _left.typeCheck(stable); } if (tleft instanceof NodeType) { tleft = Type.Node; // multiple instances } else if (tleft instanceof ResultTreeType) { tleft = Type.ResultTree; // multiple instances } if (InternalTypeMap.maps(tleft, _type) != null) { return _type; } // throw new TypeCheckError(this); throw new TypeCheckError(new ErrorMsg( ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString())); }
/** * Type checking a cast expression amounts to verifying that the * type conversion is legal. Cast expressions are created during * type checking, but typeCheck() is usually not called on them. * As a result, this method is called from the constructor. */ public Type typeCheck(SymbolTable stable) throws TypeCheckError { Type tleft = _left.getType(); if (tleft == null) { tleft = _left.typeCheck(stable); } if (tleft instanceof NodeType) { tleft = Type.Node; // multiple instances } else if (tleft instanceof ResultTreeType) { tleft = Type.ResultTree; // multiple instances } if (InternalTypeMap.maps(tleft, _type) != null) { return _type; } // throw new TypeCheckError(this); throw new TypeCheckError(new ErrorMsg( ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString())); }