IKVM.Internal.ClassFile.ConstantPoolItemMI.Validate C# (CSharp) Method

Validate() protected method

protected Validate ( string name, string descriptor, int majorVersion ) : void
name string
descriptor string
majorVersion int
return void
            protected override void Validate(string name, string descriptor, int majorVersion)
            {
                if(!IsValidMethodSig(descriptor))
                {
                    throw new ClassFormatError("Method {0} has invalid signature {1}", name, descriptor);
                }
                if(!IsValidMethodName(name, majorVersion))
                {
                    if(!ReferenceEquals(name, StringConstants.INIT))
                    {
                        throw new ClassFormatError("Invalid method name \"{0}\"", name);
                    }
                    if(!descriptor.EndsWith("V"))
                    {
                        throw new ClassFormatError("Method {0} has invalid signature {1}", name, descriptor);
                    }
                }
            }