input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private object get compliant if driver null return string value of driver jdbc compliant else return driver not loaded
|
method get compliant
|
private object get version if driver null return driver get major version driver get minor version else return driver not loaded
|
method get version
|
public void set driver class name string string class name string
|
method set driver class name
|
public void set library string string library string
|
method set library
|
public void delete connection connection property connection property connections remove connection property
|
method delete connection
|
public void set provider name string string for int i 0 i providers length i string name providers i if name equals string selected provider i
|
method set provider name
|
private int index of connection property cp for int i 0 i connections length i connection property element connection property connections i if element get label equals cp get label return i return 1
|
method index of
|
private void update connection connection property cp connection property data source content provider get instance get connections combo get selection index editor set connection property cp
|
method update connection
|
private void update status istatus line manager s get status line manager text status line item item text status line item s find sqleditor contributor id status records if rows 0 item set label pad right rows rows 10 else item set label pad right 10
|
method update status
|
public void set text result view remove old result view result view new text result view result parent if status line manager null result view set status line manager status line manager result parent layout
|
method set text result view
|
public void set table result view remove old result view result view new table result view result parent result parent layout
|
method set table result view
|
private void process resources iterator iter resources iterator while iter has next resource r resource iter next if r is exists continue file base base dir string name r get name file provider fp file provider r as file provider class if fp null file resource f resource utils as file resource fp base f get base dir if base null name f get file get absolute path process base name dest dir
|
styles all existing resources
|
private void process file in file file out file throws build exception try if skip force in file out file log skipping processing in file to out file project msg debug return ensure directory for out file log processing in file to out file project msg info liaison configure configuration liaison convert in file out file catch exception ex log failed to process in file project msg info if out file null out file delete handle transformation error ex
|
process the input file to the output file with the given stylesheet
|
protected t get liaison if processor wasn t specified use tra x if liaison null if factory null liaison factory new instance else liaison new converter return liaison
|
get the liason implementation to use in processing
|
public void run synchronized this started true finished false finish false final byte buf new byte buffer size int length try while true wait for input is if finish thread interrupted break length is read buf if length 0 finish thread interrupted break os write buf 0 length if autoflush os flush os flush catch interrupted exception ie likely pump stream handler trying to stop us catch exception e synchronized this exception e finally if close when exhausted if os null try os close catch ioexception e finished true synchronized this notify all
|
copies data from the input stream to the output stream
|
public void set path string path this value path to string
|
stringify path and assign to the value
|
public string get content validate string buffer sb new string buffer key trim sb append append value trim return sb to string
|
get the assigment string
|
public void add timeout observer execute watchdog to no need to synchronize as vector is always synchronized observers add element to
|
add a timeout observer
|
public void validate if key null value null throw new runtime exception key and value must be specified for environment variables
|
checks whether all required attributes have been specified
|
public void remove timeout observer execute watchdog to no need to synchronize as vector is always synchronized observers remove element to
|
remove a timeout observer
|
public void stop finish output thread finish error thread if input pump null input pump stop try err flush catch ioexception e ignore try out flush catch ioexception e ignore
|
stop pumping the streams
|
public void set path string value parts new string value to string
|
set a single commandline argument and treats it like a
|
public void set system try sys system get properties properties p new properties for enumeration e sys property names e has more elements string name string e next element string value sys get property name if name null value null p put name value p put all merge property sets for enumeration e variables elements e has more elements environment variable v environment variable e next element v validate p put v get key v get value system set properties p catch security exception e throw new runtime exception cannot modify system properties e
|
cache the system properties and set the system properties to the
|
public void restore system if sys null throw new runtime exception unbalanced nesting of sys properties try system set properties sys sys null catch security exception e throw new runtime exception cannot modify system properties e
|
restore the system properties to the cached value
|
public void set input file input if input string null throw new runtime exception the input and inputstring attributes cannot both be specified this input input incompatible with spawn true
|
set the input file to use for the task
|
public string get final macro return null
|
gets the name of a final macro
|
public string get initial macro return null
|
gets the name of an initial macro
|
public void set input string string input string if input null throw new runtime exception the input and inputstring attributes cannot both be specified this input string input string incompatible with spawn true
|
set the string to use as input
|
public void set force force force this force force
|
set whether to check dependencies or always generate
|
public object clone try commandline c commandline super clone c arguments vector arguments clone return c catch clone not supported exception e throw new runtime exception oops e
|
generate a deep clone of the contained object
|
public void execute quick fail if this is not a valid os for the command if is valid os return file saved dir dir possibly altered in prepare exec cmdl set executable resolve executable executable search path check configuration try run exec prepare exec finally dir saved dir
|
do the work
|
private object invoke method m object instance object args try return m invoke instance args catch invocation target exception e throwable x e get cause if x instanceof runtime exception throw runtime exception x if x instanceof error throw error x throw new runtime exception x catch illegal access exception e throw new runtime exception e
|
executes this macro
|
protected execute prepare exec default directory to the project s base directory if dir null dir new file get absolute file execute exe new execute null create watchdog exe set working directory dir exe set vmlauncher vm launcher string environment env get variables if environment null for int i 0 i environment length i log setting environment variable environment i project msg verbose exe set newenvironment new environment exe set environment environment return exe
|
create an execute instance with the correct working directory set
|
protected void run exec execute exe show the command log cmdl describe command project msg verbose exe set commandline cmdl get commandline try run execute exe catch ioexception e if fail if exec fails throw new runtime exception execute failed e to string e finally close the output file if required log flush
|
run the command using the given execute instance
|
protected execute watchdog create watchdog return timeout null null new execute watchdog timeout long value
|
create the watchdog to kill a runaway process
|
private void process file in file file out file throws build exception try if skip force in file out file log skipping processing in file to out file project msg debug return ensure directory for out file log processing in file to out file project msg info converter configure configuration converter convert in file out file catch exception ex log failed to process in file project msg info if out file null out file delete handle transformation error ex
|
process the input file to the output file with the given stylesheet
|
public executable helper execute throws build exception return options
|
executes this ant item
|
protected t get converter if converter null if factory null converter factory new instance else converter new converter return converter
|
get the liason implementation to use in processing
|
public void set gen factory id string id options set gen factory id id
|
sets the generator factory id attribute
|
public file set create classes file set reg new file set registrators add reg return reg
|
creates a nested element for the classes attribute
|
public class descriptor create registrator class descriptor reg new class descriptor task get project registrators add reg return reg
|
creates a nested element for the registrator attribute
|
public void set registrator class r registrators add r
|
sets the registrator attribute by class
|
public default office manager configuration set work dir file work dir check argument not null work dir work dir this work dir work dir return this
|
sets the directory where temporary office profiles will be created
|
public default office manager configuration set process manager process manager process manager throws null pointer exception check argument not null process manager process manager this process manager process manager return this
|
provide a specific
|
public default office manager configuration set retry timeout long retry timeout this retry timeout retry timeout return this
|
retry timeout set in milliseconds
|
public void add sysproperty environment variable sysp cmdl add sysproperty sysp
|
adds a system property
|
public void clear args cmdl clear java args
|
clear out the arguments to this java task
|
public void add mapper org apache tools ant types mapper mapper if mapper element null handle error cannot define more than one mapper else mapper element mapper
|
defines the mapper to map source to destination files
|
public void add file name mapper file name mapper throws build exception org apache tools ant types mapper mapper new org apache tools ant types mapper get project mapper add file name mapper add mapper mapper
|
adds a nested filenamemapper
|
private void run commandline java command throws build exception execute java exe new execute java exe set java command command get java command exe set classpath command get classpath exe set system properties command get system properties exe set timeout timeout if out null try out stream new print stream new file output stream out get absolute path append exe execute get project system out flush system err flush catch ioexception io throw new build exception io get location finally if out stream null out stream close else exe execute get project
|
executes the given classname with the given arguments as it was a command
|
public void set args string s log the args attribute is deprecated please use nested arg elements project msg warn cmdl create argument set line s
|
deprecated use nested arg instead
|
public void set classname string s throws build exception if cmdl get jar null throw new build exception cannot use jar and classname attributes in same command cmdl set classname s
|
sets the java class to execute
|
public void set jar file jarfile throws build exception if cmdl get classname null throw new build exception cannot use jar and classname attributes in same command cmdl set jar jarfile get absolute path
|
the location of the jar file to execute
|
public void set jvm string s cmdl set vm s
|
set the command used to start the vm only if not forking
|
public void set jvmargs string s log the jvmargs attribute is deprecated please use nested jvmarg elements project msg warn cmdl create vm argument set line s
|
set the command line arguments for the jvm
|
public void set jvmversion string value cmdl set vmversion value
|
sets the jvm version
|
public void set maxmemory string max cmdl set maxmemory max
|
corresponds to mx or xmx depending on vm version
|
public void set output file out this out out
|
file the output of the process is redirected to
|
private void check dest if dest required dest dir null handle error destdir attributes must be set
|
throws a build exception if the destination directory hasnt
|
private void process resources iterator iter resources iterator while iter has next resource r resource iter next if r is exists continue file base base dir string name r get name file provider fp file provider r as file provider class if fp null file resource f resource utils as file resource fp base f get base dir if base null name f get file get absolute path process base name src encoding dest dir
|
styles all existing resources
|
public string get name if name null throw new null pointer exception name return name
|
get the parameter name
|
private void ensure directory for file target file throws build exception if target file null return file directory target file get parent file if directory exists if directory mkdirs handle error unable to create directory directory get absolute path
|
ensure the directory exists for a given file
|
public string get expression if type default equals type expression null throw new null pointer exception expression return expression
|
get the parameters value
|
public indent print writer writer out this out false
|
creates a new print writer without automatic line flushing
|
public string filename if lang is java string fcn fullclassname class classname fcn package package fcn return javafilename fcn throw new runtime exception get class get name filename not defined
|
returns the relative filename for the generated file
|
public void reload providers clear lookup iterator new lazy iterator info
|
clear this loaders provider cache so that all providers will be
|
public string to string return get class get name info get service class get name
|
returns a string describing this service
|
public url create url string file or url throws malformed urlexception if is url file or url return new url normalize file or url return fileutils get file url new file file or url
|
creates a url from a absolute or relative file or url
|
public boolean is absolute string file or url throws malformed urlexception if is url file or url url url new url transform file sep file or url string url str url to string if url get protocol null url str url str substring url get protocol length 1 return url str starts with return new file file or url is absolute
|
indicates whether the denoted file or url is absolute or relative
|
public void add configured class assertion status assertion status st check children allowed st check false if st get status class assertions add st get name else class non assertions add st get name
|
sets a nested class assertion status element
|
public void add configured package assertion status assertion status st check children allowed st check true if st get status package assertions add st get name else package non assertions add st get name
|
sets a nested package assertion status element
|
public boolean get default assertion status if is reference simple class loader adapter descriptor r simple class loader adapter descriptor get checked ref simple class loader adapter descriptor class loader descriptor return r get default assertion status return default assertion status
|
gets the default assertion status
|
public boolean is url string file or url string x transform file sep file or url if x starts with return false try url url new url transform file sep file or url return url get protocol null catch malformed urlexception murlex return false
|
indicates whether the denoted file or url is an absolute url or not
|
public handler get default handler if is reference parameters r parameters get checked ref parameters class loader descriptor return r get default handler return handler get project get reference ant clhandler urlclass loader
|
returns the default handler for this parameters
|
public parameters get parameters if is reference return parameters get checked ref parameters class loader descriptor return this
|
returns the descriptor which is either the instance itself
|
public void set default assertion status boolean on off check attributes allowed default assertion status on off
|
sets the default assertion status attribute
|
public void set add default boolean on off check attributes allowed add default on off
|
sets add default attribute
|
public string resolve string file or url file dir throws malformed urlexception if is absolute file or url return create url file or url to string if is file or file url file or url return file or url if is url file or url string file fileutils from uri transform file sep file or url return create url new file dir file to string to string return create url new file dir file or url to string to string
|
resolves an absolute or relative file or url with respect to a basedirectory
|
public void set add all boolean on off check attributes allowed add all on off
|
sets addall attribute
|
public string transform file sep string file or url return file or url replace
|
transforms the fileseparators to url format
|
public void set handler loader handler handler check attributes allowed handler check if handler set add handler get loader handler list add handler
|
sets a handler attribute
|
protected void report string s if s null task log s project msg info
|
writes a message line to the reporting dest
|
private role new role string ref for role role simple utils get instance get roles if ref equals ignore case role to string return role throw new runtime exception
|
constructor used by set xxx methods
|
public void check if is reference loader handler r loader handler get checked ref loader handler class loader handler r check if loader null throw new build exception attribute loader is mandatory if adapter null throw new build exception attribute adapter is mandatory
|
checks whether both attributes are set
|
public handler get default handler if is reference return super get default handler return handler get project get reference ant clhandler ant class loader
|
gets the default handler
|
public loader handler set new handler set return new loader handler set get project
|
creates a new handlerset
|
public object clone try return super clone catch clone not supported exception e throw new build exception e
|
clones this object
|
public boolean is add java libraries if is reference ant class loader adapter descriptor r ant class loader adapter descriptor get checked ref ant class loader adapter descriptor class ant loader descriptor return r is add java libraries return add java libraries
|
indicates whether add java libraries should be called
|
public handler set get handler set return delegate get handler set
|
gets the handlerset to analyze a given classloader with
|
public void handle error string msg throwable ex handle error msg ex null
|
handles an error with respect to the failonerror attribute
|
public boolean is isolated if is reference ant class loader adapter descriptor r ant class loader adapter descriptor get checked ref ant class loader adapter descriptor class ant loader descriptor return r is isolated return isolated
|
indicates whether isolated mode should be set
|
public void handle error string msg throwable ex location loc if loc null loc this get location if msg null ex null msg ex get message if delegate is fail on error throw new build exception msg ex loc delegate handle error loc error msg ex
|
handles an error with respect to the failonerror attribute
|
public void set failonerror boolean on off delegate set fail on error on off
|
sets the failonerror attribute
|
public boolean is parent first if is reference ant class loader adapter descriptor r ant class loader adapter descriptor get checked ref ant class loader adapter descriptor class ant loader descriptor return r is parent first return parent first
|
indicates whether normal delegation model or reverse loader model should be used
|
public void set add java libraries boolean on off check attributes allowed add java libraries on off
|
sets the add java libraries attribute
|
public string get adapter check if is reference loader handler r loader handler get checked ref loader handler class loader handler return r get adapter return adapter
|
gets the adapter classname
|
public void set isolated boolean b check attributes allowed isolated b
|
sets the isolated attribute
|
public void execute delegate execute
|
role the report
|
public string get loader check if is reference loader handler r loader handler get checked ref loader handler class loader handler return r get loader return loader
|
gets the classloaders classname
|
public boolean is report packages return delegate is report packages
|
indicates whether packages should been reported
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.