Package ariba.util.fieldtype

Examples of ariba.util.fieldtype.TypeInfo


        return symbolKind;
    }

    public TypeInfo getSymbolType (Symbol symbol)
    {
        TypeInfo type = null;
        SymbolTable symbolTable = getSymbolTable();
        if (symbolTable != null) {
            SemanticRecord record = symbolTable.getSymbolRecord(symbol);
            if (record != null) {
                type = record.getTypeInfo();
View Full Code Here


    protected Object getValueBody( ExprContext context, Object source )
        throws ExprException
    {
        Integer symbolKind = context.getSymbolKind(this);
        TypeInfo type = context.getSymbolType(this);

        if (Symbol.Type.equals(symbolKind)) {
            // If the property chain actually represents a type.
            Assert.that(type != null,
                        "Type information is missing for %s", getName());
View Full Code Here

        }

        String className = targetClass.getName();
        List <TypeInfo> argTypes = getArgumentTypes(args);
        TypeRetriever retriever = JavaTypeRegistry.instance();
        TypeInfo targetType = retriever.getTypeInfo(className);

        // In the case of nested class loaders we could have a class for which
        // classForName() (using the system class loader) might fail,
        // so we look up using the class explicitly
        // Todo: reconsider the getTypeInfo interface: maybe add class as an (optional) arg
View Full Code Here

        TypeRetriever retriever = JavaTypeRegistry.instance();
        List result = ListUtil.list();
        if (!ArrayUtil.nullOrEmptyArray(args)) {
            for (int i=0; i < args.length; i++) {
                Object arg = args[i];
                TypeInfo type = NullTypeInfo.instance;

                if (arg != null) {
                    Class argCls = arg.getClass();
                    type = retriever.getTypeInfo(argCls.getName());
                    Assert.that(type != null,
View Full Code Here

    protected Object getValueBody( ExprContext context, Object source ) throws ExprException
    {
        Object v1 = children[0].getValue( context, source );
        Object v2 = children[1].getValue( context, source );
        TypeInfo v1Info = children[0].getTypeInfo();
        if (v1Info == null || v1Info instanceof NullTypeInfo) {
            v1Info = getTypeInfo();
        }
        TypeInfo v2Info = children[1].getTypeInfo();
        return ExprOps.subtract(
            v1,
            v2,
            v1Info != null? v1Info.getName(): null,
              v2Info != null? v2Info.getName(): null);
    }
View Full Code Here

        }
        else {
            // Convert the primitive to the type of this property. This is
            // necessary because numeric literal are Integer or Double and
            // there is no cast operation to convert to the property type.
            TypeInfo nodeType = getTypeInfo();
            value = TypeConversionHelper.convertPrimitive(nodeType, value);
            _fieldPath.setFieldValue(target, value);
        }
    }
View Full Code Here

        if (StringUtil.nullOrEmptyOrBlankString(convertedTo) ||
            StringUtil.nullOrEmptyOrBlankString(convertedFrom)) {
            return false;
        }

        TypeInfo convertedToType = provider.getTypeInfo(convertedTo);
        TypeInfo convertedFromType = provider.getTypeInfo(convertedFrom);

        if (convertedToType == null || convertedFromType == null) {
            return false;
        }
View Full Code Here

    {
        Object result = null;

        while (e.hasNext()) {
          Object value = expr.getValue(context, e.next());
          TypeInfo valueInfo = getTypeInfo();
            result = ExprOps.add(
              result, value, null, valueInfo != null? valueInfo.getName(): null);
        }
        return result;
    }
View Full Code Here

        String resultType = Integer.class.getName();
        int count = 0;

        while (e.hasNext()) {
            Object value = expr.getValue(context, e.next());
            TypeInfo valueInfo = expr.getTypeInfo();
            result = ExprOps.add(
                result,
                value,
                resultType,
                valueInfo != null? valueInfo.getName(): null);
            resultType = result != null? result.getClass().getName(): null;
            count++;
        }
        return ExprOps.divide(result, new Integer(count), resultType);
    }
View Full Code Here

    }

    protected Object getValueBody( ExprContext context, Object source ) throws ExprException
    {
        Object result = children[0].getValue( context, source );
        TypeInfo resultInfo = children[0].getTypeInfo();
        if (resultInfo == null || resultInfo instanceof NullTypeInfo) {
            resultInfo = getTypeInfo();
        }
        String resultType = resultInfo != null? resultInfo.getName(): null;
        for ( int i=1; i < children.length; ++i ) {
          TypeInfo info = children[i].getTypeInfo();
            result = ExprOps.add(
                result,
                children[i].getValue(context, source),
                resultType, 
                info != null? info.getName(): null);
            resultType = result != null? result.getClass().getName(): null;
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of ariba.util.fieldtype.TypeInfo

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.