package sds.decompile;

/**
 * This class is adapter class for decompiler.
 * @author inagaki
 */
public abstract class AbstractDecompiler implements Decompiler {
	DecompiledResult result;

	AbstractDecompiler(DecompiledResult result) {
		this.result = result;
	}

	/**
	 * retunrs decompiled source.
	 * @return decompiled source
	 */
	public DecompiledResult getResult() {
		return result;
	}
}
@@ -17,16 +17,101 @@
 mpile;%0A%0A
+import sds.assemble.BaseContent;%0Aimport sds.assemble.BaseContent.AnnotationContent;%0A%0A
 /**%0A * T
@@ -118,17 +118,8 @@
 his 
-class is 
 adap
@@ -128,16 +128,19 @@
 r class 
+is 
 for deco
@@ -342,133 +342,760 @@
 %7D%0A%0A%09
-/**%0A%09 * retunrs decompiled source.%0A%09 * @return decompiled source%0A%09 */%0A%09public DecompiledResult getResult() %7B%0A%09%09return result;
+abstract void addDeclaration(BaseContent content);%0A%0A%09void addAnnotation(AnnotationContent annotation) %7B%0A%09%09if(annotation != null) %7B%0A%09%09%09// runtime visible annotation%0A%09%09%09if(annotation.getAnnotations(true).length %3E 0) %7B%0A%09%09%09%09for(String ann : annotation.getAnnotations(true)) %7B%0A%09%09%09%09%09result.write(ann);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09// runtime invisible annotation%0A%09%09%09if(annotation.getAnnotations(false).length %3E 0) %7B%0A%09%09%09%09for(String ann : annotation.getAnnotations(false)) %7B%0A%09%09%09%09%09result.write(ann);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09/**%0A%09 * retunrs decompiled source.%0A%09 * @return decompiled source%0A%09 */%0A%09public DecompiledResult getResult() %7B%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public void decompile(BaseContent%5B%5D contents) %7B%0A%09%09for(BaseContent content : contents) %7B%0A%09%09%09decompile(content);%0A%09%09%7D
 %0A%09%7D%0A

add method for to add annotation and declaration.