- Timestamp:
- 07/14/13 23:20:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/parsers/MultiParamLoader.java
r100 r101 68 68 * File from which data should be read. 69 69 */ 70 private Source InterfacecurrentSource;70 private Source currentSource; 71 71 72 72 protected String currentLine; … … 83 83 * actual reader. 84 84 */ 85 private Map<String, Source Interface> fileMap = new HashMap<String, SourceInterface>();85 private Map<String, Source> fileMap = new HashMap<String, Source>(); 86 86 87 87 /** 88 88 * List of known classes. 89 89 */ 90 pr ivate Map<String, Access> knownParamInterfaces = new HashMap<String, Access>();90 protected AccessProvider accessProvider = new AccessStash(); 91 91 92 92 /** … … 100 100 public String getCurrentLine() { 101 101 return currentLine; 102 } 103 104 /** 105 * @return the accessProvider 106 */ 107 public AccessProvider getAccessProvider() { 108 return accessProvider; 109 } 110 111 /** 112 * @param accessProvider the accessProvider to set 113 */ 114 public void setAccessProvider(AccessProvider accessProvider) { 115 this.accessProvider = accessProvider; 102 116 } 103 117 … … 184 198 } 185 199 log.trace("loading into {}", lastAccess); 186 lastAccess.load(currentSource);200 AccessOperations.load(lastAccess, currentSource); 187 201 188 202 if (changeStatus(Status.AfterObject)) { … … 194 208 195 209 // found unknown object 196 emptyParam.load(currentSource);210 AccessOperations.load(emptyParam, currentSource); 197 211 if (changeStatus(Status.AfterObject)) { 198 212 return LoopAction.Break; … … 262 276 if (line.charAt(line.length() - 1) == ':') { 263 277 String typeName = line.substring(0, line.length() - 1); 264 lastAccess = knownParamInterfaces.get(typeName);278 lastAccess = accessProvider.getAccess(typeName); 265 279 266 280 if (lastAccess != null) { … … 300 314 */ 301 315 public void addAccess(Access access) { 302 /**TODO: by id or by name? rather by id, because from file is always lowercase*/ 303 knownParamInterfaces.put(access.getId(), access); 316 accessProvider.addAccess(access); 304 317 } 305 318 … … 324 337 */ 325 338 326 public boolean setNewSource(Source Interfacesource) {339 public boolean setNewSource(Source source) { 327 340 log.debug("switching current source to {}...", source.getFilename()); 328 341 … … 351 364 log.info("including file {}...", includeFilename); 352 365 353 Source InterfacenewSource = currentSource.openInclude(includeFilename);366 Source newSource = currentSource.openInclude(includeFilename); 354 367 if (newSource == null) { 355 368 return; … … 426 439 } 427 440 428 public static List<Object> loadAll(Source Interfacesource, Access access) {441 public static List<Object> loadAll(Source source, Access access) { 429 442 final List<Object> result = new LinkedList<>(); 430 443
Note: See TracChangeset
for help on using the changeset viewer.