Пример #1
0
 public APICall() : base()
 {
     OperationFeatures.Add("EmptyBlock", 0);
     OperationFeatures.Add("RecoverFlag", 0);
     OperationFeatures.Add("OtherOperation", 0);
     MetaInfo.Add("RecoverFlag", null);
     MetaInfo.Add("OtherOperation", null);
     MetaInfo.Add("CheckIfBlock", null);
     MetaKeys = MetaInfo.Keys.ToList();
 }
Пример #2
0
        public CatchBlock() : base()
        {
            //Binding info and binding based:
            OperationFeatures.Add("Binded", -9);
            OperationFeatures.Add("RecoveredBinding", -9);
            OperationFeatures.Add("Kind", -9);
            OperationFeatures.Add("Checked", 0);

            //Try info
            MetaInfo.Add("TryBlock", "'-tryblock");
            OperationFeatures.Add("ParentNodeType", 0);
            MetaInfo.Add("ParentNodeType", "'-parentnodetype");

            //Try Visitor items:
            OperationFeatures.Add("RecoverFlag", 0);
            MetaInfo.Add("RecoverFlag", "'-recoverflag");
            OperationFeatures.Add("InnerCatch", 0);
            OperationFeatures.Add("ParentTryStartLine", 0);

            //Method invocation Visitor on the Catch block:
            OperationFeatures.Add("Logged", 0);
            OperationFeatures.Add("MultiLog", 0);
            OperationFeatures.Add("Abort", 0);
            OperationFeatures.Add("Default", 0);
            OperationFeatures.Add("GetCause", 0);
            OperationFeatures.Add("OtherInvocation", 0);

            MetaInfo.Add("Logged", "'-logged");
            MetaInfo.Add("Abort", "'-abort");
            MetaInfo.Add("Default", "'-default");
            MetaInfo.Add("GetCause", "'-getcause");
            MetaInfo.Add("OtherInvocation", "'-otherinvocation");

            //Throw visitor
            OperationFeatures.Add("NumThrown", 0);
            MetaInfo.Add("Thrown", "'-thrown");
            OperationFeatures.Add("NumThrowNew", 0);
            OperationFeatures.Add("NumThrowWrapCurrentException", 0);

            //Other specific visitors:
            OperationFeatures.Add("Return", 0);
            OperationFeatures.Add("Continue", 0);
            MetaInfo.Add("Return", "'-return");
            MetaInfo.Add("Continue", "'-continue");

            //Some catch block info
            OperationFeatures.Add("EmptyBlock", 0);
            OperationFeatures.Add("CatchException", -9);

            //Finally block items, if existing
            MetaInfo.Add("FinallyBlock", "'-finallyblock");
            OperationFeatures.Add("FinallyThrowing", 0);

            //Binding based info:
            //MetaInfo.Add("TryMethods", "'-trymethods");
            MetaInfo.Add("TryMethodsAndExceptions", "'-trymethodsandexceptions");

            OperationFeatures.Add("NumDistinctMethods", 0);
            MetaInfo.Add("TryMethodsBinded", "'-trymethodsbinded");
            OperationFeatures.Add("NumDistinctMethodsNotBinded", 0);

            MetaInfo.Add("DistinctExceptions", "'DistinctExceptions");
            OperationFeatures.Add("NumDistinctExceptions", 0);

            OperationFeatures.Add("NumSpecificHandler", 0);
            OperationFeatures.Add("NumSubsumptionHandler", 0);
            OperationFeatures.Add("NumSupersumptionHandler", 0);
            OperationFeatures.Add("NumOtherHandler", 0);

            OperationFeatures.Add("MaxLevel", 0);
            OperationFeatures.Add("NumIsDocSemantic", 0);
            OperationFeatures.Add("NumIsDocSyntax", 0);
            OperationFeatures.Add("NumIsThrow", 0);

            //Comments info - not in the Catch Visitor
            OperationFeatures.Add("ToDo", 0);
            MetaInfo.Add("CatchBlock", "'-catchblock");


            /* // Not in Use right now:
             * OperationFeatures.Add("SetLogicFlag", 0);
             * MetaInfo.Add("SetLogicFlag", "'-setlogicflag");
             * OperationFeatures.Add("OtherOperation", 0);
             * MetaInfo.Add("OtherOperation", "'-otheroperation");
             */

            MetaKeys       = MetaInfo.Keys.ToList();
            OpFeaturesKeys = OperationFeatures.Keys.ToList();
        }