input
stringlengths
10
828
output
stringlengths
5
107
public void set javac javac javac javac javac
set the javac task
public void open string qualified classname class loader cl string class file name qualified classname replace class try input stream cls input cl get resource as stream class file name cf new class file cls input mil cf get methods fil cf get fields catch ioexception io ex not sure what to do here repackage and throw io ex print stack trace
using the provided class loader load the class so that it can
public void insert class attribute object attribute byte data serialize attribute attr info list ail cf get attrs cfcustom attr info cai cfcustom attr info ail add attrib4j cfparse cfcustom cai set serialized data data
insert a custom class attribute into the bytecode
public void insert field attribute string field object attribute byte data serialize attribute for int i 0 i fil length i if fil get field name i equals field field info fld fil get i attr info list ail fld get attrs cfcustom attr info cai cfcustom attr info ail add attrib4j cfparse cfcustom cai set serialized data data break
insert a custom field attribute into the bytecode
private void harvest attributes attr info list ail list list for int i 0 i ail length i todo dependencyon package names if ail get name i equals attrib4j cfparse cfcustom cfcustom attr info cust attr info cfcustom attr info ail get i byte serialized custom attribute cust attr info get serialized data try object custom attr new object input stream new byte array input stream serialized custom attribute read object list add custom attr catch ioexception io ex todo repackage and throw io ex print stack trace catch exception ex todo repackage and throw ex print stack trace
private implementation method to harvest custom attributes out of the
public void write string dest dir try string path dest dir cfutils canonicalize cf get name mlp todo directory needs to exist before file output stream fout new file output stream path data output stream out new data output stream fout cf write out fout close catch ioexception io ex io ex print stack trace
write out the modified classfile
public object create attribute instance string text urlclass loader class loader string attribute packages todo auto generated method stub return null
just added to avoid compilation error
public void open string qualified classname class loader cl string class file name qualified classname replace class try input stream cls input cl get resource as stream class file name java class new class parser cls input class file name parse catch ioexception io ex not sure what to do here repackage and throw io ex print stack trace
open the classfile and parse it in to the bcel library
public void set use external file boolean b if javadoc1 use external file b
work around command line length limit by using an external file
public void set maxmemory string max if javadoc1 cmd create argument set value j mx max else cmd create argument set value j xmx max
set the maximum memory to be used by the javadoc process
public void test java to jvm string javadoc sig int long string javadoc return type void string converted descriptor util convert javadoc sig javadoc return type system out println converted converted assert equals not equal ij v converted
test the conversion of method signatures from java javadoc format
public string get as string return trans attribute
return a string representation of the transactional attribute
public string get storage hint return storage hint
returns the storage hint value
public string get method pattern return method pattern
return the method pattern
public string to string return method pattern
print out the data contents of the class
public void set sourcepath path src if source path null source path src else source path append src
specify where to find source file
public void do nothing system out println doing nothing
do nothing method
public path create sourcepath if source path null source path new path project return source path create path
create a path to be configured with the locations of the source
public void set sourcepath ref reference r create sourcepath set refid r
adds a reference to a classpath defined elsewhere
public void set destdir file dir dest dir dir
set the directory where the javadoc output will be generated
public void set sourcefiles string src string tokenizer tok new string tokenizer src while tok has more tokens string f tok next token source file sf new source file sf set file project resolve file f add source sf
set the list of source files to process
public void add source source file sf source files add element sf
add a single source file
public void set packagenames string packages string tokenizer tok new string tokenizer packages while tok has more tokens string p tok next token package name pn new package name pn set name p add package pn
set the package names to be processed
public void add package package name pn package names add element pn
add a single package to be processed
public void set exclude package names string packages string tokenizer tok new string tokenizer packages while tok has more tokens string p tok next token package name pn new package name pn set name p add exclude package pn
set the list of packages to be excluded
public void add exclude package package name pn exclude package names add element pn
add a package to be excluded from the javadoc run
public void add fileset file set fs file sets add element fs
adds a fileset
public void set classpath path path if classpath null classpath path else classpath append path
set the classpath to be used for this javadoc run
public path create classpath if classpath null classpath new path project return classpath create path
create a path to be configured with the classpath to use
public void set doclet path path doclet path this doclet path doclet path
set the classpath used to find the doclet class
private void add file sets vector sf enumeration enum file sets elements while enum has more elements file set fs file set enum next element if fs has patterns fs has selectors fs file set fs clone fs create include set name java file base dir fs get dir get project directory scanner ds fs get directory scanner get project string files ds get included files for int i 0 i files length i sf add element new source file new file base dir files i
add the files matched by the nested filesets to the vector as
public int get field order return this field order
gets the position of the code field code in the validation list
public void set field order int field order this field order field order
sets the position of the code field code in the validation list
public string get indexed property return this indexed property
gets the indexed property name of the field
public void set indexed property string indexed property this indexed property indexed property
sets the indexed property name of the field
public string get indexed list property return this indexed list property
gets the indexed property name of the field
public void set indexed list property string indexed list property this indexed list property indexed list property
sets the indexed property name of the field
public string get depends return this depends
gets the validation rules for this field as a comma separated list
public void set depends string depends this depends depends this dependency list clear string tokenizer st new string tokenizer depends while st has more tokens string depend st next token trim if depend null depend length 0 this dependency list add depend
sets the validation rules for this field as a comma separated list
public void add msg msg msg h msgs put msg get name msg
add a code msg code to the code field code
public string get msg string key msg msg get message key return msg null null msg get key
retrieve a message value
public msg get message string key return msg h msgs get key
retrieve a message object
public map get messages return collections unmodifiable map h msgs
the code field code s messages are returned as an
public boolean is client validation return this client validation
determines whether client side scripting should be generated
public void set client validation boolean client validation this client validation client validation
sets the flag that determines whether client side scripting should
public void add arg arg arg todo this first if check can go away after arg0 etc are removed from dtd if arg null arg get key null arg get key length 0 return determine arg position arg ensure args capacity arg map arg map this args arg get position if arg map null arg map new hash map this args arg get position arg map if arg get name null arg map put default arg arg else arg map put arg get name arg
add an code arg code to the replacement argument list
private void ensure args capacity arg arg if arg get position this args length map new args new map arg get position 1 system arraycopy this args 0 new args 0 this args length this args new args
ensures that the args array can hold the given arg
public arg get arg int position return this get arg default arg position
gets the default code arg code object at the given position
public arg get arg string key int position if position this args length this args position null return null arg arg arg args position get key didn t find default arg so exit otherwise we would get into infinite recursion if arg null key equals default arg return null return arg null this get arg position arg
gets the code arg code object at the given position
public void add var var v this h vars put v get name v
add a code var code to the code field code
public void add var string name string value string js type this add var new var name value js type
add a code var code based on the values passed in to the
public var get var string main key return var h vars get main key
retrieve a variable
protected boolean is merged return merged
has this form set been merged
protected int get type if get variant null if get language null get country null throw new null pointer exception when variant is specified country and language must be specified return variant formset else if get country null if get language null throw new null pointer exception when country is specified language must be specified return country formset else if get language null return language formset else return global formset
returns the type of code form set code code global formset code
protected void merge form set depends if depends null map p forms get forms map d forms depends get forms for iterator it d forms key set iterator it has next object key it next form p form form p forms get key if p form null merge but principal rules don t overwrite anything p form merge form d forms get key else just add add form form d forms get key merged true
merges the given code form set code into this one
public string get var value string main key string value null object o h vars get main key if o null o instanceof var var v var o value v get value return value
retrieve a variables value
public map get vars return collections unmodifiable map h vars
the code field code s variables are returned as an
public void add constant string name string value if constants contains key name get log error constant name already exists in form set this display key ignoring else constants put name value
add a code constant code to the locale level
public string get key if this key null this generate key return this key
gets a unique key based on the property and indexed property fields
public void add form form f string form name f get name if forms contains key form name get log error form form name already exists in form set this display key ignoring else forms put f get name f
add a code form code to the code form set code
public form get form string form name return form this forms get form name
retrieve a code form code based on the form name
public string display key string buffer results new string buffer if language null language length 0 results append language results append language if country null country length 0 if results length 0 results append results append country results append country if variant null variant length 0 if results length 0 results append results append variant results append variant if results length 0 results append default return results to string
returns a string representation of the objects key
public string to string string buffer results new string buffer results append form set language results append language results append country results append country results append variant results append variant results append n for iterator i get forms values iterator i has next results append results append i next results append n return results to string
returns a string representation of the object
private log get log if log null log log factory get log form set class return log
accessor method for log instance
public object create object attributes attributes throws exception validator resources resources validator resources digester peek 0 string language attributes get value language string country attributes get value country string variant attributes get value variant return create form set resources language country variant
p create or retrieve a code form set code for the specified
private log get log if log null log log factory get log form set factory class return log
accessor method for log instance
public boolean is indexed return indexed list property null indexed list property length 0
if there is a value specified for the indexed property field then
public boolean is resource return this resource
tests whether or not the value is a resource key or literal value
public void set resource boolean resource this resource resource
sets whether or not the value is a resource
public string get bundle return this bundle
returns the resource bundle name
public string get js type return this js type
gets the java script type of the variable
public void set js type string js type this js type js type
sets the java script type of the variable
public object clone try return super clone catch clone not supported exception e throw new runtime exception e to string
creates and returns a copy of this object
public string to string string buffer results new string buffer results append var name results append name results append value results append value results append resource results append resource if resource results append bundle results append bundle results append js type results append js type results append n return results to string
returns a string representation of the object
private void process vars string key string replace value iterator i this h vars key set iterator while i has next string var key string i next var var this get var var key var set value validator utils replace var get value key replace value
replace the vars value with the key value pairs passed in
public void set parameter string parameter class name object parameter value this parameters put parameter class name parameter value
set a parameter of a pluggable validation method
public object get parameter value string parameter class name return this parameters get parameter class name
returns the value of the specified parameter that will be used during the
private void process message components string key string replace value string var key token start token var process messages if key null key starts with var key for iterator i h msgs values iterator i has next msg msg msg i next msg set key validator utils replace msg get key key replace value this process arg key replace value
replace the args key value with the key value pairs passed in
private void process arg string key string replace value for int i 0 i this args length i map arg map this args i if arg map null continue iterator iter arg map values iterator while iter has next arg arg arg iter next if arg null arg set key validator utils replace arg get key key replace value
replace the arg code collection code key value with the key value
public void clear this form name null this field name null this parameters new hash map this page 0
clears the form name resources that were added and the page that was
public boolean get use context class loader return this use context class loader
return the boolean as to whether the context classloader should be used
public boolean is dependency string validator name return this dependency list contains validator name
checks if the validator is listed as a dependency
public void set use context class loader boolean use this use context class loader use
determine whether to use the context class loader the one found by
public class loader get class loader if this class loader null return this class loader if this use context class loader class loader context loader thread current thread get context class loader if context loader null return context loader return this get class get class loader
return the class loader to be used for instantiating application objects
public validator results validate throws validator exception locale locale locale this get parameter value locale param if locale null locale locale get default this set parameter validator param this form form this resources get form locale this form name if form null this set parameter form param form return form validate this parameters this resources get validator actions this page this field name return new validator results
performs validations based on the configured resources
public list get dependency list return collections unmodifiable list this dependency list
gets an unmodifiable code list code of the dependencies in the same
public boolean get only return errors return only return errors
returns true if the validator is only returning fields that fail validation
public void set only return errors boolean only return errors this only return errors only return errors
configures which fields the validator returns from the validate method
public boolean is valid string email return org apache commons validator routines email validator get instance is valid email
p checks if a field has a valid e mail address
protected boolean is valid domain string domain boolean symbolic false see if domain is an ip address in brackets matcher ip domain matcher ip domain pattern matcher domain if ip domain matcher matches inet address validator inet address validator inet address validator get instance if inet address validator is valid ip domain matcher group 1 return true else domain is symbolic name symbolic domain pattern matcher domain matches if symbolic if is valid symbolic domain domain return false else return false return true
returns true if the domain component of an email address is valid
protected boolean is valid user string user return user pattern matcher user matches
returns true if the user component of an email address is valid
protected boolean is valid ip address string ip address matcher ip address matcher ip domain pattern matcher ip address for int i 1 i 4 i string ip segment ip address matcher group i if ip segment null ip segment length 0 return false int i ip segment 0 try i ip segment integer parse int ip segment catch number format exception e return false if i ip segment 255 return false return true
validates an ip address
protected string strip comments string email str string result email str string comment pat 111111 pattern comment matcher pattern compile comment pat while comment matcher matcher result matches result replace first comment pat 1 return result
recursively remove comments and replace with a single space
public string to string string buffer results new string buffer results append arg name results append name results append key results append key results append position results append position results append bundle results append bundle results append resource results append resource results append n return results to string
returns a string representation of the object
public void add string validator name boolean result this add validator name result null
add the result of a validator action
public void add string validator name boolean result object value h action put validator name new result status result value
add the result of a validator action
public boolean contains action string validator name return h action contains key validator name
indicate whether a specified validator is in the result
public boolean is valid string validator name result status status result status h action get validator name return status null false status is valid
indicate whether a specified validation passed
public object get result string validator name result status status result status h action get validator name return status null null status get result
return the result of a validation
public iterator get actions return collections unmodifiable map h action key set iterator
return an iterator of the action names contained in this result