Examples of DeclaredType


Examples of com.sun.mirror.type.DeclaredType

        //
        // Read the name of the checker class from the @ControlInterface annotation,
        // dynamically load and run it.
        //

        DeclaredType checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checker");
        if ( checkerMirror == null )
        {
            // try the deprecated 'checkerClass' attribute
            checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checkerClass");
        }

        if ( checkerMirror != null && checkerMirror.getDeclaration() != null )
        {
            // TODO: optimize to not invoke default checker?
            String checkerName = checkerMirror.toString();

            try
            {
                ClassLoader loader = getExternalClassLoader();
View Full Code Here

Examples of com.sun.mirror.type.DeclaredType

    {
        //
        // Get an iterator to both the declared type arguments and the original type
        // declaration on the associated control interface
        //
        DeclaredType fieldType = (DeclaredType)_fieldDecl.getType();
        Iterator<TypeMirror> paramBoundIter = fieldType.getActualTypeArguments().iterator();

        TypeDeclaration intfDecl = (TypeDeclaration)_controlIntf.getTypeDeclaration();
        Iterator<TypeParameterDeclaration> paramDeclIter =
                                            intfDecl.getFormalTypeParameters().iterator();
View Full Code Here

Examples of com.sun.mirror.type.DeclaredType

                if ( ma.getAnnotationType().getDeclaration().getQualifiedName().
                        equals( "org.apache.beehive.controls.spi.svc.InterceptorAnnotation" ) )
                {
                    // found an interceptor-based annotation, add it!
                    AptAnnotationHelper ia = new AptAnnotationHelper( ma );
                    DeclaredType serviceType = (DeclaredType) ia.getObjectValue("service");
                    String intf = serviceType.toString();
                    ret.add( intf );

                    break;
                }
            }
View Full Code Here

Examples of com.sun.mirror.type.DeclaredType

        if ( references != null )
        {
            for ( AnnotationValue av : references )
            {
                DeclaredType crType = (DeclaredType)av.getValue();
                if ( crType instanceof InterfaceType )
                {
                    // Valid interface type decls must be annotated w/ @ControlInterface
                    // or @ControlExtension.
                    Declaration typeDecl = crType.getDeclaration();
                    if ( typeDecl.getAnnotation(ControlInterface.class) == null &&
                         typeDecl.getAnnotation(ControlExtension.class) == null )
                         printError( t, "control.reference.bad.interfacetype" );
                }
            }
View Full Code Here

Examples of com.sun.mirror.type.DeclaredType

                {
                    /*
                    found an interceptor-based annotation, add it!
                    */
                    AptAnnotationHelper ia = new AptAnnotationHelper( ma );
                    DeclaredType serviceType = (DeclaredType) ia.getObjectValue("service");
                    String intf = serviceType.toString();
                    ret.add( intf );

                    break;
                }
            }
View Full Code Here

Examples of com.sun.mirror.type.DeclaredType

        //
        // Read the name of the checker class from the @ControlInterface annotation,
        // dynamically load and run it.
        //

        DeclaredType checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checker");
        if ( checkerMirror == null )
        {
            // try the deprecated 'checkerClass' attribute
            checkerMirror = (DeclaredType)controlAnnot.getObjectValue("checkerClass");
        }

        if ( checkerMirror != null && checkerMirror.getDeclaration() != null )
        {
            // TODO: optimize to not invoke default checker?
            String checkerName = checkerMirror.toString();

            try
            {
                ClassLoader loader = getExternalClassLoader();
View Full Code Here

Examples of javax.lang.model.type.DeclaredType

        if (element.getKind() == ElementKind.METHOD) {
            return true;
        }
        if (element.getKind() == ElementKind.CLASS) {
            Types typeUtils = environment.getTypeUtils();
            DeclaredType type = typeUtils.getDeclaredType((TypeElement) element);
            return typeUtils.isSubtype(type, environment.getDeclaredType(FlowDescription.class));
        }
        return false;
    }
View Full Code Here

Examples of javax.lang.model.type.DeclaredType

     * @return 型のモデル
     * @throws IllegalArgumentException 引数に{@code null}が含まれる場合
     */
    public final Type t(TypeElement type) {
        Precondition.checkMustNotBeNull(type, "type"); //$NON-NLS-1$
        DeclaredType t = environment.getTypeUtils().getDeclaredType(type);
        return importer.resolve(new Jsr269(factory).convert(t));
    }
View Full Code Here

Examples of javax.lang.model.type.DeclaredType

        }
        List<? extends TypeMirror> typeArgs = ((DeclaredType) representation).getTypeArguments();
        if (typeArgs.size() != 1) {
            return null;
        }
        DeclaredType raw = (DeclaredType) environment.getErasure(representation);
        if (environment.getTypeUtils().isSameType(raw, environment.getDeclaredType(Class.class)) == false) {
            return null;
        }
        return getTypeVariableName(typeArgs.get(0));
    }
View Full Code Here

Examples of javax.lang.model.type.DeclaredType

        Types types = environment.getTypeUtils();
        if (types.isSameType(a, b)) {
            return true;
        }
        // EclipseJDTのバグでerasureは正しく計算されない模様
        DeclaredType at = (DeclaredType) a;
        DeclaredType bt = (DeclaredType) b;
        return at.asElement().equals(bt.asElement());
    }
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.