1 32 33 package com.jeantessier.classreader; 34 35 import java.io.*; 36 import java.util.*; 37 38 public class DeprecationPrinter extends Printer { 39 public DeprecationPrinter(PrintWriter out) { 40 super(out); 41 } 42 43 public void visitDeprecated_attribute(Deprecated_attribute attribute) { 44 Object owner = attribute.getOwner(); 45 46 if (owner instanceof Feature_info) { 47 if (!((Feature_info) owner).getClassfile().isDeprecated()) { 48 append(((Feature_info) owner).getFullSignature()).eol(); 49 } 50 } else { 51 append(owner).eol(); 52 53 if (owner instanceof Classfile) { 54 Classfile classfile = (Classfile) owner; 55 56 Iterator i; 57 58 i = classfile.getAllFields().iterator(); 59 while (i.hasNext()) { 60 append(((Feature_info) i.next()).getFullSignature()).eol(); 61 } 62 63 i = classfile.getAllMethods().iterator(); 64 while (i.hasNext()) { 65 append(((Feature_info) i.next()).getFullSignature()).eol(); 66 } 67 } 68 } 69 } 70 } 71 | Popular Tags |