PageRenderTime 463ms CodeModel.GetById 191ms app.highlight 8ms RepoModel.GetById 153ms app.codeStats 0ms

/src/org/ooc/middle/UseDef.java

http://github.com/nddrylliog/ooc
Java | 113 lines | 88 code | 25 blank | 0 comment | 0 complexity | 34b1eb491e65b4589f41879b462c9fdf MD5 | raw file
  1package org.ooc.middle;
  2
  3import java.util.ArrayList;
  4import java.util.List;
  5
  6public class UseDef {
  7
  8	public static class Requirement {
  9		String name;
 10		int[] version;
 11		UseDef useDef = null;
 12		
 13		public Requirement(String name, int[] version) {
 14			this.name = name;
 15			this.version = version;
 16		}
 17		
 18		@Override
 19		public String toString() {
 20			return name+" "+version[0];
 21		}
 22		
 23		public String getName() {
 24			return name;
 25		}
 26		
 27		public int[] getVersion() {
 28			return version;
 29		}
 30		
 31		public UseDef getUseDef() {
 32			return useDef;
 33		}
 34		
 35		public void setDef(UseDef def) {
 36			this.useDef = def;
 37		}
 38	}
 39	
 40	protected String identifier;
 41	protected String name = "";
 42	protected String description = "";
 43	final protected List<Requirement> requirements;
 44	final protected List<String> pkgs;
 45	final protected List<String> libs;
 46	final protected List<String> includes;
 47	final protected List<String> libPaths;
 48	final protected List<String> includePaths;
 49	
 50	public UseDef(String identifier) {
 51		this.identifier = identifier;
 52		this.requirements = new ArrayList<Requirement>();
 53		this.pkgs = new ArrayList<String>();
 54		this.libs = new ArrayList<String>();
 55		this.includes = new ArrayList<String>();
 56		this.libPaths = new ArrayList<String>();
 57		this.includePaths = new ArrayList<String>();
 58	}
 59	
 60	public String getIdentifier() {
 61		return identifier;
 62	}
 63	
 64	public void setIdentifier(String identifier) {
 65		this.identifier = identifier;
 66	}
 67	
 68	public String getName() {
 69		return name;
 70	}
 71	
 72	public void setName(String name) {
 73		this.name = name;
 74	}
 75	
 76	public String getDescription() {
 77		return description;
 78	}
 79	
 80	public void setDescription(String description) {
 81		this.description = description;
 82	}
 83	
 84	public List<Requirement> getRequirements() {
 85		return requirements;
 86	}
 87	
 88	public List<String> getPkgs() {
 89		return pkgs;
 90	}
 91	
 92	public List<String> getLibs() {
 93		return libs;
 94	}
 95	
 96	public List<String> getIncludes() {
 97		return includes;
 98	}
 99	
100	public List<String> getLibPaths() {
101		return libPaths;
102	}
103	
104	public List<String> getIncludePaths() {
105		return includePaths;
106	}
107	
108	@Override
109	public String toString() {
110		return "Name: "+name+", Description: "+description+", Pkgs: "+pkgs+", Libs: "+libs;
111	}
112	
113}