git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269239 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -23,7 +23,7 @@ import org.apache.log.Logger; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.framework.Condition; | import org.apache.myrmidon.framework.Condition; | ||||
| import org.apache.myrmidon.components.model.DefaultProject; | import org.apache.myrmidon.components.model.DefaultProject; | ||||
| import org.apache.myrmidon.components.model.Import; | |||||
| import org.apache.myrmidon.components.model.TypeLib; | |||||
| import org.apache.myrmidon.components.model.Project; | import org.apache.myrmidon.components.model.Project; | ||||
| import org.apache.myrmidon.components.model.Target; | import org.apache.myrmidon.components.model.Target; | ||||
| import org.xml.sax.SAXException; | import org.xml.sax.SAXException; | ||||
| @@ -189,7 +189,7 @@ public class DefaultProjectBuilder | |||||
| { | { | ||||
| if( name.equals( "import" ) ) | if( name.equals( "import" ) ) | ||||
| { | { | ||||
| buildImport( project, element ); | |||||
| buildTypeLib( project, element ); | |||||
| continue; | continue; | ||||
| } | } | ||||
| else | else | ||||
| @@ -270,8 +270,8 @@ public class DefaultProjectBuilder | |||||
| project.addProject( name, other ); | project.addProject( name, other ); | ||||
| } | } | ||||
| private void buildImport( final DefaultProject project, | |||||
| final Configuration element ) | |||||
| private void buildTypeLib( final DefaultProject project, | |||||
| final Configuration element ) | |||||
| throws Exception | throws Exception | ||||
| { | { | ||||
| final String library = element.getAttribute( "library", null ); | final String library = element.getAttribute( "library", null ); | ||||
| @@ -294,7 +294,7 @@ public class DefaultProjectBuilder | |||||
| } | } | ||||
| } | } | ||||
| project.addImport( new Import( library, type, name ) ); | |||||
| project.addTypeLib( new TypeLib( library, type, name ) ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -43,9 +43,9 @@ public class DefaultProject | |||||
| * | * | ||||
| * @return the imports | * @return the imports | ||||
| */ | */ | ||||
| public Import[] getImports() | |||||
| public TypeLib[] getTypeLibs() | |||||
| { | { | ||||
| return (Import[])m_imports.toArray( new Import[ 0 ] ); | |||||
| return (TypeLib[])m_imports.toArray( new TypeLib[ 0 ] ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -151,9 +151,9 @@ public class DefaultProject | |||||
| m_baseDirectory = baseDirectory; | m_baseDirectory = baseDirectory; | ||||
| } | } | ||||
| public final void addImport( final Import importEntry ) | |||||
| public final void addTypeLib( final TypeLib typeLib ) | |||||
| { | { | ||||
| m_imports.add( importEntry ); | |||||
| m_imports.add( typeLib ); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -38,7 +38,7 @@ public interface Project | |||||
| * | * | ||||
| * @return the imports | * @return the imports | ||||
| */ | */ | ||||
| Import[] getImports(); | |||||
| TypeLib[] getTypeLibs(); | |||||
| /** | /** | ||||
| * Get names of projects referred to by this project. | * Get names of projects referred to by this project. | ||||
| @@ -12,7 +12,7 @@ package org.apache.myrmidon.components.model; | |||||
| * | * | ||||
| * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | ||||
| */ | */ | ||||
| public class Import | |||||
| public class TypeLib | |||||
| { | { | ||||
| //Name of library (this is location independent) | //Name of library (this is location independent) | ||||
| private final String m_library; | private final String m_library; | ||||
| @@ -26,12 +26,12 @@ public class Import | |||||
| //The name of type instance | //The name of type instance | ||||
| private final String m_name; | private final String m_name; | ||||
| public Import( final String library ) | |||||
| public TypeLib( final String library ) | |||||
| { | { | ||||
| this( library, null, null ); | this( library, null, null ); | ||||
| } | } | ||||
| public Import( final String library, final String type, final String name ) | |||||
| public TypeLib( final String library, final String type, final String name ) | |||||
| { | { | ||||
| m_library = library; | m_library = library; | ||||
| m_type = type; | m_type = type; | ||||