SandMark version 2.0


sandmark.obfuscate
Class Obfuscator

java.lang.Object
  |
  +--sandmark.obfuscate.Obfuscator

public class Obfuscator
extends java.lang.Object

The sandmark.obfuscate.Obfuscator class supervises obfuscation as parameterized by the global Properties and possibly also by a Scoreboard and other things yet to be determined.

Author:
Christian Collberg

Field Summary
(package private)  ClassFileCollection cfc
           
(package private) static ConfigProperties configProps
           
(package private) static boolean currentlyObfuscating
           
(package private)  java.util.Hashtable ht
           
(package private)  java.util.Properties props
           
 
Constructor Summary
Obfuscator(java.util.Properties props)
          Construct an Obfuscator object given a set of properties.
 
Method Summary
static java.lang.String getAboutHTML()
          Get the HTML codes of the About page for Obfuscate
static java.lang.String[] getAllObfuscatorNames()
          Gets a list of all fully qualified obfuscator names.
static AppObfuscator getAppObfuscatorByName(java.lang.String name)
           
static AppObfuscator getAppObfuscatorByShortName(java.lang.String name)
           
static java.lang.String[] getAppObfuscatorNames()
           
static ClassObfuscator getClassObfuscatorByName(java.lang.String name)
           
static ClassObfuscator getClassObfuscatorByShortName(java.lang.String name)
           
static java.lang.String[] getClassObfuscatorNames()
           
static GeneralObfuscator getGeneralObfuscatorByName(java.lang.String name)
           
static GeneralObfuscator getGeneralObfuscatorByShortName(java.lang.String name)
           
static java.lang.String getHelpURL()
          Get the URL of the Help page for Obfuscate
static MethodObfuscator getMethodObfuscatorByName(java.lang.String name)
           
static MethodObfuscator getMethodObfuscatorByShortName(java.lang.String name)
           
static java.lang.String[] getMethodObfuscatorNames()
           
static ConfigProperties getProperties()
           
 void obfuscate()
           
static void obfuscateButtonPressed(SandMarkFrame f)
          This method is executed in response to the user clicking on the obfuscate button in the obfuscate tab.
static void obfuscatePaneDeselected(SandMarkFrame f)
           
static void obfuscatePaneSelected(SandMarkFrame f)
           
static boolean obfuscationInProgress()
          Checks to see if there is an obfuscation running.
 void save()
           
static void setProperties(ConfigProperties props)
          Set the GENERAL properties of Obfuscate
static void updateObfuscatePaneData(SandMarkFrame f)
          Set the obfuscate input data from the current property values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

java.util.Properties props

cfc

ClassFileCollection cfc

configProps

static ConfigProperties configProps

ht

java.util.Hashtable ht

currentlyObfuscating

static boolean currentlyObfuscating
Constructor Detail

Obfuscator

public Obfuscator(java.util.Properties props)
           throws java.lang.Exception
Construct an Obfuscator object given a set of properties.

Parameters:
props - the user specified configuration properties, these properties should include OBF_JarInput which is mapped to the name of the jar file to be obfuscated
Method Detail

getClassObfuscatorByName

public static ClassObfuscator getClassObfuscatorByName(java.lang.String name)

getGeneralObfuscatorByName

public static GeneralObfuscator getGeneralObfuscatorByName(java.lang.String name)

getAppObfuscatorByName

public static AppObfuscator getAppObfuscatorByName(java.lang.String name)

getMethodObfuscatorByName

public static MethodObfuscator getMethodObfuscatorByName(java.lang.String name)

getClassObfuscatorByShortName

public static ClassObfuscator getClassObfuscatorByShortName(java.lang.String name)

getGeneralObfuscatorByShortName

public static GeneralObfuscator getGeneralObfuscatorByShortName(java.lang.String name)

getAppObfuscatorByShortName

public static AppObfuscator getAppObfuscatorByShortName(java.lang.String name)

getMethodObfuscatorByShortName

public static MethodObfuscator getMethodObfuscatorByShortName(java.lang.String name)

getClassObfuscatorNames

public static java.lang.String[] getClassObfuscatorNames()

getAppObfuscatorNames

public static java.lang.String[] getAppObfuscatorNames()

getMethodObfuscatorNames

public static java.lang.String[] getMethodObfuscatorNames()

getAllObfuscatorNames

public static java.lang.String[] getAllObfuscatorNames()
Gets a list of all fully qualified obfuscator names.

Returns:
obfuscator class names (ex. sandmark.obfuscate.setfieldspublic.SetFieldsPublic)

obfuscate

public void obfuscate()

save

public void save()
          throws java.lang.Exception
java.lang.Exception

getProperties

public static ConfigProperties getProperties()

setProperties

public static void setProperties(ConfigProperties props)
Set the GENERAL properties of Obfuscate

Parameters:
props -

getAboutHTML

public static java.lang.String getAboutHTML()
Get the HTML codes of the About page for Obfuscate

Returns:
HTML code for the about page

getHelpURL

public static java.lang.String getHelpURL()
Get the URL of the Help page for Obfuscate

Returns:
url for the help page

obfuscatePaneSelected

public static void obfuscatePaneSelected(SandMarkFrame f)
Parameters:
f -

obfuscatePaneDeselected

public static void obfuscatePaneDeselected(SandMarkFrame f)

updateObfuscatePaneData

public static void updateObfuscatePaneData(SandMarkFrame f)
Set the obfuscate input data from the current property values. We use this when we've computed a new input value (that the user didn't enter themselves explicitly).

Parameters:
f -

obfuscationInProgress

public static boolean obfuscationInProgress()
Checks to see if there is an obfuscation running.

Returns:
true if there is an obfuscation currently running

obfuscateButtonPressed

public static void obfuscateButtonPressed(SandMarkFrame f)
This method is executed in response to the user clicking on the obfuscate button in the obfuscate tab. We check that the right arguments have been filled in. If so, we run the actual obfuscation.

Parameters:
f -

SandMark version 2.0

Mon Jun 17 12:30:47 MST 2002