ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r573642 - /ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
Date Fri, 07 Sep 2007 17:52:29 GMT
Author: peterreilly
Date: Fri Sep  7 10:52:29 2007
New Revision: 573642

URL: http://svn.apache.org/viewvc?rev=573642&view=rev
Log:
add a method to see if a nested element is supported via reflection

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java?rev=573642&r1=573641&r2=573642&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/IntrospectionHelper.java Fri Sep  7 10:52:29
2007
@@ -647,6 +647,20 @@
         if (isDynamic() || addTypeMethods.size() > 0) {
             return true;
         }
+        return supportsReflectElement(parentUri, elementName);
+    }
+
+    /**
+     * Check if this element supports a nested element from refection.
+     *
+     * @param parentUri   the uri of the parent
+     * @param elementName the name of the nested element being checked
+     *
+     * @return true if the given nested element is supported
+     * @since Ant 1.8.0
+     */
+    public boolean supportsReflectElement(
+        String parentUri, String elementName) {
         String name = ProjectHelper.extractNameFromComponentName(elementName);
         if (!nestedCreators.containsKey(name.toLowerCase(Locale.US))) {
             return false;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message