Package com.sun.mirror.type

Examples of com.sun.mirror.type.TypeMirror


        if (!methodName.startsWith("set")
            || !TypeUtil.isVoid(m.getReturnType())
            || m.getParameters().size() != 1) {
            return false;
        }
        TypeMirror parameterTypeMirror =
            m.getParameters().iterator().next().getType();
        if (!parameterTypeMirror.equals(fieldDeclaration.getType())) {
            return false;
        }
        return methodName.equals(FieldDeclarationUtil
            .getWriteMethodName(fieldDeclaration));
    }
View Full Code Here


    protected String getClassNameOfClassParameter(
            AnnotationTypeElementDeclaration declaration, AnnotationValue value){
        String className = TypeUtil.toClassType(
            (TypeMirror)declaration.getDefaultValue().getValue()
            ).getDeclaration().getQualifiedName();
        TypeMirror mirror = (TypeMirror)value.getValue();
        if(mirror == null){
            return className;
        }
        if (value instanceof InterfaceType) {
            throw new ValidationException(
View Full Code Here

        if (!methodName.startsWith("set")
            || !TypeUtil.isVoid(m.getReturnType())
            || m.getParameters().size() != 1) {
            return false;
        }
        TypeMirror parameterTypeMirror =
            m.getParameters().iterator().next().getType();
        if (!parameterTypeMirror.equals(fieldDeclaration.getType())) {
            return false;
        }
        return methodName.equals(FieldDeclarationUtil
            .getWriteMethodName(fieldDeclaration));
    }
View Full Code Here

    protected String getClassNameOfClassParameter(
            AnnotationTypeElementDeclaration declaration, AnnotationValue value){
        String className = TypeUtil.toClassType(
            (TypeMirror)declaration.getDefaultValue().getValue()
            ).getDeclaration().getQualifiedName();
        TypeMirror mirror = (TypeMirror)value.getValue();
        if(mirror == null){
            return className;
        }
        if (value instanceof InterfaceType) {
            throw new ValidationException(
View Full Code Here

        if (!methodName.startsWith("set")
            || !TypeUtil.isVoid(m.getReturnType())
            || m.getParameters().size() != 1) {
            return false;
        }
        TypeMirror parameterTypeMirror =
            m.getParameters().iterator().next().getType();
        if (!parameterTypeMirror.equals(fieldDeclaration.getType())) {
            return false;
        }
        return methodName.equals(FieldDeclarationUtil
            .getWriteMethodName(fieldDeclaration));
    }
View Full Code Here

    protected String getClassNameOfClassParameter(
            AnnotationTypeElementDeclaration declaration, AnnotationValue value){
        String className = TypeUtil.toClassType(
            (TypeMirror)declaration.getDefaultValue().getValue()
            ).getDeclaration().getQualifiedName();
        TypeMirror mirror = (TypeMirror)value.getValue();
        if(mirror == null){
            return className;
        }
        if (value instanceof InterfaceType) {
            throw new ValidationException(
View Full Code Here

        if (!methodName.startsWith("set")
            || !TypeUtil.isVoid(m.getReturnType())
            || m.getParameters().size() != 1) {
            return false;
        }
        TypeMirror parameterTypeMirror =
            m.getParameters().iterator().next().getType();
        if (!parameterTypeMirror.equals(fieldDeclaration.getType())) {
            return false;
        }
        return methodName.equals(FieldDeclarationUtil
            .getWriteMethodName(fieldDeclaration));
    }
View Full Code Here

            }

            //
            // Locate the EventSet based upon the eventSet element value
            //
            TypeMirror tm = (TypeMirror)( handlerAnnot.getObjectValue("eventSet") );
            if ( tm == null )
                continue;
            String setName = tm.toString();

            AptControlInterface controlIntf = eventField.getControlInterface();
            AptEventSet eventSet = controlIntf.getEventSet(setName);
            if (eventSet == null)
            {
View Full Code Here

                int arrayDepth = arrayDepth((ArrayType) type, 0, typeOfArray);
                StringBuffer className = new StringBuffer();
                for (int i = 0; i < arrayDepth; i++) {
                    className.append("[");
                }
                TypeMirror mirrorTypeOfArray = (TypeMirror) typeOfArray[0];
                if (mirrorTypeOfArray instanceof PrimitiveType) {
                    // e.g.   an array of int will be "[I".
                    className.append(getTypeSignatureOfPrimitiveType(((PrimitiveType) mirrorTypeOfArray).getKind()));
                }
                else {
View Full Code Here

     * Initializes a ControlInterface associated with this context field.  Because
     * contextual services can expose both APIs and events, they are similar to controls.
     */
    protected AptControlInterface initControlInterface()
    {
        TypeMirror fieldType = _fieldDecl.getType();       
        if (! (fieldType instanceof InterfaceType))
        {
            _ap.printError( _fieldDecl, "context.field.badinterface" );
            return null;
        }
View Full Code Here

TOP

Related Classes of com.sun.mirror.type.TypeMirror

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.