@Override public boolean isSameType(IType t) { if (t == this) return true; if (t instanceof ITypedef) return type.isSameType(((ITypedef) t).getType()); return type.isSameType(t); }
@Override public boolean isSameType(IType type) { IType myrtype = getType(); if (myrtype == null) return false; if (type instanceof ITypedef) { type = ((ITypedef) type).getType(); } return myrtype.isSameType(type); }
@Override public boolean isSameType(IType obj) { if (obj == this) return true; if (obj instanceof ITypedef) return ((ITypedef) obj).isSameType(this); if (obj instanceof ICPPParameterPackType) { final ICPPParameterPackType rhs = (ICPPParameterPackType) obj; IType t1 = getType(); IType t2 = rhs.getType(); return t1 != null && t1.isSameType(t2); } return false; }
@Override public boolean isSameType(IType type) { if (type == this) return true; if (type instanceof ITypedef) return type.isSameType(this); return false; }
@Override public boolean isSameType(IType type) { if (type instanceof ITypedef) { return type.isSameType(this); } if (type instanceof PDOMNode) { PDOMNode node = (PDOMNode) type; if (node.getPDOM() == getPDOM()) { return node.getRecord() == getRecord(); } } if (type instanceof IEnumeration) { IEnumeration etype = (IEnumeration) type; char[] nchars = etype.getNameCharArray(); if (nchars.length == 0) { nchars = ASTTypeUtil.createNameForAnonymous(etype); } if (nchars == null || !CharArrayUtils.equals(nchars, getNameCharArray())) return false; return SemanticUtil.haveSameOwner(this, etype); } return false; }
@Override public boolean isSameType(IType type) { if (type instanceof ITypedef) { return type.isSameType(this); } if (!(type instanceof ICPPTemplateTypeParameter)) return false; return getParameterID() == ((ICPPTemplateParameter) type).getParameterID(); }
@Override public boolean isSameType(IType type) { if (type == this) return true; if (type instanceof ITypedef) return type.isSameType(this); if (type instanceof ICPPClassTemplatePartialSpecializationSpecialization) { return CPPClassTemplatePartialSpecialization.isSamePartialClassSpecialization( this, (ICPPClassTemplatePartialSpecializationSpecialization) type); } return false; }
@Override public C99ArrayType clone() { C99ArrayType clone = null; try { clone = (C99ArrayType) super.clone(); clone.type = (IType) type.clone(); } catch (CloneNotSupportedException e) { assert false; // not going to happen } return clone; }
@Override public C99Typedef clone() { try { C99Typedef clone = (C99Typedef) super.clone(); clone.type = (IType) type.clone(); return clone; } catch (CloneNotSupportedException e) { assert false; return null; } }
public EvalFixed(IType type, ValueCategory cat, IValue value) { if (type instanceof CPPBasicType) { Long num = value.numericalValue(); if (num != null) { CPPBasicType t = (CPPBasicType) type.clone(); t.setAssociatedNumericalValue(num); type = t; } } fType = type; fValueCategory = cat; fValue = value; }
public boolean isSameType(IType t) { if (t == this) return true; if (t instanceof ITypedef) return t.isSameType(this); if (t instanceof ICArrayType) { ICArrayType at = (ICArrayType) t; if (at.isConst() == isConst && at.isRestrict() == isRestrict && at.isStatic() == isStatic && at.isVolatile() == isVolatile && at.isVariableLength() == isVariableLength) { return at.isSameType(type); } } return false; }
@Override public boolean isSameType(IType type) { if (type == this) return true; if (type instanceof ITypedef) return type.isSameType(this); if (type instanceof PDOMNode) { PDOMNode node = (PDOMNode) type; if (node.getPDOM() == getPDOM()) { return node.getRecord() == getRecord(); } } // require a class specialization if (!(type instanceof ICPPClassSpecialization)) return false; return CPPClassSpecialization.isSameClassSpecialization(this, (ICPPClassSpecialization) type); }
@Override public boolean isSameType(IType other) { return type.isSameType(other); }
@Override public String toString() { if (fValue != null) return fValue.toString(); return fType.toString(); }
public boolean isSameValue(ICPPTemplateArgument arg) { if (fValue != null) { return fValue.equals(arg.getNonTypeValue()); } return fType.isSameType(arg.getTypeValue()); }