Пример #1
0
        public override bool Equals(object o)
        {
            if (o == this)
            {
                return(true);
            }
            if (!(o is PrimitiveConstant))
            {
                return(false);
            }
            PrimitiveConstant cn = (PrimitiveConstant)o;

            return(this.type == cn.type && this.isArray == cn.isArray && this.value.Equals(cn
                                                                                           .value));
        }
Пример #2
0
        public virtual PrimitiveConstant GetPrimitiveConstant(int index)
        {
            PrimitiveConstant cn = (PrimitiveConstant)GetConstant(index);

            if (cn != null && interceptor != null)
            {
                if (cn.type == ICodeConstants.CONSTANT_Class)
                {
                    string newName = BuildNewClassname(cn.GetString());
                    if (newName != null)
                    {
                        cn = new PrimitiveConstant(ICodeConstants.CONSTANT_Class, newName);
                    }
                }
            }
            return(cn);
        }