Examples of modifiers()


Examples of org.aspectj.internal.lang.annotation.ajcITD.modifiers()

      Method[] baseMethods = clazz.getMethods();
      for(Method m : baseMethods) {
        if (m.isAnnotationPresent(ajcITD.class)) {
          ajcITD ann = m.getAnnotation(ajcITD.class);
          if (!m.getName().contains("ajc$interFieldInit")) continue;
          if (!Modifier.isPublic(ann.modifiers())) continue;
          String interFieldInitMethodName = m.getName();
          String interFieldGetDispatchMethodName =
            interFieldInitMethodName.replace("FieldInit","FieldGetDispatch");
          try {
            Method dispatch = m.getDeclaringClass().getDeclaredMethod(interFieldGetDispatchMethodName, m.getParameterTypes());
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.SimpleDelta.modifiers()

          && (this.hierarchy.hasSupertype(type.getElementName())
            || type.equals(this.hierarchy.focusType))) {
        if (typeDelta == null) {
          typeDelta = new SimpleDelta();
        }
        typeDelta.modifiers();
      }
      if (typeDelta != null) {
        this.changes.put(type, typeDelta);
      }
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AbstractTypeDeclaration.modifiers()

        } else {
            TypeDeclaration type = m_ast.newTypeDeclaration();
            type.setInterface(false);
            abstype = type;
        }
        abstype.modifiers().add(m_ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
        abstype.setName(m_ast.newSimpleName(cname));
        return abstype;
    }
   
    /**
 
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AbstractTypeDeclaration.modifiers()

     * @param isenum Java 5 enum class flag
     * @return builder
     */
    public ClassBuilder newInnerClass(String cname, ClassBuilder outer, boolean isenum) {
        AbstractTypeDeclaration decl = createClass(cname, isenum);
        decl.modifiers().add(m_ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
//        type.superInterfaceTypes().add(createType("java.io.Serializable"));
        return new ClassBuilder(decl, outer);
    }

    /**
 
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AbstractTypeDeclaration.modifiers()

                String typeContent = constructTypeStub(parentCU, imports, lineDelimiter);

                int index = cuContent.lastIndexOf(simpleTypeStub);
                if (index == -1) {
                    AbstractTypeDeclaration typeNode = (AbstractTypeDeclaration) astRoot.types().get(0);
                    int start = ((ASTNode) typeNode.modifiers().get(0)).getStartPosition();
                    int end = typeNode.getStartPosition() + typeNode.getLength();
                    buffer.replace(start, end - start, typeContent);
                } else {
                    buffer.replace(index, simpleTypeStub.length(), typeContent);
                }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AbstractTypeDeclaration.modifiers()

                String typeContent = constructTypeStub(parentCU, imports, lineDelimiter);

                int index = cuContent.lastIndexOf(simpleTypeStub);
                if (index == -1) {
                    AbstractTypeDeclaration typeNode = (AbstractTypeDeclaration) astRoot.types().get(0);
                    int start = ((ASTNode) typeNode.modifiers().get(0)).getStartPosition();
                    int end = typeNode.getStartPosition() + typeNode.getLength();
                    buffer.replace(start, end - start, typeContent);
                } else {
                    buffer.replace(index, simpleTypeStub.length(), typeContent);
                }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.BodyDeclaration.modifiers()

        return;
      }

      addImportToCompilationUnit(annotation.getCanonicalName(), cu);
      Annotation modifier = createModifier(cu.getAST(), annotation, properties, cu);
      typeDeclaration.modifiers().add(0, modifier);
    } catch (Exception e) {
      warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.2"), annotation.getCanonicalName(), targetClass)); //$NON-NLS-1$
    }
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.BodyDeclaration.modifiers()

  }

  public void removeAbstractModifierFromClass(String targetClass) {
    try {
      BodyDeclaration typeDeclaration = compilationUnitCache.getTypeDeclaration(targetClass);
      removeAbstractModifier(typeDeclaration.modifiers());
    } catch (Exception e) {
      warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.6"), targetClass)); //$NON-NLS-1$
    }
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.EnumConstantDeclaration.modifiers()

      Collection annotationCollection) {
    final EnumConstantDeclaration enumConstDecl = ast
        .newEnumConstantDeclaration();
    enumConstDecl.setJavadoc(docComment);
    enumConstDecl.setName(constantName);
    enumConstDecl.modifiers().addAll(annotationCollection);
    return enumConstDecl;
  }

  private static EnumDeclaration createNewEnumDeclaration(AST ast,
      SimpleName name, Collection enumConstantDeclarationCollection,
View Full Code Here

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