Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 60CED9C5B for ; Sat, 4 Feb 2012 07:08:55 +0000 (UTC) Received: (qmail 6155 invoked by uid 500); 4 Feb 2012 07:08:53 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 5689 invoked by uid 500); 4 Feb 2012 07:08:40 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 5681 invoked by uid 99); 4 Feb 2012 07:08:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 07:08:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mansour.alakeel@gmail.com designates 209.85.215.45 as permitted sender) Received: from [209.85.215.45] (HELO mail-lpp01m010-f45.google.com) (209.85.215.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 07:08:25 +0000 Received: by lahi5 with SMTP id i5so2501979lah.4 for ; Fri, 03 Feb 2012 23:08:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=yZPgnIUIEzlQ2Tsb3iIeD7RzyW6t1wMPWsvZL1rWMFc=; b=DREGq3KqGbrXzuZOUf0s8l15FTUhGMhUa+DdvvhPjYOP65qCA83ZCUdFe3id0Rv3Jx yOJozhi4nyErpV0vR59eO8/996G7QMMQOOC1uCYw/Hd5WidyHAHfGlwC8r2X/goBGnbv 8vGGfN0gfKF/XhDNhQAL4TSuO42FjjgGYKse8= MIME-Version: 1.0 Received: by 10.152.114.169 with SMTP id jh9mr5221497lab.20.1328339285224; Fri, 03 Feb 2012 23:08:05 -0800 (PST) Received: by 10.112.9.34 with HTTP; Fri, 3 Feb 2012 23:08:05 -0800 (PST) Date: Sat, 4 Feb 2012 02:08:05 -0500 Message-ID: Subject: Create custom datatype programmatically From: Mansour Al Akeel To: user Content-Type: multipart/alternative; boundary=f46d04083a633cacaf04b81e1727 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04083a633cacaf04b81e1727 Content-Type: text/plain; charset=ISO-8859-1 In the class org.apache.tools.ant.Project, theres a method called createDataType(String str). The string argument, is the name of the type to be created. 1- This can not be used if the new type is defined in a custom antlib.xml, because it is not recognized. for example getProject.createDataType("jar") would create an instance of the Jar Task. Which not what I need. And if I don getProject.createDataType("myCustomType"), where myCustomType is defined in an antlib.xml, it will return null. 2- If the type name in antlib.xml is changed then this has to be renamed. I am not sure if it's better to use full class name as the name of the type, but this will not make it possible to create types defined, in antlib.xml Any advice about how to create an instance of myCustomType grammatically ? --f46d04083a633cacaf04b81e1727--