public void value_support_inheritance_spec() { /*@bgen(jjtree) value_support_inheritance_spec */ ASTvalue_support_inheritance_spec jjtn000 = new ASTvalue_support_inheritance_spec(this, IDLParserTreeConstants.JJTVALUE_SUPPORT_INHERITANCE_SPEC); bool jjtc000 = true; jjtree.openNodeScope(jjtn000); try { jj_consume_token(25); interface_name(); while (true) { switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) { case 20: ; break; default: jj_la1[26] = jj_gen; goto label_9; break; } jj_consume_token(20); interface_name(); } label_9: ; } catch (Exception jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } {if (true) throw ;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * @see parser.IDLParserVisitor#visit(ASTvalue_support_inheritance_spec, Object) * @param data the buildinfo of the container of the type, having this inheritance relationship * @return an array of System.Type containing all interfaces, this type supports directly */ public Object visit(ASTvalue_support_inheritance_spec node, Object data) { CheckParameterForBuildInfo(data, node); Type[] result = ParseInheritanceRelation(node, (BuildInfo)data); for (int i = 0; i < result.Length; i++) { if (result[i].IsClass) { throw new InvalidIdlException("invalid supertype: " + result[i].FullName + " for type: " + ((BuildInfo)data).GetContainterType().FullName + " only abstract/concrete interfaces are allowed in support clause"); } AttributeExtCollection attrs = AttributeExtCollection.ConvertToAttributeCollection(result[i].GetCustomAttributes(typeof(InterfaceTypeAttribute), true)); if (attrs.IsInCollection(typeof(InterfaceTypeAttribute))) { InterfaceTypeAttribute ifAttr = (InterfaceTypeAttribute)attrs.GetAttributeForType(typeof(InterfaceTypeAttribute)); if (ifAttr.IdlType.Equals(IdlTypeInterface.AbstractValueType)) { throw new InvalidIdlException("invalid supertype: " + result[i].FullName + " for type: " + ((BuildInfo)data).GetContainterType().FullName + " only abstract/concrete interfaces are allowed in support clause and no abstract value type"); } } } return result; }