Examples of InterfaceDeclaration


Examples of com.sun.mirror.declaration.InterfaceDeclaration

        //
        ArrayList<InterfaceDeclaration> intfList = new ArrayList<InterfaceDeclaration>();
        intfList.add(_eventSet);
        for (int i = 0; i < intfList.size(); i++)
        {
            InterfaceDeclaration intfDecl = intfList.get(i);

            //
            // Don't add events that are derived from a super event set.
            //
            if (_superEventSet != null &&
                _superEventSet.getClassName().equals(intfDecl.getQualifiedName()))
                continue;

            // Add all declared methods, but ignore the mystery <clinit> methods
            for (MethodDeclaration methodDecl : intfDecl.getMethods())
                if (!methodDecl.toString().equals("<clinit>()"))
                    events.add(new AptEvent(this, methodDecl, _ap));

            //
            // Add all superinterfaces of the target interface to the list
            //
            for (InterfaceType superType: intfDecl.getSuperinterfaces())
            {
                InterfaceDeclaration superDecl = superType.getDeclaration();
                if (superDecl != null && !intfList.contains(superDecl))
                    intfList.add(superDecl);
            }
        }
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

      String baseName = extensionTag.baseClassName();
      description.append("<p><b>Extended tag: </b>");
      description.append(baseName);
      description.append("</p>");

      InterfaceDeclaration declaration = getInterfaceDeclaration(baseName + "Declaration");
      if (declaration != null) {
        UIComponentTag baseComponentTag = declaration.getAnnotation(UIComponentTag.class);
        if (baseComponentTag != null) {
          description.append(createDescription(baseComponentTag));
        }
      }
    }
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

            try
            {
                Set<TypeMirror> controlTypes = clientsMap.get( clientType );
                for ( TypeMirror controlType : controlTypes )
                {
                    InterfaceDeclaration controlIntfOrExt = getControlInterfaceOrExtension(controlType);
                    InterfaceDeclaration controlIntf = getMostDerivedControlInterface( controlIntfOrExt );

                    assert controlIntf != null : "Can't find most derived control intf for=" + controlIntfOrExt;

                    ControlInterface annot = controlIntf.getAnnotation(ControlInterface.class);
                    String defBinding = annot.defaultBinding();

                    defBinding = ControlBeanContext.resolveDefaultBinding( defBinding, controlIntf.getQualifiedName() );

                    mf.addControlType( controlIntfOrExt.getQualifiedName(), defBinding );
                }

                mf.emit( f, clientPkg, clientManifestName, null );
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

         // Since our generate() does some detailed grovelling of control types, make sure that
         // will not result in an error by doing that grovelling now.  Control types may be
         // malformed if the source for those types has errors (yet the apt type may still exist!).
         try
         {
             InterfaceDeclaration controlIntfOrExt = getControlInterfaceOrExtension(fieldType);
             InterfaceDeclaration controlIntf = getMostDerivedControlInterface( controlIntfOrExt );

             if ( controlIntf != null )
             {
                 enforceVersionRequired( f, controlIntf );
             }
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

                // Compute the bean type name, and the associated interface name by stripping
                // the "Bean" suffix
                //
                String className = classType.toString();
                AnnotationProcessorEnvironment ape = getAnnotationProcessorEnvironment();
                InterfaceDeclaration id = null;
                String intfName = null;
                if (className.length() > 4) {
                    intfName = className.substring(0, className.length() - 4);
                    id = (InterfaceDeclaration)ape.getTypeDeclaration(intfName);
                }
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

     */
    private InterfaceDeclaration getMostDerivedControlInterface( InterfaceDeclaration controlIntfOrExt )
    {
        Queue<InterfaceDeclaration> q = new LinkedList<InterfaceDeclaration>();

        InterfaceDeclaration id = controlIntfOrExt;
        while ( id != null )
        {
            if ( id.getAnnotation(ControlInterface.class) != null )
                break;

            Collection<InterfaceType> supers = id.getSuperinterfaces();
            for ( InterfaceType s : supers )
                q.offer( s.getDeclaration() );

            id = q.poll();
        }
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

        // Compute a hash set containing the qualified names of all super interfaces
        // for this EventSet
        HashSet<String> extendNames = new HashSet<String>();
        for (InterfaceType superType: _eventSet.getSuperinterfaces())
        {
            InterfaceDeclaration superDecl = superType.getDeclaration();
            if (superDecl != null)
                extendNames.add(superDecl.getQualifiedName());
        }

        // Starting with the parent of the ControlInterface declaring this EventSet, look
        // for a parent interface that declares ones of these super interfaces as an event
        // set
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

        //
        ArrayList<InterfaceDeclaration> intfList = new ArrayList<InterfaceDeclaration>();
        intfList.add(_eventSet);
        for (int i = 0; i < intfList.size(); i++)
        {
            InterfaceDeclaration intfDecl = intfList.get(i);

            //
            // Don't add events that are derived from a super event set.
            //
            /* todo: why does this happen?  in this case, the events from super @EventSet interfaces
                     won't be added to the event adapter which results in an incomplete
                     implementation of the event set interface.
            /*
            if (_superEventSet != null && _superEventSet.getClassName().equals(intfDecl.getQualifiedName()))
                continue;
            */

            // Add all declared methods, but ignore the mystery <clinit> methods
            for (MethodDeclaration methodDecl : intfDecl.getMethods())
                if (!methodDecl.toString().equals("<clinit>()"))
                    events.add(new AptEvent(this, methodDecl, _ap));

            //
            // Add all superinterfaces of the target interface to the list
            //
            for (InterfaceType superType: intfDecl.getSuperinterfaces())
            {
                InterfaceDeclaration superDecl = superType.getDeclaration();
                if (superDecl != null && !intfList.contains(superDecl))
                    intfList.add(superDecl);
            }
        }

View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

            }

            return null;
        }

        InterfaceDeclaration superDecl = superType.getDeclaration();
        if ( superDecl != null )
        {
            if (superDecl.getAnnotation(ControlExtension.class) != null ||
                superDecl.getAnnotation(ControlInterface.class) != null)
            {
                _superDecl = superDecl;
                AptControlInterface superIntf = new AptControlInterface(_superDecl, _ap);

                if (!isExtension() && superIntf.isExtension())
View Full Code Here

Examples of com.sun.mirror.declaration.InterfaceDeclaration

        Vector<InterfaceDeclaration> checkIntfs = new Vector<InterfaceDeclaration>();
        checkIntfs.add(_intfDecl);

        for (int i = 0; i < checkIntfs.size(); i++)
        {
            InterfaceDeclaration intfDecl = checkIntfs.elementAt(i);
            if (intfDecl.equals(_superDecl))
                continue;

            if ( intfDecl.getMethods() == null )
                continue;

            // Add all declared methods, but ignore the mystery <clinit> methods
            for (MethodDeclaration methodDecl : intfDecl.getMethods())
                if (!methodDecl.toString().equals("<clinit>()"))
                    operList.add(new AptOperation(this, methodDecl, _ap));

            if ( intfDecl.getSuperinterfaces() == null )
                continue;

            for (InterfaceType superType : intfDecl.getSuperinterfaces())
            {
                InterfaceDeclaration superDecl = superType.getDeclaration();
                if (superDecl != null && !checkIntfs.contains(superDecl))
                    checkIntfs.add(superDecl);
            }
        }
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.