1 20 21 package com.tonicsystems.jarjar; 22 23 import com.tonicsystems.jarjar.util.*; 24 import java.io.IOException ; 25 import java.util.*; 26 27 class ZapProcessor implements JarProcessor 28 { 29 private Wildcard[] wildcards; 30 31 public ZapProcessor(List zapList) { 32 wildcards = PatternElement.createWildcards(zapList); 33 } 34 35 public boolean process(EntryStruct struct) throws IOException { 36 if (struct.name.endsWith(".class")) 37 return !zap("L" + struct.name.substring(0, struct.name.length() - 6) + ";"); 38 return true; 39 } 40 41 private boolean zap(String desc) { 42 for (int i = 0; i < wildcards.length; i++) { 44 if (wildcards[i].matches(desc, Wildcard.STYLE_DESC)) 45 return true; 46 } 47 return false; 48 } 49 } 50 51 | Popular Tags |