Examples of addImport()


Examples of org.apache.felix.sigil.common.model.osgi.IBundleModelElement.addImport()

        // imports
        for (IPackageImport import1 : bundle.getImports())
        {
            IPackageImport clone = (IPackageImport) import1.clone();
            clone.setParent(null);
            info.addImport(clone);
        }

        // requires
        for (IRequiredBundle require : bundle.getRequires())
        {
View Full Code Here

Examples of org.apache.jasper.compiler.Node.PageDirective.addImport()

        doTestPageDirectiveImport("java .\nutil.List,java.util.ArrayList,java.util.Set");
    }

    private void doTestPageDirectiveImport(String importDirective) {
        PageDirective pd = new PageDirective(null, null, null);
        pd.addImport(importDirective);
        List<String> imports = pd.getImports();

        Assert.assertEquals(3, imports.size());
    }
}
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.generate.ComponentInfo.addImport()

            found = true;
          }
        }
        if (!found) {
          componentInfo.setInvokeOnComponent(true);
          componentInfo.addImport("javax.faces.context.FacesContext");
          componentInfo.addImport("javax.faces.FacesException");
          componentInfo.addImport("javax.faces.component.ContextCallback");
          componentInfo.addImport("org.apache.myfaces.tobago.compat.FacesUtils");
          componentInfo.addInterface("org.apache.myfaces.tobago.compat.InvokeOnComponent");
        }
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.generate.TagInfo.addImport()

    TagInfo tagInfo = new TagInfo(declaration.getQualifiedName().toString(), className);
    tagInfo.setSuperClass(declaration.getQualifiedName().toString());
    StringTemplate stringTemplate = tagAbstractStringTemplateGroup.getInstanceOf("tag");
    stringTemplate.setAttribute("tagInfo", tagInfo);
    tagInfo.getProperties().addAll(properties);
    tagInfo.addImport("org.slf4j.Logger");
    tagInfo.addImport("org.slf4j.LoggerFactory");
    writeFile(tagInfo, stringTemplate);
  }

  private void createTagOrComponent(TypeElement declaration) throws IOException, ClassNotFoundException {
View Full Code Here

Examples of org.apache.ws.jaxme.js.JavaSource.addImport()

     * @param pQName Fully qualified class name of the dispatcher class.
     */
    public JavaSource getDispatcher(JavaQName pQName) {
      JavaSource js = getFactory().newJavaSource(pQName, JavaSource.PUBLIC);
        if (isDispatcherImplementsXmlRpcHandler()) {
          js.addImport(JavaQNameImpl.getInstance("org.apache.xmlrpc.XmlRpcHandler", true));
        }
      JavaComment comment = js.newComment();
        comment.addLine("The dispatcher is being used by the XmlRpcServer.");
        comment.addLine("It delegates incoming XML-RPC calls to the classes");
        comment.addLine("and methods, for which client classes have been");
View Full Code Here

Examples of org.apache.ws.jaxme.xs.XSParser.addImport()

          Element element = soapDataTypes.getDocumentElement();
          String namespace = element.getAttributeNS(null, "targetNamespace");
          if (namespace == null  ||  namespace.length() == 0) {
            throw new IllegalStateException("Namespace is not set");
          }
          parser.addImport(namespace, soapDataTypes);
          xsContentHandler = new XSParser().getXSContentHandler();
          if (locator != null) {
            xsContentHandler.setDocumentLocator(locator);
          }
          xsContentHandler.startDocument();
View Full Code Here

Examples of org.apache.ws.jaxme.xs.impl.XSLogicalParser.addImport()

    XSLogicalParser logicalParser = getContext().getXSObjectFactory().newXSLogicalParser();
    logicalParser.setValidating(isValidating());
    for (int i = 0;  i < addedImports.size();  i++) {
      XSLogicalParser.AddedImport addedImport = (XSLogicalParser.AddedImport) addedImports.get(i);
      if (addedImport.getNode() == null) {
        logicalParser.addImport(addedImport.getNamespace(), addedImport.getSchemaLocation());
      } else {
        logicalParser.addImport(addedImport.getNamespace(), addedImport.getSchemaLocation(), addedImport.getNode());
      }
    }
    return logicalParser;
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer.addImport()

      computer.setFilterImplicitImports(this.filterImplicitImports);
     
      if (this.addedImports != null) {
        for (int i= 0; i < this.addedImports.size(); i++) {
          String curr= (String) this.addedImports.get(i);
          computer.addImport(curr.substring(1), STATIC_PREFIX == curr.charAt(0));
        }
      }
     
      if (this.removedImports != null) {
        for (int i= 0; i < this.removedImports.size(); i++) {
View Full Code Here

Examples of org.byteliberi.easydriver.generator.model.ClassModel.addImport()

           
      Logger.getLogger(ObjectModelGeneration.class.getName()).info("Working on: " + tableName);

      final ClassModel classModel = new ClassModel(Visibility.PUBLIC,  className);
      classModel.setPackageName(this.packageName);       
      classModel.addImport("java.sql.ResultSet");
      classModel.addImport("java.sql.SQLException");
      classModel.addImport("org.byteliberi.easydriver.ObjectFactory");
      classModel.setImplementList(MessageFormat.format("ObjectFactory<{0}>", objectModelName));
     
      classModel.addMethod(new MapRS(objectModelName, structureName, findFieldInit(tableInfo)));
View Full Code Here

Examples of org.codehaus.groovy.ast.ModuleNode.addImport()

    public void call(final SourceUnit source, final GeneratorContext context, final ClassNode classNode) throws CompilationFailedException {
        final ModuleNode ast = source.getAST();
        for (Import anImport : imports) {
            switch (anImport.type) {
                case regular:
                    ast.addImport(anImport.alias, anImport.classNode);
                    break;
                case staticImport:
                    ast.addStaticImport(anImport.classNode, anImport.field, anImport.alias);
                    break;
                case staticStar:
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.