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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]