001    package cpw.mods.fml.common.discovery;
002    
003    import java.io.File;
004    import java.util.List;
005    
006    import com.google.common.collect.Lists;
007    
008    import cpw.mods.fml.common.ModContainer;
009    
010    
011    public class ModCandidate
012    {
013        private File classPathRoot;
014        private File modContainer;
015        private ContainerType sourceType;
016        private boolean classpath;
017        private List<String> baseModTypes = Lists.newArrayList();
018    
019        public ModCandidate(File classPathRoot, File modContainer, ContainerType sourceType)
020        {
021            this(classPathRoot, modContainer, sourceType, false);
022        }
023        public ModCandidate(File classPathRoot, File modContainer, ContainerType sourceType, boolean classpath)
024        {
025            this.classPathRoot = classPathRoot;
026            this.modContainer = modContainer;
027            this.sourceType = sourceType;
028            this.classpath = classpath;
029        }
030    
031        public File getClassPathRoot()
032        {
033            return classPathRoot;
034        }
035    
036        public File getModContainer()
037        {
038            return modContainer;
039        }
040    
041        public ContainerType getSourceType()
042        {
043            return sourceType;
044        }
045        public List<ModContainer> explore(ASMDataTable table)
046        {
047            return sourceType.findMods(this, table);
048        }
049    
050        public boolean isClasspath()
051        {
052            return classpath;
053        }
054        public void rememberBaseModType(String className)
055        {
056            baseModTypes.add(className);
057        }
058        public List<String> getRememberedBaseMods()
059        {
060            return baseModTypes;
061        }
062    }