/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }
/** * Creates a new complete constructor {@code SSeqTypeBase} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param seqof_ the {@link PType} <b>graph</a> node for the {@code seqof} child of this {@link SSeqTypeBase} node. * <i>The parent of this {@code seqof } will not be changed by adding it to this node.</i> * @param empty_ the {@link Boolean} node for the {@code empty} child of this {@link SSeqTypeBase} node */ public SSeqTypeBase(ILexLocation location_, Boolean resolved_, List<? extends PDefinition> definitions_, PType seqof_, Boolean empty_) { super(location_,resolved_,definitions_); this.setSeqof(seqof_); this.setEmpty(empty_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof SSeqTypeBase) { return toString().equals(o.toString()); } return false; }
public STypeIR constructSeqType(SSeqTypeBase node, IRInfo question) throws AnalysisException { STypeIR seqOfCg = node.getSeqof().apply(question.getTypeVisitor(), question); boolean emptyCg = node.getEmpty(); boolean isSeq1 = node instanceof ASeq1SeqType; // This is a special case since sequence of characters are strings if (seqOfCg instanceof ACharBasicTypeIR && question.getSettings().getCharSeqAsString()) { AStringTypeIR stringTypeCg = new AStringTypeIR(); stringTypeCg.setSourceNode(new SourceNode(node)); return stringTypeCg; } ASeqSeqTypeIR seqType = new ASeqSeqTypeIR(); seqType.setSeqOf(seqOfCg); seqType.setEmpty(emptyCg); seqType.setSeq1(isSeq1); return seqType; }
boolean isSeq1 = seqType instanceof ASeq1SeqType; return new SeqInfo(optional, create(info, seqType.getSeqof(), visited), isSeq1); } else if (type instanceof SSetType)
/** * Creates a map of all field names and their value * @param includeInheritedFields if true all inherited fields are included * @return a a map of names to values of all fields */ @Override public Map<String,Object> getChildren(Boolean includeInheritedFields) { Map<String,Object> fields = new HashMap<String,Object>(); if(includeInheritedFields) { fields.putAll(super.getChildren(includeInheritedFields)); } return fields; }
/** * Creates a new tree field only constructor {@code SSeqTypeBase TAG=#seq} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param empty_ the {@link Boolean} node for the {@code empty} child of this {@link SSeqTypeBase} node */ public SSeqTypeBase(ILexLocation location_, Boolean resolved_, Boolean empty_) { super(location_,resolved_,null); this.setEmpty(empty_); }
/** * Creates a map of all field names and their value * @param includeInheritedFields if true all inherited fields are included * @return a a map of names to values of all fields */ @Override public Map<String,Object> getChildren(Boolean includeInheritedFields) { Map<String,Object> fields = new HashMap<String,Object>(); if(includeInheritedFields) { fields.putAll(super.getChildren(includeInheritedFields)); } return fields; }
/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }