Examples of DeclaredType


Examples of javax.lang.model.type.DeclaredType

    }

    public Map<MethodSymbol, Attribute> getElementValuesWithDefaults(
                                                        AnnotationMirror a) {
        Attribute.Compound anno = cast(Attribute.Compound.class, a);
        DeclaredType annotype = a.getAnnotationType();
        Map<MethodSymbol, Attribute> valmap = anno.getElementValues();

        for (ExecutableElement ex :
                 methodsIn(annotype.asElement().getEnclosedElements())) {
            MethodSymbol meth = (MethodSymbol) ex;
            Attribute defaultValue = meth.getDefaultValue();
            if (defaultValue != null && !valmap.containsKey(meth)) {
                valmap.put(meth, defaultValue);
            }
View Full Code Here

Examples of javax.lang.model.type.DeclaredType

        Set<Element> result = Collections.emptySet();
        Types typeUtil = processingEnv.getTypeUtils();
        if (a.getKind() != ElementKind.ANNOTATION_TYPE)
            throw new IllegalArgumentException(NOT_AN_ANNOTATION_TYPE + a);

        DeclaredType annotationTypeElement;
        TypeMirror tm = a.asType();
        if ( tm instanceof DeclaredType )
            annotationTypeElement = (DeclaredType) a.asType();
        else
            throw new AssertionError("Bad implementation type for " + tm);
View Full Code Here

Examples of javax.lang.model.type.DeclaredType

    // resolve type parameters, if any
    ExecutableType xType = viewIn(checkedElement, x, state);
    TypeMirror returnType = xType.getReturnType();
    if (state.types.isAssignable(returnType, state.requestType)) {
      // Extract Request<Foo> type
      DeclaredType asRequest = (DeclaredType) State.viewAs(state.requestType, returnType, state);
      if (asRequest.getTypeArguments().isEmpty()) {
        state.poison(x, Messages.rawType());
      } else {
        TypeMirror requestReturn = asRequest.getTypeArguments().get(0);
        if (!state.isTransportableType(requestReturn)) {
          state.poison(x, Messages.untransportableType(requestReturn));
        }
      }
    } else if (state.types.isAssignable(returnType, state.instanceRequestType)) {
      // Extract InstanceRequest<FooProxy, String>
      DeclaredType asInstanceRequest =
          (DeclaredType) State.viewAs(state.instanceRequestType, returnType, state);
      if (asInstanceRequest.getTypeArguments().isEmpty()) {
        state.poison(x, Messages.rawType());
      } else {
        TypeMirror instanceType = asInstanceRequest.getTypeArguments().get(0);
        state.maybeScanProxy((TypeElement) state.types.asElement(instanceType));
        TypeMirror requestReturn = asInstanceRequest.getTypeArguments().get(1);
        if (!state.isTransportableType(requestReturn)) {
          state.poison(x, Messages.untransportableType(requestReturn));
        }
      }
    } else if (!isSetter(x, state)) {
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.DeclaredType

        Collection validationBeanAnnotations = mca.getValidatableBeans();
       
        for ( Iterator ii = validationBeanAnnotations.iterator(); ii.hasNext();
        {
            AnnotationInstance validationBeanAnnotation = ( AnnotationInstance ) ii.next();
            DeclaredType beanType = CompilerUtils.getDeclaredType( validationBeanAnnotation, TYPE_ATTR, true );
            assert beanType != null;    // checker should enforce this
           
            Collection validationFieldAnnotations =
                    CompilerUtils.getAnnotationArray( validationBeanAnnotation, VALIDATABLE_PROPERTIES_ATTR, false );
           
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.DeclaredType

        }
       
        //
        // outputFormBean/outputFormBeanType
        //
        DeclaredType outputFormType = CompilerUtils.getDeclaredType( annotation, OUTPUT_FORM_BEAN_TYPE_ATTR, true );
        String outputFormMember = CompilerUtils.getString( annotation, OUTPUT_FORM_BEAN_ATTR, true );
        if ( outputFormMember != null )
        {
            FieldDeclaration field = CompilerUtils.getClassField( jclass, outputFormMember, null );
            assert outputFormType == null// checker should catch this
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.DeclaredType

     */
    protected Object onEndCheck( AnnotationInstance annotation, AnnotationInstance[] parentAnnotations,
                                 MemberDeclaration classMember, Map checkResults )
    {
        MethodDeclaration handlerMethod = ( MethodDeclaration ) checkResults.get( METHOD_ATTR );
        DeclaredType exceptionType = ( DeclaredType ) checkResults.get( TYPE_ATTR );
       
        //
        // If either of these are null, then there was another already-reported error (e.g., type was unresolved).
        //
        if ( handlerMethod == null || exceptionType == null )
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.DeclaredType

        Collection validationBeanAnnotations = mca.getValidatableBeans();
       
        for ( Iterator ii = validationBeanAnnotations.iterator(); ii.hasNext();
        {
            AnnotationInstance validationBeanAnnotation = ( AnnotationInstance ) ii.next();
            DeclaredType beanType = CompilerUtils.getDeclaredType( validationBeanAnnotation, TYPE_ATTR, true );
            assert beanType != null;    // checker should enforce this
           
            Collection validationFieldAnnotations =
                    CompilerUtils.getAnnotationArray( validationBeanAnnotation, VALIDATABLE_PROPERTIES_ATTR, false );
           
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.DeclaredType

        }
       
        //
        // outputFormBean/outputFormBeanType
        //
        DeclaredType outputFormType = CompilerUtils.getDeclaredType( annotation, OUTPUT_FORM_BEAN_TYPE_ATTR, true );
        String outputFormMember = CompilerUtils.getString( annotation, OUTPUT_FORM_BEAN_ATTR, true );
        if ( outputFormMember != null )
        {
            FieldDeclaration field = CompilerUtils.getClassField( jclass, outputFormMember, null );
            assert outputFormType == null// checker should catch this
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.DeclaredType

     */
    protected Object onEndCheck( AnnotationInstance annotation, AnnotationInstance[] parentAnnotations,
                                 MemberDeclaration classMember, Map checkResults )
    {
        MethodDeclaration handlerMethod = ( MethodDeclaration ) checkResults.get( METHOD_ATTR );
        DeclaredType exceptionType = ( DeclaredType ) checkResults.get( TYPE_ATTR );
       
        //
        // If either of these are null, then there was another already-reported error (e.g., type was unresolved).
        //
        if ( handlerMethod == null || exceptionType == null )
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.DeclaredType

        Collection validationBeanAnnotations = mca.getValidatableBeans();
       
        for ( Iterator ii = validationBeanAnnotations.iterator(); ii.hasNext();
        {
            AnnotationInstance validationBeanAnnotation = ( AnnotationInstance ) ii.next();
            DeclaredType beanType = CompilerUtils.getDeclaredType( validationBeanAnnotation, TYPE_ATTR, true );
            assert beanType != null;    // checker should enforce this
           
            Collection validationFieldAnnotations =
                    CompilerUtils.getAnnotationArray( validationBeanAnnotation, VALIDATABLE_PROPERTIES_ATTR, false );
           
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.