This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a problem in downcasting the attached reference to a project (when i call the target from another build file).
- The downcasting works fine in the same ant build file.
- Also it works for simple types eg. string, int etc. but not for complex type eg. class having mixed datatype int, string or other classes
I have a main build.xml calling target "Target2" of build2.xml using task "Ant"
All the references and properties are expected to be transfer to Target2 and should be retrieved / casted to the original types.
For the above senario i created a custom task "mainTask" which create an instance of Subq object and uses addReference() method of Project class to attach the reference of it
This attached reference is expected to pass to the Target2 of build2.xml file with following ant task
In the Target2 of build2.xml i have another custom task which prints all the references received and try to retrive the attached reference "myobj1"
I can see the reference "myobj1" in hashtable with hastable.toString() method