Example #1
0
        public override bool IsAssignableFrom(JavaType other)
        {
            if (other is NullType)
            {
                return(false);                // You can't use null's with primitives.
            }
            PrimitiveType asPrimitive = other as PrimitiveType;

            if (asPrimitive != null)
            {
                return(asPrimitive.IsWideningOrIdentityConvertibleTo(this));
            }
            JavaClass asClass = (JavaClass)other;
            JavaClass boxed   = GetBoxClass();

            return(boxed.IsAssignableFrom(asClass));
        }