Package com.facebook.swift.codec

Examples of com.facebook.swift.codec.ThriftProtocolType


        SuccessAndResult<ThriftType> output = topologicalSort(thriftTypes, new Predicate<ThriftType>()
        {
            @Override
            public boolean apply(@Nullable ThriftType t)
            {
                ThriftProtocolType proto = checkNotNull(t).getProtocolType();
                if (proto == ThriftProtocolType.ENUM || proto == ThriftProtocolType.STRUCT) {
                    return verifyStruct(t, true);
                } else {
                    Preconditions.checkState(false, "Top-level non-enum and non-struct?");
                    return false;   // silence compiler
View Full Code Here


        return ok;
    }

    private boolean verifyField(ThriftType t)
    {
        ThriftProtocolType proto = t.getProtocolType();
        if (proto == ThriftProtocolType.SET || proto == ThriftProtocolType.LIST) {
            return verifyField(t.getValueType());
        } else if (proto == ThriftProtocolType.MAP) {
            // no short-circuit
            return verifyField(t.getKeyType()) & verifyField(t.getValueType());
View Full Code Here

    {
        if (ReflectionHelper.isArray(fieldMetadata.getThriftType().getJavaType())) {
            return false;
        }

        ThriftProtocolType protocolType = fieldMetadata.getThriftType().getProtocolType();
        return protocolType == ENUM ||
                protocolType == STRUCT ||
                protocolType == SET ||
                protocolType == LIST ||
                protocolType == MAP;
View Full Code Here

        SuccessAndResult<ThriftType> output = topologicalSort(thriftTypes, new Predicate<ThriftType>()
        {
            @Override
            public boolean apply(@Nullable ThriftType t)
            {
                ThriftProtocolType proto = checkNotNull(t).getProtocolType();
                if (proto == ThriftProtocolType.ENUM) {
                    knownTypes.add(t);
                    return true;
                } else if (proto == ThriftProtocolType.STRUCT) {
                    return verifyStruct(t, true);
View Full Code Here

        return needsCast;
    }

    private boolean needsCodec(ThriftFieldMetadata fieldMetadata)
    {
        ThriftProtocolType protocolType = fieldMetadata.getThriftType().getProtocolType();
        return protocolType == ENUM ||
                protocolType == STRUCT ||
                protocolType == SET ||
                protocolType == LIST ||
                protocolType == MAP;
View Full Code Here

        return needsCast;
    }

    private boolean needsCodec(ThriftFieldMetadata fieldMetadata)
    {
        ThriftProtocolType protocolType = fieldMetadata.getThriftType().getProtocolType();
        return protocolType == ENUM ||
                protocolType == STRUCT ||
                protocolType == SET ||
                protocolType == LIST ||
                protocolType == MAP;
View Full Code Here

        SuccessAndResult<ThriftType> output = topologicalSort(thriftTypes, new Predicate<ThriftType>()
        {
            @Override
            public boolean apply(@Nullable ThriftType t)
            {
                ThriftProtocolType proto = t.getProtocolType();
                if (proto == ThriftProtocolType.ENUM) {
                    knownTypes.add(t);
                    return true;
                } else if (proto == ThriftProtocolType.STRUCT) {
                    return verifyStruct(t, true);
View Full Code Here

        return ok;
    }

    private boolean verifyField(ThriftType t)
    {
        ThriftProtocolType proto = t.getProtocolType();
        if (proto == ThriftProtocolType.SET || proto == ThriftProtocolType.LIST) {
            return verifyField(t.getValueType());
        } else if (proto == ThriftProtocolType.MAP) {
            // no short-circuit
            return verifyField(t.getKeyType()) & verifyField(t.getValueType());
View Full Code Here

        SuccessAndResult<ThriftType> output = topologicalSort(thriftTypes, new Predicate<ThriftType>()
        {
            @Override
            public boolean apply(@Nullable ThriftType t)
            {
                ThriftProtocolType proto = t.getProtocolType();
                if (proto == ThriftProtocolType.ENUM) {
                    knownTypes.add(t);
                    return true;
                } else if (proto == ThriftProtocolType.STRUCT) {
                    return verifyStruct(t, true);
View Full Code Here

        return ok;
    }

    private boolean verifyField(ThriftType t)
    {
        ThriftProtocolType proto = t.getProtocolType();
        if (proto == ThriftProtocolType.SET || proto == ThriftProtocolType.LIST) {
            return verifyField(t.getValueType());
        } else if (proto == ThriftProtocolType.MAP) {
            // no short-circuit
            return verifyField(t.getKeyType()) & verifyField(t.getValueType());
View Full Code Here

TOP

Related Classes of com.facebook.swift.codec.ThriftProtocolType

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.