Examples of asType()


Examples of com.alibaba.toolkit.util.typeconvert.ConvertManager.asType()

            int            length          = Array.getLength(value);
            Object         convertedValues = Array.newInstance(componentType, length);
            ConvertManager manager         = chain.getConvertManager();

            for (int i = 0; i < length; i++) {
                Array.set(convertedValues, i, manager.asType(componentType, Array.get(value, i)));
            }

            return convertedValues;
        }
View Full Code Here

Examples of com.google.appengine.api.datastore.RawValue.asType()

        PreparedQuery preparedQuery = service.prepare(query);
        Entity result = preparedQuery.asSingleEntity();
        assertEquals(e.getKey(), result.getKey());

        RawValue rawValue = (RawValue) result.getProperty("long");
        assertEquals(Long.valueOf(123L), rawValue.asType(Long.class));
        assertEquals(Long.valueOf(123L), rawValue.asStrictType(Long.class));
    }

    @Test
    public void testProjectionOfCollectionProperties() throws Exception {
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.asType()

                if (site.kind == PCK) {
                    env.toplevel.packge = (PackageSymbol)site;
                    return rs.findIdentInPackage(env, (TypeSymbol)site, name, TYP | PCK);
                } else {
                    env.enclClass.sym = (ClassSymbol)site;
                    return rs.findMemberType(env, site.asType(), name, (TypeSymbol)site);
                }
            }

            @Override
            public Symbol visitIdentifier(IdentifierTree node, Env<AttrContext> env) {
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.asType()

                if (site.kind == PCK) {
                    env.toplevel.packge = (PackageSymbol)site;
                    return rs.findIdentInPackage(env, (TypeSymbol)site, name, TYP | PCK);
                } else {
                    env.enclClass.sym = (ClassSymbol)site;
                    return rs.findMemberType(env, site.asType(), name, (TypeSymbol)site);
                }
            }

            @Override
            public Symbol visitIdentifier(IdentifierTree node, Env<AttrContext> env) {
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.asType()

        if (exp instanceof JCLiteral) {
            return getType((JCLiteral) exp);
        } else {
            Symbol s = getSymbol(exp, cut, n);
            Symbol typeSymbol = getTypeSymbol(s);
            return typeSymbol.asType();
        }
    }

    public JCNewArray getTypedArray(JCNewArray arr, CompilationUnitTree cut, Node n) {
        if (arr.elemtype == null) {
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.asType()

     * {@inheritDoc}
     */
    public FilteredMemberList getAllMembers(TypeElement element) {
        Symbol sym = cast(Symbol.class, element);
        Scope scope = sym.members().dupUnshared();
        List<Type> closure = types.closure(sym.asType());
        for (Type t : closure)
            addMembers(scope, t);
        return new FilteredMemberList(scope);
    }
    // where
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.asType()

                if (site.kind == PCK) {
                    env.toplevel.packge = (PackageSymbol)site;
                    return rs.findIdentInPackage(env, (TypeSymbol)site, name, TYP | PCK);
                } else {
                    env.enclClass.sym = (ClassSymbol)site;
                    return rs.findMemberType(env, site.asType(), name, (TypeSymbol)site);
                }
            }

            @Override
            public Symbol visitIdentifier(IdentifierTree node, Env<AttrContext> env) {
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.asType()

     * {@inheritDoc}
     */
    public FilteredMemberList getAllMembers(TypeElement element) {
        Symbol sym = cast(Symbol.class, element);
        Scope scope = sym.members().dupUnshared();
        List<Type> closure = types.closure(sym.asType());
        for (Type t : closure)
            addMembers(scope, t);
        return new FilteredMemberList(scope);
    }
    // where
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.asType()

                if (site.kind == PCK) {
                    env.toplevel.packge = (PackageSymbol)site;
                    return rs.findIdentInPackage(env, (TypeSymbol)site, name, TYP | PCK);
                } else {
                    env.enclClass.sym = (ClassSymbol)site;
                    return rs.findMemberType(env, site.asType(), name, (TypeSymbol)site);
                }
            }

            @Override
            public Symbol visitIdentifier(IdentifierTree node, Env<AttrContext> env) {
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.ClassSymbol.asType()

        if (!(sym instanceof ClassSymbol)) {
          return null;
        }
        typeSymbol = (ClassSymbol) sym;
      }
      Type type = typeSymbol.asType();
      // Throws CompletionFailure if the source/class file for this type is not available.
      // This is hacky but the best way I can think of to handle this case.
      type.complete();
      if (type.isErroneous()) {
        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.