input
stringlengths
10
828
output
stringlengths
5
107
public void set loader package root string pkgs check attributes allowed hash set string set new hash set string for string tokenizer st new string tokenizer pkgs st has more tokens set add st next token trim loader package root set to array new string set size
sets the packages to be set as loader package root
public string get name if is reference return get ref get name if loader ref null return loader ref if loader null return loader to string return null
get the specified loaders name
public void set destfile file file delegate set destfile file
sets the output file
public void set format string f delegate set format report format value of f
sets the format
public void set hierarchy string h delegate set hierarchy report hierarchy value of h
sets the hierarchy
public void set parent first boolean b check attributes allowed parent first b
sets the parent first attribute
public void set reportpackages boolean on off delegate set reportpackages on off
sets the report packages attribute
public void set reverse loader boolean b check attributes allowed parent first b
sets the reverse loader attribute
public void handle error string msg handle error msg null fail on error
role an error with respect to the fail on error attribute
public void set adapter string classname check attributes allowed adapter classname
sets the adapter attribute
public void set system package root string pkgs check attributes allowed hash set string set new hash set string for string tokenizer st new string tokenizer pkgs st has more tokens set add st next token trim system package root set to array new string set size
sets the packages to be set as system package root
public void add ant parameters ant loader parameters desc set parameters desc
sets a nested descriptor element for an ant class loader
public void handle error string msg boolean fail handle error msg null fail
role an error with respect to the fail on error attribute
public level get duplicate log level return log level
get the logging level for reporting duplicate entries
public boolean is omit duplicate return omit duplicate
indicates whether duplicate entries should be omitted
public boolean requires check return requires check
indicates whether duplicate entries needs to be checked
public void handle error string msg throwable ex handle error msg null fail on error
role an error with respect to the fail on error attribute
public class loader get default parent return class loader get system class loader
gets the default parent classloader in the case this classloaders
public void handle error string msg throwable ex boolean fail if msg null ex null msg ex get message if fail throw new build exception msg ex log error msg project msg err
role an error with respect to the fail on error attribute
public void set loader string classname check attributes allowed loader classname
sets the loader attribute
public void add loader loader ref loader set loader loader
sets a nested loader element
public void set location string loc if parts null throw new build exception either location or path can be defined if loc null loc translate file loc if loc null parts new string loc
sets the location attribute
public string begin attributes int num string prefix string result prefix 0 attributes num entries inc prefix prefix prefix attributes return result
formats the start of the attributes section
public void set class loader base context ctxt class loader classloader if is reference get ref set class loader ctxt classloader else if loader ref null get project add reference loader ref classloader else if loader null loader replace ctxt classloader loader get name
sets a classloader as the defined loader
public void add parameters loader parameters desc set parameters desc
sets a nested parameters element
public void set failonerror boolean on off check attributes allowed fail on error on off
sets the failonerror attribute
protected string get default parent name return system class loader
gets the symbolic name of the default parent classloader in the case
public string begin child loaders int num string prefix string result prefix 0 childs num entries inc prefix prefix prefix childs return result
formats the start of the childs section
public string begin attributes int num string prefix string result prefix 0 attributes count num inc prefix prefix return result
formats the start of the attributes section
public void add parent loader loader ref loader set parent loader loader
sets the nested parent loader element
public void set path string path if parts null throw new build exception either location or path can be defined parts translate url path path
sets the path attribute
public void set loader string spec check attributes allowed loader new role spec
sets the loader attribute
public void begin attributes int num
indicates start of attributes section
public class loader get parent class loader class loader try class loader cl class loader get class get class loader if cl null cl class loader get system class loader field field cl load class ant class loader class get name get declared field parent field set accessible true return class loader field get class loader catch exception e throw new build exception e
gets the parent classloader
public void add super loader loader ref loader set super loader loader
sets the nested super loader element
public void begin child loaders int num
indicates start of child section
public string begin classloader role name string prefix string result prefix 0 classloader get role name inc prefix prefix prefix classloader return result
formats the start of a childloader section
public string begin child loaders int num string prefix string result prefix 0 childs count num inc prefix prefix return result
formats the start of the childs section
public void set loader ref reference id check attributes allowed string sid id get ref id try set loader sid catch exception e loader ref sid
sets the loader ref attribute
public urlpath create classpath if this classpath null this classpath new urlpath get project return this classpath create urlpath
creates a nested classpath element
protected void report string s if s null stream println s
writes a message line to the reporting dest
public void begin classloader role name current cl new descriptor name c lby handle put name current cl
indicates start of classloader reporting
public string begin classloader role name string prefix string result prefix 0 classloader type name get type name name get name null name name get name inc prefix prefix return result
formats the start of a childloader section
public void begin entries int num
indicates start of entries section
public string begin entries int num string prefix string result prefix 0 entries num entries inc prefix prefix prefix entries return result
formats the start of the entries section
public void execute if delegate get role null throw new build exception no loader specified if delegate execute only equals get project get property build sysclasspath return if property null this execute property
executes this task
public void add existing urlpath source add existing source false
adds the components on the given path which exist to this
public void begin errors int num
indicates start of error section
public string begin entries int num string prefix string result prefix 0 entries count num inc prefix prefix return result
formats the start of the entries section
public string begin errors int num string prefix string result prefix 0 errors num entries inc prefix prefix prefix errors return result
formats the start of the errors section
public void begin packages int num
indicates start of packages section
public urlpath get classpath return classpath
gets the classpath to add to a classloader
public void begin report
indicates start of report
public string begin errors int num string prefix string result prefix 0 errors count num inc prefix prefix return result
formats the start of the errors section
public string begin packages int num string prefix string result prefix 0 packages num entries inc prefix prefix prefix packages return result
formats the start of packages section
public void begin roles int num
indicates start of role section
public boolean is report packages return report packages
indicates whether packages should been reported
public void set destfile file file this output file
sets the output file
public void begin unassigned roles int num
indicates start of unassigned roles section
public handler get handler return delegate get handler
gets the handler to create a new classloader
public void set format format f this format f
sets the format
public string begin packages int num string prefix string result prefix 0 packages count num inc prefix prefix return result
formats the start of packages section
public string begin report string prefix string result prefix 0 classloaderreport inc prefix prefix prefix report return result
formats the start of the report
public void end attributes int num
indicates end of attributes section
public void set hierarchy hierarchy h this hierarchy h
sets the hierarchy
public void set reportpackages boolean on off report packages on off
sets the report packages attribute
public void end child loaders int num
indicates end of child section
public void add extdirs path extdirs check children allowed if extdirs null string ext prop system get property java ext dirs if ext prop null extdirs new path get project ext prop else return string dirs extdirs list for int i 0 i dirs length i file dir get project resolve file dirs i if dir exists dir is directory file set fs new file set fs set dir dir fs set includes add fileset fs
emulation of extdirs feature in java 1
public class loader get parent loader return delegate get parent loader
gets the parent class loader as defined via the parent loader attribute
public string begin report string prefix string result prefix 0 classloaderreport inc prefix prefix return result
formats the start of the report
public string begin roles int num string prefix string result prefix 0 roles num entries inc prefix prefix prefix roles return result
formats the start of the roles section
public void end classloader role name
indicates end of classloader reporting
public void end entries int num
indicates end of entries section
protected handler set new handler set return handler set factory new handler set
creates a new handlerset
public class loader get super loader return delegate get super loader
gets the super classloader to create a new classloader with
public handler set get handler set if handler set null handler set new handler set return handler set
gets the handlerset to analyze a given classloader with
public utils get utils return simple utils get instance
gets the utilities
public string begin roles int num string prefix string result prefix 0 roles count num inc prefix prefix return result
formats the start of the roles section
public void end errors int num
indicates end of errors section
public string begin unassigned roles int num string prefix string result prefix 0 unassigned roles num entries inc prefix prefix prefix unassigned roles return result
formats the start of the unassigned roles section
public void check boolean pkg if name null throw new runtime exception attribute pkg package class is mandatory
checks whether name attribute is set and sets default status
public boolean handle classpath entry class loader cl url entry url return delegate handle classpath entry cl entry url
handles a classpath entry
public void set status boolean on off status on off
sets the assertion attribute
public void set class string name this name name
sets the class attribute
public void end packages int num
indicates end of packages section
public void set package string name this name name
sets the package attribute
public loader handler set new handler set loader handler set result new loader handler set get project result add configured handler get handler return result
this implementation adds the handler set via set handler to the newly
public string begin unassigned roles int num string prefix string result prefix 0 unassigned roles count num inc prefix prefix return result
formats the start of the unassigned roles section
public void end report
indicates end of report
public handler get handler if handler null handler get parameters get default handler return handler
gets the handler to create a new classloader
public void end roles int num
indicates end of roles section
public void set classpath urlpath classpath if this classpath null this classpath classpath else this classpath append classpath
specify which path will be used
public string end attributes int num string prefix dec prefix prefix prefix attributes return null
formats the end of the attributes section
public void end unassigned roles int num
indicates end of unassigned roles section
public void set classpath ref reference path ref create classpath add reference path ref
specify which path will be used
public class loader get parent loader if parent loader null if parent loader role null parent loader parent loader role get class loader this true parent loader role get name return parent loader
gets the parent class loader as defined via the parent loader attribute
public string end child loaders int num string prefix dec prefix prefix prefix childs return null
formats the end of the childs section
public void add java runtime create path add java runtime
add the java runtime classes to this path instance
public string end attributes int num string prefix dec prefix prefix return prefix 0 attributes
formats the end of the attributes section
public class loader get super loader if super loader null if super loader role null super loader super loader role get class loader this true super loader role get name else return get class get class loader return super loader
gets the super classloader to create a new classloader with