Examples of superInterfaceTypes()


Examples of org.eclipse.jdt.core.dom.EnumDeclaration.superInterfaceTypes()

                }

                // Enums don't have superclasses

                // detect the interfaces, if any
                for (Type superInterfaceType : (List<Type>)enumDeclaration.superInterfaceTypes()) {
                    enumMetadata.getInterfaceNames().add(getTypeName(superInterfaceType));
                }

                /*
                 * It would be nice to be able to reuse the convenience methods from AbstractTypeDeclaration,
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

      parser.setSource(icunit);
      CompilationUnit cunit = (CompilationUnit) parser.createAST(null);
      cunit.recordModifications();
      AST ast = cunit.getAST();
      TypeDeclaration typeDec = (TypeDeclaration) cunit.types().get(0);
      List list = typeDec.superInterfaceTypes();
      Name name = ast.newName(cName);
      Type interfaceType = ast.newSimpleType(name);
      list.add(interfaceType);
      TextEdit edits = cunit.rewrite(document, icunit.getJavaProject()
          .getOptions(true));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

        TypeDeclaration aRemoteService = (TypeDeclaration) astRoot.types().get(0);
        String remoteServiceAsyncName = aRemoteService.getName().getFullyQualifiedName() + "Async"; //$NON-NLS-1$
        aRemoteService.setName(astRoot.getAST().newSimpleName(remoteServiceAsyncName));

        // Remote all interfaces
        aRemoteService.superInterfaceTypes().clear();

        // Change methods, fields and inner classes
        List bodyDeclarations = aRemoteService.bodyDeclarations();
        List declarationsToDelete = new ArrayList();
        for (Iterator k = bodyDeclarations.iterator(); k.hasNext();) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

        TypeDeclaration aRemoteService = (TypeDeclaration) astRoot.types().get(0);
        String remoteServiceAsyncName = aRemoteService.getName().getFullyQualifiedName()+"Async"; //$NON-NLS-1$
        aRemoteService.setName(astRoot.getAST().newSimpleName(remoteServiceAsyncName));
       
        // Remote all interfaces
        aRemoteService.superInterfaceTypes().clear();
       
        // Change methods, fields and inner classes
        List bodyDeclarations = aRemoteService.bodyDeclarations();
        List declarationsToDelete = new ArrayList();
        for (Iterator k = bodyDeclarations.iterator(); k.hasNext();) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

    TypeDeclaration aRemoteService = (TypeDeclaration) astRoot.types().get(0);
    String remoteServiceAsyncName = aRemoteService.getName().getFullyQualifiedName() + "Async"; //$NON-NLS-1$
    aRemoteService.setName(astRoot.getAST().newSimpleName(remoteServiceAsyncName));

    // Remote all interfaces
    aRemoteService.superInterfaceTypes().clear();

    updateModifier(aRemoteService);

    // Change methods, fields and inner classes
    List bodyDeclarations = aRemoteService.bodyDeclarations();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

        TypeDeclaration aRemoteService = (TypeDeclaration) astRoot.types().get(0);
        String remoteServiceAsyncName = aRemoteService.getName().getFullyQualifiedName()+"Async"; //$NON-NLS-1$
        aRemoteService.setName(astRoot.getAST().newSimpleName(remoteServiceAsyncName));
       
        // Remote all interfaces
        aRemoteService.superInterfaceTypes().clear();
       
        // Change methods, fields and inner classes
        List bodyDeclarations = aRemoteService.bodyDeclarations();
        List declarationsToDelete = new ArrayList();
        for (Iterator k = bodyDeclarations.iterator(); k.hasNext();) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

        // Create the nested class.
        TypeDeclaration classDeclaration = ast.newTypeDeclaration();
        classDeclaration.setName(ast.newSimpleName(_getProxyName()));

        String rollbackType = getClassName(Rollbackable.class, state, root);
        classDeclaration.superInterfaceTypes().add(
                ast.newSimpleType(createName(ast, rollbackType)));

        // Add a commit method.
        MethodDeclaration commit = ast.newMethodDeclaration();
        commit.setName(ast.newSimpleName(_getCommitMethodName(false)));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

  @SuppressWarnings("unchecked")//$NON-NLS-1$
  public void removeInterface(String targetClass, String interfaceToRemove) {
    try {
      TypeDeclaration typeDeclaration = compilationUnitCache.getTypeDeclaration(targetClass);

      Iterator iter = typeDeclaration.superInterfaceTypes().iterator();
      while (iter.hasNext()) {
        Object obj = iter.next();
        if (obj instanceof SimpleType) {
          SimpleType type = (SimpleType) obj;
          String qualifiedName = type.resolveBinding().getQualifiedName();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

  public boolean classImplements(String targetClass, String targetInterface) {
    try {
      TypeDeclaration typeDeclaration = compilationUnitCache.getTypeDeclaration(targetClass);

      Iterator iter = typeDeclaration.superInterfaceTypes().iterator();
      while (iter.hasNext()) {
        Object obj = iter.next();
        if (obj instanceof SimpleType) {
          SimpleType type = (SimpleType) obj;
          String qualifiedName = type.resolveBinding().getQualifiedName();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TypeDeclaration.superInterfaceTypes()

      TypeDeclaration typeDeclaration = compilationUnitCache.getTypeDeclaration(targetClass);
      AST ast = cu.getAST();
      SimpleType interfaceType = ast.newSimpleType(createQualifiedName(ast, interfaceClass));

      typeDeclaration.superInterfaceTypes().add(interfaceType);
    } catch (Exception e) {
      warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.12"), interfaceClass, targetClass)); //$NON-NLS-1$
    }
  }
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.