/** * Forwarding hashCode call to {@link Object#hashCode()}. **/ @Override public int hashCode() { return super.hashCode(); }
/** * Creates a new complete constructor {@code SMapTypeBase} 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 from_ the {@link PType} <b>graph</a> node for the {@code from} child of this {@link SMapTypeBase} node. * <i>The parent of this {@code from } will not be changed by adding it to this node.</i> * @param to_ the {@link PType} <b>graph</a> node for the {@code to} child of this {@link SMapTypeBase} node. * <i>The parent of this {@code to } 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 SMapTypeBase} node */ public SMapTypeBase(ILexLocation location_, Boolean resolved_, List<? extends PDefinition> definitions_, PType from_, PType to_, Boolean empty_) { super(location_,resolved_,definitions_); this.setFrom(from_); this.setTo(to_); this.setEmpty(empty_); }
public STypeIR handleMapType(SMapTypeBase node, IRInfo question, boolean isInjective) throws AnalysisException { PType from = node.getFrom(); PType to = node.getTo(); boolean empty = node.getEmpty(); STypeIR fromCg = from.apply(question.getTypeVisitor(), question); STypeIR toCg = to.apply(question.getTypeVisitor(), question); AMapMapTypeIR mapType = new AMapMapTypeIR(); mapType.setFrom(fromCg); mapType.setTo(toCg); mapType.setEmpty(empty); mapType.setInjective(isInjective); return mapType; }
/** * 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 SMapTypeBase TAG=#Map} 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 SMapTypeBase} node */ public SMapTypeBase(ILexLocation location_, Boolean resolved_, Boolean empty_) { super(location_,resolved_,null); this.setEmpty(empty_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof SMapTypeBase) { return toString().equals(o.toString()); } return false; }
/** * 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(); }