Package org.eclipse.jdt.core.dom

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


  }

  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

   private void convertTo(final AnnotationType type)
   {
      BodyDeclaration node = (BodyDeclaration) annotation.getParent();
      String value = this.getLiteralValue();

      for (Object o : node.modifiers())
      {
         if (o.equals(annotation))
         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
View Full Code Here

      for (Object o : node.modifiers())
      {
         if (o.equals(annotation))
         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
            na.setName(getName());
            annotation = (org.eclipse.jdt.core.dom.Annotation) na.getInternal();
            node.modifiers().add(annotation);
            break;
View Full Code Here

         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
            na.setName(getName());
            annotation = (org.eclipse.jdt.core.dom.Annotation) na.getInternal();
            node.modifiers().add(annotation);
            break;
         }
      }

      if (!AnnotationType.MARKER.equals(type) && (value != null))
View Full Code Here

   private void convertTo(final AnnotationType type)
   {
      BodyDeclaration node = (BodyDeclaration) annotation.getParent();
      String value = this.getLiteralValue();

      for (Object o : node.modifiers())
      {
         if (o.equals(annotation))
         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
View Full Code Here

      for (Object o : node.modifiers())
      {
         if (o.equals(annotation))
         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
            na.setName(getName());
            annotation = (org.eclipse.jdt.core.dom.Annotation) na.getInternal();
            node.modifiers().add(annotation);
            break;
View Full Code Here

         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
            na.setName(getName());
            annotation = (org.eclipse.jdt.core.dom.Annotation) na.getInternal();
            node.modifiers().add(annotation);
            break;
         }
      }

      if (!AnnotationType.MARKER.equals(type) && (value != null))
View Full Code Here

   private void convertTo(final AnnotationType type)
   {
      BodyDeclaration node = (BodyDeclaration) annotation.getParent();
      String value = this.getLiteralValue();

      for (Object o : node.modifiers())
      {
         if (o.equals(annotation))
         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
View Full Code Here

      for (Object o : node.modifiers())
      {
         if (o.equals(annotation))
         {
            node.modifiers().remove(annotation);
            Annotation<O> na = new AnnotationImpl<O, T>(parent, type);
            na.setName(getName());
            annotation = (org.eclipse.jdt.core.dom.Annotation) na.getInternal();
            node.modifiers().add(annotation);
            break;
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.