Пример #1
0
        private static bool CollapseInlinedClass14(Statement stat)
        {
            bool ret = class14Builder.Match(stat);

            if (ret)
            {
                string            class_name = (string)class14Builder.GetVariableValue("$classname$");
                AssignmentExprent assignment = (AssignmentExprent)class14Builder.GetVariableValue
                                                   ("$assignfield$");
                FieldExprent fieldExpr = (FieldExprent)class14Builder.GetVariableValue("$field$");
                assignment.ReplaceExprent(assignment.GetRight(), new ConstExprent(VarType.Vartype_Class
                                                                                  , class_name, null));
                List <Exprent> data = new List <Exprent>(stat.GetFirst().GetExprents());
                stat.SetExprents(data);
                SequenceHelper.DestroyAndFlattenStatement(stat);
                ClassWrapper wrapper = (ClassWrapper)DecompilerContext.GetProperty(DecompilerContext
                                                                                   .Current_Class_Wrapper);
                if (wrapper != null)
                {
                    wrapper.GetHiddenMembers().Add(InterpreterUtil.MakeUniqueKey(fieldExpr.GetName(),
                                                                                 fieldExpr.GetDescriptor().descriptorString));
                }
            }
            return(ret);
        }