Examples of addMethod()


Examples of org.mybatis.generator.api.dom.java.InnerClass.addMethod()

    method.setName(innerClass.getType().getShortName());
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "record")); //$NON-NLS-1$
    method.addParameter(new Parameter(new FullyQualifiedJavaType(introspectedTable.getExampleType()), "example")); //$NON-NLS-1$
    method.addBodyLine("super(example);"); //$NON-NLS-1$
    method.addBodyLine("this.record = record;"); //$NON-NLS-1$
    innerClass.addMethod(method);

    Field field = new Field();
    field.setVisibility(JavaVisibility.PRIVATE);
    field.setType(FullyQualifiedJavaType.getObjectInstance());
    field.setName("record"); //$NON-NLS-1$
View Full Code Here

Examples of org.mybatis.generator.api.dom.java.TopLevelClass.addMethod()

      method.addBodyLine("this.orderByClause = example.orderByClause;"); //$NON-NLS-1$
      method.addBodyLine("this.condition = example.condition;"); //$NON-NLS-1$
      method.addBodyLine("this.distinct = example.distinct;"); //$NON-NLS-1$
      method.addBodyLine("this.limit = example.limit;"); //$NON-NLS-1$
      method.addBodyLine("this.start = example.start;"); //$NON-NLS-1$
      topLevelClass.addMethod(method);
    }

    Field field = new Field();
    field.setVisibility(JavaVisibility.PRIVATE);
    field.setType(types);
View Full Code Here

Examples of org.netbeans.modules.php.api.editor.PhpClass.addMethod()

     * Test of getViewName method, of class YiiUtils.
     */
    @Test
    public void testGetViewName() {
        PhpClass phpClass = new PhpClass("SiteController", "SiteController");
        phpClass.addMethod("actionIndex", "actionIndex");
        for (PhpClass.Method method : phpClass.getMethods()) {
            assertEquals("index", YiiUtils.getViewName(method));
        }
        phpClass = new PhpClass("SiteController", "SiteController");
        phpClass.addMethod("actions", "actions");
View Full Code Here

Examples of org.openqa.jetty.http.SecurityConstraint.addMethod()

                String name = collection.getString("web-resource-name", false, true);
                SecurityConstraint sc = (SecurityConstraint) scBase.clone();
                sc.setName(name);
                Iterator iter2 = collection.iterator("http-method");
                while (iter2.hasNext())
                    sc.addMethod(((XmlParser.Node) iter2.next()).toString(false, true));
                iter2 = collection.iterator("url-pattern");
                while (iter2.hasNext())
                {
                    String url = ((XmlParser.Node) iter2.next()).toString(false, true);
                    getWebApplicationContext().addSecurityConstraint(url, sc);
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaClassRep.addMethod()

                    // Add static final fields for each data constructor
                    createFields_Enumeration(typeConstructorInfo.typeConstructor, javaClassRep, typeConstructorClassName);

                    // Add a function which takes an int value for the
                    // ordinal and returns the corresponding enum instance.
                    javaClassRep.addMethod(createMethod_fromOrdinal (typeConstructorClassName));
                }
               
                if (typeConstructorInfo.commonFieldNames.size() > 0) {
                    javaClassRep.addConstructor(createConstructor(typeConstructorInfo, typeConstructorClassName));
                } else {
View Full Code Here

Examples of org.sonatype.nexus.rest.model.PrivilegeResource.addMethod()

    priv.setType(type);
    priv.setRepositoryTargetId(repoTargetId);
    priv.setRepositoryId(repositoryId);
    priv.setRepositoryGroupId(repositoryGroupId);
    for (String method : methods) {
      priv.addMethod(method);
    }

    List<PrivilegeStatusResource> stat = privUtil.createPrivileges(priv);
    addPrivilege(userName, stat.get(0).getId());
  }
View Full Code Here

Examples of org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetailsBuilder.addMethod()

                    final CommentStructure commentStructure = new CommentStructure();
                    JavaParserCommentMetadataBuilder.updateCommentsToRoo(
                            commentStructure, member);
                    method.setCommentStructure(commentStructure);

                    cidBuilder.addMethod(method);
                }
                if (member instanceof ConstructorDeclaration) {
                    final ConstructorDeclaration castMember = (ConstructorDeclaration) member;
                    final ConstructorMetadata constructor = JavaParserConstructorMetadataBuilder
                            .getInstance(declaredByMetadataId, castMember,
View Full Code Here

Examples of ptolemy.copernicus.kernel.EntitySootClass.addMethod()

        }
        // Populate the fire method.
        {
            SootMethod fireMethod = new SootMethod("fire",
                    Collections.EMPTY_LIST, VoidType.v(), Modifier.PUBLIC);
            entityInstanceClass.addMethod(fireMethod);

            JimpleBody body = Jimple.v().newBody(fireMethod);
            fireMethod.setActiveBody(body);
            body.insertIdentityStmts();
View Full Code Here

Examples of soot.SootClass.addMethod()

                // modify invocations of that constructor.
                modifiedConstructorClassList.add(theClass);

                // Dance so that indexes in the Scene are properly updated.
                theClass.removeMethod(method);
                theClass.addMethod(method);

                System.out.println("method = " + method);
                JimpleBody body = (JimpleBody) method.retrieveActiveBody();

                for (Iterator units = body.getUnits().snapshotIterator(); units
View Full Code Here

Examples of soot.jimple.toolkits.thread.AbstractRuntimeThread.addMethod()

      while(runMethodsIt.hasNext())
      {
        SootMethod method = (SootMethod) runMethodsIt.next();
        if(!thread.containsMethod(method))
        {
          thread.addMethod(method);
          thread.addRunMethod(method);
        }
      }
     
      // Get a list containing all methods in the call graph(s) rooted at the possible run methods for this thread start statement
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.