Changeset 60
- Timestamp:
- 06/17/09 14:25:24 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/org/fluffnstuff/asdoclet/generator/AsGenerator.java
r56 r60 142 142 type = resolveTypeArguments(classType, methodType, type); 143 143 144 method.addParam(name, type.getName());144 if (unit != null) method.addParam(name, type.getName()); 145 145 if (proxyUnit != null) proxyMethod.addParam(name, type.getName()); 146 146 … … 193 193 returnType = resolveTypeArguments(classType, methodType, returnType); 194 194 195 method = type.newMethod(methodName, getVisibility(modifier), returnType.getName()); 195 if (unit != null) { 196 method = type.newMethod(methodName, getVisibility(modifier), returnType.getName()); 197 } 196 198 197 199 if (proxyUnit != null) { … … 264 266 } 265 267 } 268 269 proxyMethod = null; 270 method = null; 266 271 } 267 272 268 273 public void endProxy() { 269 proxyImports.addAll(imports);270 274 for (String imp : proxyImports) proxyUnit.getPackage().addImport(imp); 271 275 proxyImports = null; … … 292 296 293 297 public void setMethodDescription(String description) { 294 if ( !StringUtils.isEmpty(description)) method.setDescription(description.trim());298 if (unit != null && !StringUtils.isEmpty(description)) method.setDescription(description.trim()); 295 299 } 296 300 … … 315 319 316 320 private void end() { 317 if (unit != null) for (String imp : imports) { 318 unit.getPackage().addImport(imp); 319 } 321 for (String imp : imports) unit.getPackage().addImport(imp); 322 323 type = null; 324 unit = null; 325 imports = null; 320 326 } 321 327 … … 378 384 private void addImport(String name) { 379 385 if (name.indexOf('.') > -1) { 380 i mports.add(name);381 if (proxy Imports!= null) proxyImports.add(name);386 if (unit != null) imports.add(name); 387 if (proxyUnit != null) proxyImports.add(name); 382 388 } 383 389 }