@Override public AProductType caseAProductType(AProductType type, Integer size) throws AnalysisException { return size == 0 || type.getTypes().size() == size ? type : null; }
throws AnalysisException if (type.getResolved()) type.setResolved(true); TypeCheckException problem = null; for (PType t : type.getTypes()) type.apply(af.getTypeUnresolver()); throw problem; type.setTypes(fixed); return type;
/** * Called by the {@link AProductType} node from {@link AProductType#apply(IPOFAnalysis)}. * @param node the calling {@link AProductType} node */ public void caseAProductType(AProductType node) throws AnalysisException { _visitedNodes.add(node); inAProductType(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } { List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outAProductType(node); }
public static AProductType newAProductType(ILexLocation location, List<PType> types) { AProductType result = new AProductType(); initType(result, location); result.setTypes(types); return result; }
@Override public void caseAProductType(AProductType type) throws AnalysisException { if (!type.getResolved()) { return; } else { type.setResolved(false); } for (PType t : type.getTypes()) { t.apply(THIS); } }
@Override public PType caseAProductType(AProductType type, Context ctxt) throws AnalysisException { return AstFactory.newAProductType(type.getLocation(), instantiate(type.getTypes(), ctxt)); }
node.getProdType().apply(this, question);
/** * Creates a new complete constructor {@code AProductType} 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 types_ the {@link GraphNodeList} <b>graph</a> node for the {@code types} child of this {@link AProductType} node. * <i>The parent of this {@code types } will not be changed by adding it to this node.</i> */ public AProductType(ILexLocation location_, Boolean resolved_, List<? extends PDefinition> definitions_, List<? extends PType> types_) { super(location_,resolved_,definitions_); this.setTypes(types_); }
@Override public PType caseAProductType(AProductType type, Newquestion question) throws AnalysisException { List<PType> polytypes = new Vector<PType>(); for (PType ptype : ((AProductType) type).getTypes()) { polytypes.add(af.createPTypeAssistant().polymorph(ptype, question.pname, question.actualType)); } return AstFactory.newAProductType(type.getLocation(), polytypes); }
node.getProdType().apply(this);
@Override public Boolean caseAProductType(AProductType type, Integer size) throws AnalysisException { return size == 0 || type.getTypes().size() == size; }
/** * Called by the {@link AProductType} node from {@link AProductType#apply(IAnalysis)}. * @param node the calling {@link AProductType} node */ public void caseAProductType(AProductType node) throws AnalysisException { _visitedNodes.add(node); inAProductType(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } { List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outAProductType(node); }
node.getProdType().apply(this);
@Override public Boolean caseAProductType(AProductType type, AAccessSpecifierAccessSpecifier accessSpecifier) throws AnalysisException { for (PType t : type.getTypes()) { if (t.apply(this, accessSpecifier)) { return true; } } return false; }
/** * Called by the {@link AProductType} node from {@link AProductType#apply(IAnalysis)}. * @param node the calling {@link AProductType} node */ public void caseAProductType(AProductType node, Q question) throws AnalysisException { _visitedNodes.add(node); inAProductType(node, question); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } { List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } outAProductType(node, question); }
mergeReturns(retVal,node.getProdType().apply(this));
@Override public String caseAProductType(AProductType type) throws AnalysisException { return Utils.listToString("(", type.getTypes(), " * ", ")"); }
List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy)
mergeReturns(retVal,node.getProdType().apply(this, question));
@Override public ValueList caseAProductType(AProductType type, Context ctxt) throws AnalysisException { return getAllValues(type.getTypes(), ctxt); }