Examples of modifiers()


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

        body.statements().add(returnStatement);
        getCheckpoint.setBody(body);

        getCheckpoint.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
        getCheckpoint.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
        classDeclaration.bodyDeclarations().add(getCheckpoint);

        // Add a set checkpoint method.
        MethodDeclaration setCheckpoint = ast.newMethodDeclaration();
View Full Code Here

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

        body = ast.newBlock();
        body.statements().add(ast.newExpressionStatement(invocation));
        body.statements().add(returnStatement);
        setCheckpoint.setBody(body);

        setCheckpoint.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
        setCheckpoint.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
        classDeclaration.bodyDeclarations().add(setCheckpoint);
View Full Code Here

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

        body.statements().add(returnStatement);
        setCheckpoint.setBody(body);

        setCheckpoint.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
        setCheckpoint.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
        classDeclaration.bodyDeclarations().add(setCheckpoint);

        classDeclaration.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
View Full Code Here

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

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

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

    try {
      String code = methodBody;

      TypeDeclaration typeDeclaration = compilationUnitCache.getTypeDeclaration(targetClass);
      MethodDeclaration methodDeclaration = getMethodDeclaration(typeDeclaration, methodName, signature);
      removeAbstractModifier(methodDeclaration.modifiers());

      List parameters = methodDeclaration.parameters();
      for (int i = 0; i < parameters.size(); i++) {
        SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(i);
        code = code.replaceAll("\\$\\{" + Integer.toString(i) + "\\}", parameter.resolveBinding().getName()); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

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

            String sername = LIST_SERIALIZE_PREFIX + propname;
            MethodBuilder sermeth = builder.addMethod(sername, "java.lang.String");
            sermeth.addParameter("values", (Type)builder.clone(fieldtype));
            if (passctx) {
                SingleVariableDeclaration decl = sermeth.addParameter("ictx", "org.jibx.runtime.IMarshallingContext");
                decl.modifiers().add(decl.getAST().newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
                sermeth.addThrows("org.jibx.runtime.JiBXException");
            }
            sermeth.setPublicStatic();
            sermeth.addSourceComment("Serializer for " + descript + ' ' + term + '.');
            sermeth.addSourceComment("");
View Full Code Here

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

            MethodBuilder desermeth = builder.addMethod(desername, (Type)builder.clone(fieldtype));
            desermeth.addParameter("text", "java.lang.String");
            if (passctx) {
                SingleVariableDeclaration decl = desermeth.addParameter("ictx",
                    "org.jibx.runtime.IUnmarshallingContext");
                decl.modifiers().add(decl.getAST().newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
            }
            desermeth.setPublicStatic();
            desermeth.addSourceComment("Deserializer for " + descript + ' ' + term + '.');
            desermeth.addSourceComment("");
            desermeth.addSourceComment("@param", " text");
View Full Code Here

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

                + methodDec.getName());
            tag.fragments().add(text);
            comment.tags().add(tag);
            type.setJavadoc(comment);
            type.setInterface(false);
            type.modifiers()
                .add(ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
            type.setName(ast.newSimpleName(className));
            type.bodyDeclarations().add(
                BodyDeclaration.copySubtree(type.getAST(),
                    methodDec));
View Full Code Here

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

    /*
     * build the new class using AST
     */
    TypeDeclaration newType = ast.newTypeDeclaration();
    newType.setInterface(node.isInterface());
    newType.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
    newType.setName(ast.newSimpleName(node.getName().getIdentifier()));
    newType.setSuperclassType(ast.newSimpleType(ast.newSimpleName(superTypeName)));
    /*
     * create the get and set methods only
     */
 
View Full Code Here

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

                ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
        setCheckpoint.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
        classDeclaration.bodyDeclarations().add(setCheckpoint);

        classDeclaration.modifiers().add(
                ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
        return classDeclaration;
    }

    /** Create a field that stores all the records as an array.
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.