Package com.strobel.reflection

Examples of com.strobel.reflection.Type


    public static BinaryExpression unsignedRightShift(final Expression left, final Expression right, final MethodInfo method) {
        verifyCanRead(left, "left");
        verifyCanRead(right, "right");

        if (method == null) {
            final Type leftType = left.getType();
            final Type rightType = right.getType();

            if (TypeUtils.isArithmetic(leftType) && TypeUtils.isIntegral(rightType)) {
                return new SimpleBinaryExpression(ExpressionType.RightShift, left, right, performBinaryNumericPromotion(leftType, rightType));
            }
View Full Code Here


    public static BinaryExpression and(final Expression left, final Expression right, final MethodInfo method) {
        verifyCanRead(left, "left");
        verifyCanRead(right, "right");

        if (method == null) {
            final Type leftType = left.getType();
            final Type rightType = right.getType();

            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) && TypeUtils.isIntegralOrBoolean(leftType)) {
                return new SimpleBinaryExpression(ExpressionType.And, left, right, performBinaryNumericPromotion(leftType, rightType));
            }
View Full Code Here

    public static BinaryExpression or(final Expression left, final Expression right, final MethodInfo method) {
        verifyCanRead(left, "left");
        verifyCanRead(right, "right");

        if (method == null) {
            final Type leftType = left.getType();
            final Type rightType = right.getType();

            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) && TypeUtils.isIntegralOrBoolean(leftType)) {
                return new SimpleBinaryExpression(ExpressionType.Or, left, right, performBinaryNumericPromotion(leftType, rightType));
            }
View Full Code Here

    public static BinaryExpression exclusiveOr(final Expression left, final Expression right, final MethodInfo method) {
        verifyCanRead(left, "left");
        verifyCanRead(right, "right");

        if (method == null) {
            final Type leftType = left.getType();
            final Type rightType = right.getType();

            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) && TypeUtils.isIntegralOrBoolean(leftType)) {
                return new SimpleBinaryExpression(ExpressionType.ExclusiveOr, left, right, performBinaryNumericPromotion(leftType, rightType));
            }
View Full Code Here

    public static BinaryExpression andAlso(final Expression left, final Expression right, final MethodInfo method) {
        verifyCanRead(left, "left");
        verifyCanRead(right, "right");

        final Type leftType = left.getType();
        final Type rightType = right.getType();

        Type returnType;

        if (method == null) {
            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) &&
                TypeUtils.hasIdentityPrimitiveOrBoxingConversion(left.getType(), PrimitiveTypes.Boolean)) {
View Full Code Here

    public static BinaryExpression orElse(final Expression left, final Expression right, final MethodInfo method) {
        verifyCanRead(left, "left");
        verifyCanRead(right, "right");

        final Type leftType = left.getType();
        final Type rightType = right.getType();

        Type returnType;

        if (method == null) {
            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) &&
                TypeUtils.hasIdentityPrimitiveOrBoxingConversion(left.getType(), PrimitiveTypes.Boolean)) {
View Full Code Here

        if (!TypeUtils.hasIdentityPrimitiveOrBoxingConversion(index.getType(), PrimitiveTypes.Integer)) {
            throw Error.argumentMustBeArrayIndexType();
        }

        final Type arrayType = array.getType();

        if (!arrayType.isArray()) {
            throw Error.argumentMustBeArray();
        }

        return new SimpleBinaryExpression(ExpressionType.ArrayIndex, array, index, arrayType.getElementType());
    }
View Full Code Here

        verifyCanRead(left, "left");
        verifyCanWrite(left, "left");
        verifyCanRead(right, "right");

        final Type leftType = left.getType();
        final Type rightType = right.getType();

        if (method == null) {
            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) &&
                TypeUtils.isArithmetic(leftType)) {
                // conversion is not supported for binary ops on arithmetic types without operator overloading
View Full Code Here

        verifyCanRead(left, "left");
        verifyCanWrite(left, "left");
        verifyCanRead(right, "right");

        final Type leftType = left.getType();
        final Type rightType = right.getType();

        if (method == null) {
            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) &&
                TypeUtils.isArithmetic(leftType)) {
                // conversion is not supported for binary ops on arithmetic types without operator overloading
View Full Code Here

        verifyCanRead(left, "left");
        verifyCanWrite(left, "left");
        verifyCanRead(right, "right");

        final Type leftType = left.getType();
        final Type rightType = right.getType();

        if (method == null) {
            if (TypeUtils.hasIdentityPrimitiveOrBoxingConversion(leftType, rightType) &&
                TypeUtils.isArithmetic(leftType)) {
                // conversion is not supported for binary ops on arithmetic types without operator overloading
View Full Code Here

TOP

Related Classes of com.strobel.reflection.Type

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.