Package com.sun.mirror.type

Examples of com.sun.mirror.type.InterfaceType


  public static void generateSuperClassAdds(PrintWriter writer, InterfaceDeclaration d) {
    Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
    if ( super_interfaces.size() > 1 )
      throw new RuntimeException(d + " extends more than one other interface");
    if ( super_interfaces.size() == 1 ) {
      InterfaceType super_interface = super_interfaces.iterator().next();
      writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\"");
      writer.println(translateFieldName(d.getSimpleName()) + "\"))");
      writer.print("\t\t\t");
      generateAddExtension(writer, super_interface.getDeclaration());
    }
  }
View Full Code Here


    writer.print(translated_field_name + "\")");
    Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
    if ( super_interfaces.size() > 1 )
      throw new RuntimeException(d + " extends more than one other interface");
    if ( super_interfaces.size() == 1 ) {
      InterfaceType super_interface = super_interfaces.iterator().next();
      writer.println();
      writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\"");
      writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")");
    }
    Alias alias_annotation = d.getAnnotation(Alias.class);
    if ( alias_annotation != null ) {
      writer.println();
      writer.print("\t\t\t|| " + CACHED_EXTS_VAR_NAME + ".contains(\"");
View Full Code Here

  public static void generateSuperClassAdds(PrintWriter writer, InterfaceDeclaration d) {
    Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
    if ( super_interfaces.size() > 1 )
      throw new RuntimeException(d + " extends more than one other interface");
    if ( super_interfaces.size() == 1 ) {
      InterfaceType super_interface = super_interfaces.iterator().next();
      writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\"");
      writer.println(translateFieldName(d.getSimpleName()) + "\"))");
      writer.print("\t\t\t");
      generateAddExtension(writer, super_interface.getDeclaration());
    }
  }
View Full Code Here

    writer.print(translated_field_name + "\")");
    Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
    if ( super_interfaces.size() > 1 )
      throw new RuntimeException(d + " extends more than one other interface");
    if ( super_interfaces.size() == 1 ) {
      InterfaceType super_interface = super_interfaces.iterator().next();
      writer.println();
      writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\"");
      writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")");
    }
    Alias alias_annotation = d.getAnnotation(Alias.class);
    if ( alias_annotation != null ) {
      writer.println();
      writer.print("\t\t\t|| " + CACHED_EXTS_VAR_NAME + ".contains(\"");
View Full Code Here

  public static void generateSuperClassAdds(PrintWriter writer, InterfaceDeclaration d) {
    Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
    if ( super_interfaces.size() > 1 )
      throw new RuntimeException(d + " extends more than one other interface");
    if ( super_interfaces.size() == 1 ) {
      InterfaceType super_interface = super_interfaces.iterator().next();
      writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\"");
      writer.println(translateFieldName(d.getSimpleName()) + "\"))");
      writer.print("\t\t\t");
      generateAddExtension(writer, super_interface.getDeclaration());
    }
  }
View Full Code Here

    writer.print(translated_field_name + "\")");
    Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
    if ( super_interfaces.size() > 1 )
      throw new RuntimeException(d + " extends more than one other interface");
    if ( super_interfaces.size() == 1 ) {
      InterfaceType super_interface = super_interfaces.iterator().next();
      writer.println();
      writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\"");
      writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")");
    }
    Alias alias_annotation = d.getAnnotation(Alias.class);
    if ( alias_annotation != null ) {
      writer.println();
      writer.print("\t\t\t|| " + CACHED_EXTS_VAR_NAME + ".contains(\"");
View Full Code Here

    {
        //
        // Look for a super interface that is either a control interface or extension.
        // If found, return it.
        //
        InterfaceType superType = getSuperType();
        if (superType == null)
        {
            // At this point, we're processing the root of the interface heirarchy,
            // which is not permitted to be a ControlExtension (that would imply a
            // ControlExtension that wasn't actually extending a ControlInterface).
            if ( isExtension() )
            {
                _ap.printError( _intfDecl, "control.extension.badinterface");
            }

            return null;
        }

        InterfaceDeclaration superDecl = superType.getDeclaration();
        if ( superDecl != null )
        {
            if (superDecl.getAnnotation(ControlExtension.class) != null ||
                superDecl.getAnnotation(ControlInterface.class) != null)
            {
View Full Code Here

     * Returns any formal type parameters that should be bound for the bean's superclass,
     * based upon any type bindings that occur on the original interface.
     */
    public String getSuperTypeBinding()
    {
        InterfaceType superType = _controlIntf.getSuperType();
        if (superType != null)
        {
            String typeStr = superType.toString();
            int paramIndex = typeStr.indexOf('<');
            if (paramIndex > 0)
                return typeStr.substring(paramIndex);
        }
        return "";
View Full Code Here

    {
        //
        // Look for a super interface that is either a control interface or extension.
        // If found, return it.
        //
        InterfaceType superType = getSuperType();
        if (superType == null)
        {
            // At this point, we're processing the root of the interface heirarchy,
            // which is not permitted to be a ControlExtension (that would imply a
            // ControlExtension that wasn't actually extending a ControlInterface).
            if ( isExtension() )
            {
                _ap.printError( _intfDecl, "control.extension.badinterface");
            }

            return null;
        }

        InterfaceDeclaration superDecl = superType.getDeclaration();
        if ( superDecl != null )
        {
            if (superDecl.getAnnotation(ControlExtension.class) != null ||
                superDecl.getAnnotation(ControlInterface.class) != null)
            {
View Full Code Here

     * Returns any formal type parameters that should be bound for the bean's superclass,
     * based upon any type bindings that occur on the original interface.
     */
    public String getSuperTypeBinding()
    {
        InterfaceType superType = _controlIntf.getSuperType();
        if (superType != null)
        {
            String typeStr = superType.toString();
            int paramIndex = typeStr.indexOf('<');
            if (paramIndex > 0)
                return typeStr.substring(paramIndex);
        }
        return "";
View Full Code Here

TOP

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

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.