/// <summary> /// get the types for the scoped names specified in an inheritance relationship /// </summary> /// <param name="data">the buildinfo of the container of the type having this inheritance relationship</param> private Type[] ParseInheritanceRelation(SimpleNode node, BuildInfo data) { ArrayList result = new ArrayList(); for (int i = 0; i < node.jjtGetNumChildren(); i++) { // get symbol Symbol sym = (Symbol)(node.jjtGetChild(i).jjtAccept(this, data)); // accept interface_name if (sym.getDeclaredIn().GetFullyQualifiedNameForSymbol(sym.getSymbolName()).Equals("java.io.Serializable")) { Console.WriteLine("ignoring inheritance from java.io.Serializable, because not allowed"); continue; } // get Type TypeContainer resultType = m_typeManager.GetKnownType(sym); if (resultType == null) { // this is an error: type must be created before it is inherited from throw new InvalidIdlException("type " + sym.getSymbolName() + " not seen before in inheritance spec"); } else if (m_typeManager.IsFwdDeclared(sym)) { // this is an error: can't inherit from a fwd declared type throw new InvalidIdlException("type " + sym.getSymbolName() + " only fwd declared, but for inheritance full definition is needed"); } result.Add(resultType.GetCompactClsType()); } return (System.Type[])result.ToArray(typeof(Type)); }
/// <summary> /// Adds ASTmember to the type in construction. MemberParent is the node containing ASTmember nodes. /// </summary> private IList /* FieldBuilder */ GenerateMemberList(SimpleNode memberParent, Object data) { ArrayList result = new ArrayList(); for (int i = 0; i < memberParent.jjtGetNumChildren(); i++) { IList infos = (IList)memberParent.jjtGetChild(i).jjtAccept(this, data); result.AddRange(infos); } return result; }