Antlr4.StringTemplate.Compiler.BytecodeDisassembler.ShowConstantPoolOperand C# (CSharp) Метод

ShowConstantPoolOperand() приватный Метод

private ShowConstantPoolOperand ( int poolIndex ) : string
poolIndex int
Результат string
        private string ShowConstantPoolOperand(int poolIndex)
        {
            StringBuilder buf = new StringBuilder();
            buf.Append("#");
            buf.Append(poolIndex);
            string s = "<bad string index>";
            if (poolIndex < code.strings.Length)
            {
                if (code.strings[poolIndex] == null)
                    s = "null";
                else
                {
                    s = code.strings[poolIndex];
                    if (code.strings[poolIndex] != null)
                    {
                        s = Utility.ReplaceEscapes(s);
                        s = '"' + s + '"';
                    }
                }
            }
            buf.Append(":");
            buf.Append(s);
            return buf.ToString();
        }