parses ninja target using { @ link ninja scope } of the file , where it is defined , to expand variables

public ninja target parse ninja target ( ninja scope file scope , long offset ) throws generic parsing exception { ninja target builder builder = ninja target builder ( file scope , offset , name interner ) ; parse expected ( ninja token build ) ; map < input output kind , list < ninja variable value > > path values map = parse target dependencies part ( builder ) ; ninja scope target scope = parse target variables ( offset , file scope , builder ) ; / / variables from the build statement can be used in the input and output paths , so / / we are using target scope to resolve paths values for ( map entry < input output kind , list < ninja variable value > > entry : path values map entry set ( ) ) { list < path fragment > paths = entry get value ( ) stream ( ) map ( value - > path fragment interner intern ( path fragment create ( target scope get expanded value ( long max value , value ) ) ) ) collect ( collectors to list ( ) ) ; input output kind input output kind = entry get key ( ) ; if ( input output kind instanceof input kind ) { builder add inputs ( ( input kind ) input output kind , paths ) ; } else { builder add outputs ( ( output kind ) input output kind , paths ) ; } } return builder build ( ) ; }


creates a new file in the specified directory , with the specified name and the specified file contents this method will add a newline terminator to the end of the contents string in the destination file

private file create file ( file directory , string name , string contents ) throws i o exception { file new file = new file ( directory , name ) ; print writer pw = new print writer ( new file ) ; try { pw println ( contents ) ; } finally { pw close ( ) ; } return new file ; }


public response entity < void > add pet ( @ api param ( value = " pet object that needs to be added to the store " , required = true ) @ valid @ request body pet body ) { return delegate add pet ( body ) ; }


adds a new update to the list , merging it with any existing one with the same subject

public void add ( item update update ) { item id value subject = update get item id ( ) ; if ( index contains key ( subject ) ) { int i = index get ( subject ) ; item update old update = updates get ( i ) ; updates set ( i , old update merge ( update ) ) ; } else { index put ( subject , updates size ( ) ) ; updates add ( update ) ; } }


returns all test status artifacts associated with a given target whose runs have yet to finish

public collection < artifact > get incomplete runs for testing ( configured target target ) { return aggregators get ( as key ( target ) ) get incomplete runs for testing ( ) ; }


tests that records are broadcast via { @ link record writer # broadcast emit ( i o readable writable ) }

public void test broadcast emit record ( ) throws exception { final int number of channels = 4 ; final int buffer size = 32 ; final int num values = 8 ; final int serialization length = 4 ; final result partition partition = create result partition ( buffer size , number of channels ) ; final record writer < serialization test type > writer = create record writer ( partition ) ; final record deserializer < serialization test type > deserializer = new spilling adaptive spanning record deserializer < > ( new string [ ] { temp folder get root ( ) get absolute path ( ) } ) ; final array deque < serialization test type > serialized records = new array deque < > ( ) ; final iterable < serialization test type > records = util random records ( num values , serialization test type factory int ) ; for ( serialization test type record : records ) { serialized records add ( record ) ; writer broadcast emit ( record ) ; } final int num required buffers = num values / ( buffer size / ( 4 + serialization length ) ) ; if ( is broadcast writer ) { assert equals ( num required buffers , partition get buffer pool ( ) best effort get num of used buffers ( ) ) ; } else { assert equals ( num required buffers * number of channels , partition get buffer pool ( ) best effort get num of used buffers ( ) ) ; } for ( int i = 0 ; i < number of channels ; i + + ) { assert equals ( num required buffers , partition get number of queued buffers ( i ) ) ; result subpartition view view = partition create subpartition view ( i , new no op buffer availablity listener ( ) ) ; verify deserialization results ( view , deserializer , serialized records clone ( ) , num required buffers , num values ) ; } }


public string [ ] get path elements ( ) { return as array ( ) ; }


public static < e > array deque < e > new array deque ( ) { return new array deque < e > ( ) ; }


find the fields constant that matches name , or null if its not found

public static fields find by name ( string name ) { return by name get ( name ) ; }


public static synchronized dummy clock use dummy clock ( long time stamp mills ) { instance = new dummy clock ( time stamp mills ) ; return ( dummy clock ) instance ; }


get petfind by tags : finds pets by tags multiple tags can be provided with comma separated strings use tag 1 , tag 2 , tag 3 for testing

com netflix hystrix hystrix command < response entity < list < pet > > > find pets by tags ( @ not null @ api param ( value = " tags to filter by " , required = true ) @ valid @ request param ( value = " tags " , required = true ) list < string > tags ) ;


returns true if the path component ( i e directory ) of this uri is absolute this method is a wrapper for { @ link # is uri path absolute ( ) }

public boolean is absolute ( ) { return is uri path absolute ( ) ; }


public string next c d a t a ( ) throws j s o n exception { char c ; int i ; string builder sb = new string builder ( ) ; for ( ; ; ) { c = next ( ) ; if ( end ( ) ) { throw syntax error ( " unclosed cdata " ) ; } sb append ( c ) ; i = sb length ( ) - 3 ; if ( i > = 0 & & sb char at ( i ) = = ' ] ' & & sb char at ( i + 1 ) = = ' ] ' & & sb char at ( i + 2 ) = = ' > ' ) { sb set length ( i ) ; return sb to string ( ) ; } } }


bit matrix build function pattern ( ) { int dimension = get dimension for version ( ) ; bit matrix bit matrix = new bit matrix ( dimension ) ; / / top left finder pattern + separator + format bit matrix set region ( 0 , 0 , 9 , 9 ) ; / / top right finder pattern + separator + format bit matrix set region ( dimension - 8 , 0 , 8 , 9 ) ; / / bottom left finder pattern + separator + format bit matrix set region ( 0 , dimension - 8 , 9 , 8 ) ; / / alignment patterns int max = alignment pattern centers length ; for ( int x = 0 ; x < max ; x + + ) { int i = alignment pattern centers [ x ] - 2 ; for ( int y = 0 ; y < max ; y + + ) { if ( ( x ! = 0 | | ( y ! = 0 & & y ! = max - 1 ) ) & & ( x ! = max - 1 | | y ! = 0 ) ) { bit matrix set region ( alignment pattern centers [ y ] - 2 , i , 5 , 5 ) ; } / / else no o alignment patterns near the three finder patterns } } / / vertical timing pattern bit matrix set region ( 6 , 9 , 1 , dimension - 17 ) ; / / horizontal timing pattern bit matrix set region ( 9 , 6 , dimension - 17 , 1 ) ; if ( version number > 6 ) { / / version info , top right bit matrix set region ( dimension - 11 , 0 , 3 , 6 ) ; / / version info , bottom left bit matrix set region ( 0 , dimension - 11 , 6 , 3 ) ; } return bit matrix ; }


this implementation compares the underlying class path locations

public boolean equals ( @ nullable object other ) { if ( this = = other ) { return true ; } if ( ! ( other instanceof class path resource ) ) { return false ; } class path resource other res = ( class path resource ) other ; return ( this path equals ( other res path ) & & object utils null safe equals ( this class loader , other res class loader ) & & object utils null safe equals ( this clazz , other res clazz ) ) ; }


get message showing currently executing actions

private string get execution status message ( map < action execution metadata , pair < string , long > > status map ) { int count = status map size ( ) ; string builder s = count ! = 1 ? new string builder ( " still waiting for " ) append ( count ) append ( " jobs to complete : " ) : new string builder ( " still waiting for 1 job to complete : " ) ; long current time = clock nano time ( ) ; / / a tree is just as fast as hash set for small data sets set < string > statuses = new tree set < > ( ) ; for ( map entry < action execution metadata , pair < string , long > > entry : status map entry set ( ) ) { statuses add ( entry get value ( ) first ) ; } for ( string status : statuses ) { append group status ( s , status map , status , current time ) ; } return s to string ( ) ; }


return the first readable image file for the given txid and image type , or null if no such image can be found

file find image file ( name node file nnf , long txid ) { return find file ( name node dir type image , get name node file name ( nnf , txid ) ) ; }


public static < t > byte [ ] to bytes ( serialization context context , object codec < t > codec , t value ) throws i o exception , serialization exception { byte array output stream bytes = new byte array output stream ( ) ; coded output stream coded out = coded output stream new instance ( bytes ) ; codec serialize ( context , value , coded out ) ; coded out flush ( ) ; return bytes to byte array ( ) ; }


returns the size ( in bytes ) of the raw data for the data section

public long get initialized data size ( ) { return o dsize ; }


set the ( new ) value of the { @ code connection } header

public void set connection ( list < string > connection ) { set ( connection , to comma delimited string ( connection ) ) ; }


creates a new user account by registering a j b crypt hashed password with the user

public user create account with hashed password ( string user name , string hashed password ) throws i o exception { if ( ! password encoder is password hashed ( hashed password ) ) { throw new illegal argument exception ( " this method should only be called with a pre - hashed password " ) ; } user user = user get by id ( user name , true ) ; user add property ( details from hashed password ( hashed password ) ) ; security listener fire user created ( user get id ( ) ) ; return user ; }


build a host and port instance from a host only note : non - bracketed i pv 6 literals are allowed use { @ link # require brackets for i pv 6 ( ) } to prohibit these

public static host and port from host ( string host ) { host and port parsed host = from string ( host ) ; check argument ( ! parsed host has port ( ) , " host has a port : % s " , host ) ; return parsed host ; }


override this method if you want to do something when the dialog is made visible

protected void dialog shown ( ) { / / may be overridden by subclasses }


example of when we round past when local clocks were wound backwards , and then past the time they were wound forwards before that so , we jumped back a long , long way

public void test interval two transitions ( ) { zone id tz = zone id of ( " america / detroit " ) ; rounding rounding = rounding builder ( time value time value days ( 279 ) ) time zone ( tz ) build ( ) ; assert that ( rounding round ( time ( " 1982 - 11 - 10t02 : 51 : 22 662z " ) ) , is date ( time ( " 1982 - 03 - 23t05 : 00 : 00z " ) , tz ) ) ; }


order by task owner ( needs to be followed by { @ link # asc ( ) } or { @ link # desc ( ) } )


find and apply a matching dynamic template returns { @ code true } if a template could be found , { @ code false } otherwise

private static boolean apply matching template ( parse context context , string name , dynamic template x content field type match type , date formatter date formatter ) throws i o exception { dynamic template dynamic template = context root ( ) find template ( context path ( ) , name , match type ) ; if ( dynamic template = = null ) { return false ; } string dynamic type = dynamic template is runtime mapping ( ) ? match type default runtime mapping type ( ) : match type default mapping type ( ) ; string mapping type = dynamic template mapping type ( dynamic type ) ; map < string , object > mapping = dynamic template mapping for name ( name , dynamic type ) ; if ( dynamic template is runtime mapping ( ) ) { mapper type parser parser context parser context = context parser context ( date formatter ) ; runtime field type parser parser = parser context runtime field type parser ( mapping type ) ; string full name = context path ( ) path as text ( name ) ; if ( parser = = null ) { throw new mapper parsing exception ( " failed to find type parsed [ " + mapping type + " ] for [ " + full name + " ] " ) ; } runtime field type runtime field type = parser parse ( full name , mapping , parser context ) ; runtime create dynamic field ( runtime field type , context ) ; } else { mapper builder builder = parse mapping ( name , mapping type , mapping , date formatter , context ) ; concrete create dynamic field ( builder , context ) ; } return true ; }


checks whether the given string is entirely made up of ascii digits

private boolean is digits string valid ( string string ) { for ( int i = 0 ; i < string length ( ) ; i + + ) { char c = string char at ( i ) ; if ( c < ' 0 ' | | c > ' 9 ' ) { return false ; } } return true ; }


public source type [ ] get stack variable sources ( ) { return stack var sources ; }


copies { @ code num bytes } bytes from the source to this view

void write ( data input view source , int num bytes ) throws i o exception ;


returns true if field func args is set ( has been assigned a value ) and false otherwise

public boolean is set func args ( ) { return this func args ! = null ; }


test that blocks which are in the wrong location are ignored

public void test ignore misplaced block ( ) throws exception { configuration conf = new configuration ( ) ; / / set a really long scan period conf set long ( dfs datanode scan period hours key , 100l ) ; conf set ( internal volume scanner scan result handler , test scan result handler class get name ( ) ) ; conf set long ( internal dfs block scanner cursor save interval ms , 0l ) ; final test context ctx = new test context ( conf , 1 ) ; final int num files = 4 ; ctx create files ( 0 , num files , 5 ) ; materialized replica unreachable replica = ctx get materialized replica ( 0 , 1 ) ; extended block unreachable block = ctx get file block ( 0 , 1 ) ; unreachable replica make unreachable ( ) ; final test scan result handler info info = test scan result handler get info ( ctx volumes get ( 0 ) ) ; string storage i d = ctx volumes get ( 0 ) get storage i d ( ) ; synchronized ( info ) { info sem = new semaphore ( num files ) ; info should run = true ; info notify ( ) ; } / / scan the first 4 blocks log info ( " waiting for the blocks to be scanned " ) ; generic test utils wait for ( new supplier < boolean > ( ) { @ override public boolean get ( ) { synchronized ( info ) { if ( info blocks scanned > = num files - 1 ) { log info ( " info = { } block scanned has now reached " + info blocks scanned , info ) ; return true ; } else { log info ( " info = { } waiting for block scanned to reach " + ( num files - 1 ) , info ) ; return false ; } } } } , 50 , 30000 ) ; / / we should have scanned 4 blocks synchronized ( info ) { assert false ( info good blocks contains ( unreachable block ) ) ; assert false ( info bad blocks contains ( unreachable block ) ) ; assert equals ( " expected 3 good blocks " , 3 , info good blocks size ( ) ) ; info good blocks clear ( ) ; assert equals ( " expected 3 blocks scanned " , 3 , info blocks scanned ) ; assert equals ( " did not expect bad blocks " , 0 , info bad blocks size ( ) ) ; info blocks scanned = 0 ; } info sem release ( 1 ) ; ctx close ( ) ; }


gets the total number of atn lookahead operations for sll prediction across all decisions made during parsing

public long get total s l l a t n lookahead ops ( ) { decision info [ ] decisions = atn simulator get decision info ( ) ; long k = 0 ; for ( int i = 0 ; i < decisions length ; i + + ) { k + = decisions [ i ] sll a t n transitions ; } return k ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( java lang object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


dumps dfs data structures into specified file

public void meta save ( string pathname ) throws i o exception { check open ( ) ; try ( trace scope ignored = tracer new scope ( " meta save " ) ) { namenode meta save ( pathname ) ; } }


creates a processor based on the specified map of maps config

processor create ( map < string , factory > processor factories , string tag , string description , map < string , object > config ) throws exception ;


get the response encoding if explicitly defined in the response , { code null } otherwise

private string get defined encoding ( mock http servlet response response ) { return ( response is charset ( ) ? response get character encoding ( ) : null ) ; }


get a cached peer connected to the given data node

public peer get ( datanode i d dn id , boolean is domain ) { if ( capacity < = 0 ) { / / disabled return null ; } return get internal ( dn id , is domain ) ; }


the same as { @ link # install navitve library a b i ( context , string ) } but it can be called before calling { @ link tinker installer # install }

public static boolean install native library a b i without tinker installed ( application like app like , string current a b i ) { final string current version = tinker application helper get current version ( app like ) ; if ( share tinker internals is null or nil ( current version ) ) { share tinker log e ( tag , " failed to get current patch version " ) ; return false ; } final file patch directory = share patch file util get patch directory ( app like get application ( ) ) ; if ( patch directory = = null ) { share tinker log e ( tag , " failed to get current patch directory " ) ; return false ; } file patch version directory = new file ( patch directory get absolute path ( ) + " / " + share patch file util get patch version directory ( current version ) ) ; file lib path = new file ( patch version directory get absolute path ( ) + " / lib / lib / " + current a b i ) ; if ( ! lib path exists ( ) ) { share tinker log e ( tag , " tinker lib path [ % s ] is not exists " , lib path ) ; return false ; } final class loader class loader = app like get application ( ) get class loader ( ) ; if ( class loader = = null ) { share tinker log e ( tag , " classloader is null " ) ; return false ; } else { share tinker log i ( tag , " before hack classloader : " + class loader to string ( ) ) ; try { final method install native library path method = tinker load library class get declared method ( " install native library path " , class loader class , file class ) ; install native library path method set accessible ( true ) ; install native library path method invoke ( null , class loader , lib path ) ; return true ; } catch ( throwable thr ) { share tinker log e ( tag , " install native library path fail : " + lib path + " , thr : " + thr ) ; return false ; } finally { share tinker log i ( tag , " after hack classloader : " + class loader to string ( ) ) ; } } }


test that we can recover properly after a failed build

public void test failure recovery ( ) throws exception { / / [ action ] - > foo artifact foo = create derived artifact ( " foo " ) ; callable < void > make foo = new callable < void > ( ) { @ override public void call ( ) throws i o exception { throw new i o exception ( " building ' foo ' is supposed to fail " ) ; } } ; register action ( new test action ( make foo , empty nested set , immutable set of ( foo ) ) ) ; / / [ action ] - > bar artifact bar = create derived artifact ( " bar " ) ; register action ( new test action ( test action no effect , empty nested set , immutable set of ( bar ) ) ) ; / / don ' t fail fast when we encounter the error reporter remove handler ( fail fast handler ) ; / / test that building ' foo ' fails build failed exception e = assert throws ( build failed exception class , ( ) - > build artifacts ( foo ) ) ; if ( ! e get message ( ) contains ( " building ' foo ' is supposed to fail " ) ) { throw e ; } / / make sure the reporter reported the error message assert contains event ( " building ' foo ' is supposed to fail " ) ; / / test that a subsequent build of ' bar ' succeeds build artifacts ( bar ) ; }


public void test quota on truncate with snapshot ( ) throws exception { path root = new path ( " / " ) ; path dir path = new path ( root , " dir " ) ; assert true ( fs mkdirs ( dir path ) ) ; path file path = new path ( dir path , " file " ) ; d f s test util create file ( fs , file path , 10 , ( short ) 3 , 0 ) ; / / verify quotausage and content summary after creating snapshot fs allow snapshot ( dir path ) ; fs create snapshot ( dir path , " s 1 " ) ; assert equals ( fs get content summary ( root ) get space consumed ( ) , fs get quota usage ( root ) get space consumed ( ) ) ; / / truncating the file size to 5bytes boolean blockrecovery = fs truncate ( file path , 5 ) ; if ( ! blockrecovery ) { check block recovery ( file path , fs , 300 , 100l ) ; } / / verify quotausage and content summary after truncating file which exists / / in snapshot assert equals ( fs get content summary ( root ) get space consumed ( ) , fs get quota usage ( root ) get space consumed ( ) ) ; / / verify quotausage and content summary after deleting snapshot / / now the quota of the file shouldn ' t present in quotausage and content / / summary fs delete snapshot ( dir path , " s 1 " ) ; assert equals ( fs get content summary ( root ) get space consumed ( ) , fs get quota usage ( root ) get space consumed ( ) ) ; }


create a ghidra script with the given name in the in the user ' s ghidra scripts , and link it in to the provided project

public static i file create ghidra script ( i folder script folder , string script name , string script author , string script category , string [ ] script description , i progress monitor monitor ) throws core exception , i o exception { / / create the scripts folder directory , if necessary if ( ! script folder exists ( ) ) { ghidra project utils create folder ( script folder , monitor ) ; } i file script file = script folder get file ( script name ) ; / / does the script exist already ? if so , it ' s a problem if ( script file exists ( ) ) { throw new i o exception ( " file already exists : " + script file ) ; } / / create the script file , and fill in a useful entry point try ( print writer writer = new print writer ( new file writer ( script file get location ( ) to file ( ) ) ) ) { if ( script name ends with ( " java " ) ) { arrays stream ( script description ) for each ( line - > writer println ( " / / " + line ) ) ; writer println ( " / / @ author " + script author ) ; writer println ( " / / @ category " + script category ) ; writer println ( " / / @ keybinding " ) ; writer println ( " / / @ menupath " ) ; writer println ( " / / @ toolbar " ) ; writer println ( ) ; writer println ( " import ghidra app script ghidra script ; " ) ; writer println ( ) ; writer println ( " public class " + script name substring ( 0 , script name length ( ) - 5 ) + " extends ghidra script { " ) ; writer println ( ) ; writer println ( " \ t @ override " ) ; writer println ( " \ tprotected void run ( ) throws exception { " ) ; writer println ( " \ t \ t / / todo : add script code here " ) ; writer println ( " \ t } " ) ; writer println ( " } " ) ; } else if ( script name ends with ( " py " ) ) { arrays stream ( script description ) for each ( line - > writer println ( " # " + line ) ) ; writer println ( " # @ author " + script author ) ; writer println ( " # @ category " + script category ) ; writer println ( " # @ keybinding " ) ; writer println ( " # @ menupath " ) ; writer println ( " # @ toolbar " ) ; writer println ( ) ; writer println ( " # todo : add script code here " ) ; } } catch ( i o exception e ) { throw new i o exception ( " failed to create : " + script file ) ; } / / refresh project to it sees the new script script file get project ( ) refresh local ( i resource depth infinite , monitor ) ; return script file ; }


the passed in { @ link path fragment } s can be associated uniquely to a { @ link file state value } with the following logic ( the same logic that ' s in { @ link containing package lookup function } ) : for each given file path , we look for the nearest ancestor directory ( starting with its parent directory ) , if any , that has a package the { @ link package lookup value } for this package tells us the package root that we should use for the { @ link rooted path } for the { @ link file state value } key for the reverse graph traversal , we are looking for all packages that are transitively reverse dependencies of those { @ link file state value } keys this function returns a collection of sky keys whose transitive reverse dependencies must contain the exact same set of packages note that there may not be nodes in the graph corresponding to the returned sky keys

private static collection < sky key > get sky keys for file fragments ( walkable graph graph , iterable < path fragment > path fragments ) throws interrupted exception { set < sky key > result = new hash set < > ( ) ; multimap < path fragment , path fragment > current to original = array list multimap create ( ) ; for ( path fragment path fragment : path fragments ) { current to original put ( path fragment , path fragment ) ; } while ( ! current to original is empty ( ) ) { multimap < sky key , path fragment > package lookup keys to original = array list multimap create ( ) ; multimap < sky key , path fragment > package lookup keys to current = array list multimap create ( ) ; for ( map entry < path fragment , path fragment > entry : current to original entries ( ) ) { path fragment current = entry get key ( ) ; path fragment original = entry get value ( ) ; for ( sky key package lookup key : get pkg lookup keys for file ( current ) ) { package lookup keys to original put ( package lookup key , original ) ; package lookup keys to current put ( package lookup key , current ) ; } / / the workspace file is a transitive dependency of every package unfortunately , there is / / no specific sky value that we can use to figure out under which package path entries it / / lives so we add a dependency on the workspace name value key if ( original equals ( current ) & & workspace file helper match workspace file name ( original ) ) { / / todo ( mschaller ) : this should not be checked at runtime these are constants ! preconditions check state ( label constants workspace file name get parent directory ( ) equals ( path fragment empty fragment ) , label constants workspace file name ) ; result add ( workspace name value key ( ) ) ; } } map < sky key , sky value > lookup values = graph get successful values ( package lookup keys to original key set ( ) ) ; for ( map entry < sky key , sky value > entry : lookup values entry set ( ) ) { sky key package lookup key = entry get key ( ) ; package lookup value package lookup value = ( package lookup value ) entry get value ( ) ; if ( package lookup value package exists ( ) ) { collection < path fragment > original files = package lookup keys to original get ( package lookup key ) ; preconditions check state ( ! original files is empty ( ) , entry ) ; for ( path fragment file name : original files ) { result add ( file state value key ( rooted path to rooted path ( package lookup value get root ( ) , file name ) ) ) ; } for ( path fragment current : package lookup keys to current get ( package lookup key ) ) { current to original remove all ( current ) ; } } } multimap < path fragment , path fragment > new current to original = array list multimap create ( ) ; for ( path fragment path fragment : current to original key set ( ) ) { path fragment parent = path fragment get parent directory ( ) ; if ( parent ! = null ) { new current to original put all ( parent , current to original get ( path fragment ) ) ; } } current to original = new current to original ; } return result ; }


registers an { @ link accept header locale resolver } under a well - known name unless already registered

private static void register locale resolver ( parser context context , @ nullable object source ) { if ( ! contains bean in hierarchy ( context , dispatcher servlet locale resolver bean name ) ) { root bean definition bean def = new root bean definition ( accept header locale resolver class ) ; bean def set source ( source ) ; bean def set role ( bean definition role infrastructure ) ; context get registry ( ) register bean definition ( dispatcher servlet locale resolver bean name , bean def ) ; context register component ( new bean component definition ( bean def , dispatcher servlet locale resolver bean name ) ) ; } }


retrieve the attributes of the annotation of the given type , if any ( i e if defined on the underlying element , as direct annotation or meta - annotation ) , also taking attribute overrides on composed annotations into account

default map < string , object > get annotation attributes ( string annotation name , boolean class values as string ) { merged annotation < annotation > annotation = get annotations ( ) get ( annotation name , null , merged annotation selectors first directly declared ( ) ) ; if ( ! annotation is present ( ) ) { return null ; } return annotation as annotation attributes ( adapt values ( class values as string , true ) ) ; }


sets the increment applied to the ticker whenever it is queried the default behavior is to auto increment by zero i e : the ticker is left unchanged when queried

public synchronized fake test clock set auto increment step ( duration auto increment step ) { if ( auto increment step to nanos ( ) < 0 ) { throw new illegal argument exception ( " may not auto - increment by a negative amount " ) ; } this auto increment step = auto increment step ; return this ; }


{ @ link option definition } is really a wrapper around a { @ link field } that caches information obtained through reflection checking that the fields they represent are equal is sufficient to check that two { @ link option definition } objects are equal

public boolean equals ( object object ) { if ( ! ( object instanceof option definition ) ) { return false ; } option definition other option = ( option definition ) object ; return field equals ( other option field ) ; }


create an instance using a default { @ link moshi } instance for conversion

public static moshi converter factory create ( ) { return create ( new moshi builder ( ) build ( ) ) ; }


returns a java io file that represents this file handle note the returned file will only be usable for { @ link file type # absolute } and { @ link file type # external } file handles

public file file ( ) { if ( type = = file type external ) return new file ( gdx files get external storage path ( ) , file get path ( ) ) ; return file ; }


verify if the movement selector gives the correct results

public void test movement ( ) { final var swimming creature = mock ( creature class ) ; when ( swimming creature get movement ( ) ) then return ( movement swimming ) ; final var flying creature = mock ( creature class ) ; when ( flying creature get movement ( ) ) then return ( movement flying ) ; final var swimming selector = new movement selector ( movement swimming ) ; assert true ( swimming selector test ( swimming creature ) ) ; assert false ( swimming selector test ( flying creature ) ) ; }


create a parameter value from the string given in the cli

public parameter value create value ( c l i command command , string value ) throws i o exception , interrupted exception { throw new abort exception ( " cli parameter submission is not supported for the " + get class ( ) + " type please file a bug report for this " ) ; }


closes the job services this method is called once the { @ link job table job } is being closed


returns true if field parallelism hint is set ( has been assigned a value ) and false otherwise

public boolean is set parallelism hint ( ) { return isset bit vector get ( parallelism hint isset id ) ; }


the context exposes this metadata for use in the processor normally , they are set by the kafka streams framework , but for the purpose of driving unit tests , you can set it directly setting this attribute doesn ' t affect the others

public void set partition ( final int partition ) { this partition = partition ; }


removes the function with the given entry point

public final void remove function at ( address entry point ) { delete function cmd cmd = new delete function cmd ( entry point ) ; cmd apply to ( current program ) ; }


check whether there has been at least one record appended to the batch

public boolean non empty ( ) { return num records ( ) > 0 ; }


indicates the number of entries in the exports table

public int get exports count ( ) { return exports count & 0xffff ; }


set a given key with value as address , for all the name service ids

private string [ ] setup address ( hdfs configuration conf , string key , int name service id count , int port offset ) { string [ ] values = new string [ name service id count ] ; for ( int i = 0 ; i < name service id count ; i + + , port offset + + ) { string ns i d = get name service id ( i ) ; string specific key = d f s util add key suffixes ( key , ns i d ) ; values [ i ] = " nn " + i + " : " + port offset ; conf set ( specific key , values [ i ] ) ; } return values ; }


returns a new { @ link builder } suitable for creating instances of module action context registry

public static builder builder ( ) { return new builder ( ) ; }


returns the current value being referenced , or { @ code null } if there is none ( e g because either it got collected , or { @ link # clear } was called , or it wasn ' t set in the first place )


public void set job token secret ( secret key token secret ) { this token secret = token secret ; }


get the url to use for binding where bind hostname can be specified to override the hostname in the web app u r l without scheme port specified in the web app u r l without scheme will be used

public static string get web app bind u r l ( configuration conf , string host property , string web app u r l without scheme ) { / / if the bind - host setting exists then it overrides the hostname / / portion of the corresponding web app u r l without scheme string host = conf get trimmed ( host property ) ; if ( host ! = null & & ! host is empty ( ) ) { if ( web app u r l without scheme contains ( " : " ) ) { web app u r l without scheme = host + " : " + web app u r l without scheme split ( " : " ) [ 1 ] ; } else { throw new yarn runtime exception ( " web app u r l without scheme must include port specification but doesn ' t : " + web app u r l without scheme ) ; } } return web app u r l without scheme ; }


update the view list if the the given path is the an ancestor of any of the paths currently in the view ; remove the descendant and add the ancestor path

private void update view list ( tree path path ) { program node node = ( program node ) path get last path component ( ) ; if ( ! tree has ancestors in view ( node ) & & ! view list contains ( path ) ) { for ( int i = 0 ; i < view list size ( ) ; i + + ) { tree path view path = view list get ( i ) ; if ( path is descendant ( view path ) ) { tree remove from view ( view path ) ; - - i ; } } tree add to view ( path ) ; } }


static void log cert ( string alias , x 5 0 9 certificate x 5 0 9 cert ) { x 5 0 0 principal subj = x 5 0 9 cert get subject x 5 0 0 principal ( ) ; x 5 0 0 principal issuer = x 5 0 9 cert get issuer x 5 0 0 principal ( ) ; date now = new date ( ) ; string label = alias ! = null ? ( alias + " : " ) : " " ; if ( now compare to ( x 5 0 9 cert get not after ( ) ) > 0 ) { msg warn ( application key store class , " " + label + get common name ( subj ) + " , issued by " + get common name ( issuer ) + " , s / n " + x 5 0 9 cert get serial number ( ) to string ( 16 ) + " , expired " + x 5 0 9 cert get not after ( ) + " * * expired * * " ) ; } else { msg info ( application key store class , " " + label + get common name ( subj ) + " , issued by " + get common name ( issuer ) + " , s / n " + x 5 0 9 cert get serial number ( ) to string ( 16 ) + " , expires " + x 5 0 9 cert get not after ( ) ) ; } }


public static void set nav bar light mode ( @ non null final activity activity , final boolean is light mode ) { set nav bar light mode ( activity get window ( ) , is light mode ) ; }


get the formatted string for the block length ; shown in decimal and hex in parens

string get length string ( ) { long length = block get size ( ) ; return length + " ( 0x " + long to hex string ( length ) + " ) " ; }


set buffer that can be read via the input stream interface and reset the input stream this has the same effect as creating a new byte array input stream with a new buffer

public void set buffer ( byte [ ] buf ) { this buf = buf ; this pos = 0 ; this count = buf length ; }


get set of namespace info ' s removing the already invoked namespaceinfo

private set < federation namespace info > get name space info ( string ns id ) { set < federation namespace info > namespace infos = new hash set < > ( ) ; for ( federation namespace info ns : namespace infos ) { if ( ! ns id equals ( ns get nameservice id ( ) ) ) { namespace infos add ( ns ) ; } } return namespace infos ; }


enter a parse tree produced by the { @ code process check } labeled alternative in { @ link eql base parser # boolean expression }

void enter process check ( eql base parser process check context ctx ) ;


return true if this category object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } category category = ( category ) o ; return objects equals ( this id , category id ) & & objects equals ( this name , category name ) ; }


use { @ link remote } as the serialized form

/ * package * / object write replace ( ) throws object stream exception { return new remote ( this , get channel for serialization ( ) ) ; } / / public static void main ( string [ ] args ) { / / / / dump everything / / logger set level ( level all ) ; / / console handler h = new console handler ( ) ; / / h set level ( level all ) ; / / logger add handler ( h ) ; / / / / solaris killer = ( solaris ) get ( ) ; / / solaris solaris system s = killer create system ( ) ; / / solaris solaris process p = s get ( integer parse int ( args [ 0 ] ) ) ; / / system out println ( p get env vars ( ) ) ; / / / / if ( args length = = 2 ) / / p kill ( ) ; / / }


returns the first eight bytes of { @ linkplain # as bytes ( ) this hashcode ' s bytes } , converted to a { @ code long } value in little - endian order


void set state ( queue state state ) { this state = state ; }


public void test json form data test ( ) throws api exception { / / string param = null ; / / string param 2 = null ; / / api test json form data ( param , param 2 ) ; / / todo : test validations }


this handles both load and store for dot accesses as necessary this uses build load store to stub out the appropriate load and store ir nodes

public void visit dot ( e dot user dot node , script scope script scope ) { expression node ir expression node ; if ( script scope has decoration ( user dot node , static type class ) ) { class < ? > static type = script scope get decoration ( user dot node , static type class ) get static type ( ) ; static node static node = new static node ( user dot node get location ( ) ) ; static node attach decoration ( new i r d expression type ( static type ) ) ; ir expression node = static node ; } else { boolean read = script scope get condition ( user dot node , read class ) ; boolean write = script scope get condition ( user dot node , write class ) ; boolean compound = script scope get condition ( user dot node , compound class ) ; location location = user dot node get location ( ) ; string index = user dot node get index ( ) ; class < ? > value type = script scope get decoration ( user dot node , value type class ) get value type ( ) ; value type prefix value type = script scope get decoration ( user dot node get prefix node ( ) , value type class ) ; expression node ir prefix node = ( expression node ) visit ( user dot node get prefix node ( ) , script scope ) ; expression node ir index node = null ; unary node ir store node = null ; expression node ir load node = null ; int access depth ; if ( prefix value type ! = null & & prefix value type get value type ( ) is array ( ) ) { load dot array length node ir load dot array length node = new load dot array length node ( location ) ; ir load dot array length node attach decoration ( new i r d expression type ( int class ) ) ; ir load node = ir load dot array length node ; access depth = 1 ; } else if ( prefix value type ! = null & & prefix value type get value type ( ) = = def class ) { if ( write | | compound ) { store dot def node ir store dot def node = new store dot def node ( location ) ; ir store dot def node attach decoration ( new i r d expression type ( read ? value type : void class ) ) ; ir store dot def node attach decoration ( new i r d store type ( value type ) ) ; ir store dot def node attach decoration ( new i r d value ( index ) ) ; ir store node = ir store dot def node ; } if ( write = = false | | compound ) { load dot def node ir load dot def node = new load dot def node ( location ) ; ir load dot def node attach decoration ( new i r d expression type ( value type ) ) ; ir load dot def node attach decoration ( new i r d value ( user dot node get index ( ) ) ) ; ir load node = ir load dot def node ; } access depth = 1 ; } else if ( script scope has decoration ( user dot node , standard painless field class ) ) { painless field painless field = script scope get decoration ( user dot node , standard painless field class ) get standard painless field ( ) ; if ( write | | compound ) { store dot node ir store dot node = new store dot node ( location ) ; ir store dot node attach decoration ( new i r d expression type ( read ? value type : void class ) ) ; ir store dot node attach decoration ( new i r d store type ( value type ) ) ; ir store dot node attach decoration ( new i r d field ( painless field ) ) ; ir store node = ir store dot node ; } if ( write = = false | | compound ) { load dot node ir load dot node = new load dot node ( location ) ; ir load dot node attach decoration ( new i r d expression type ( value type ) ) ; ir load dot node attach decoration ( new i r d field ( painless field ) ) ; ir load node = ir load dot node ; } access depth = 1 ; } else if ( script scope get condition ( user dot node , shortcut class ) ) { if ( write | | compound ) { store dot shortcut node ir store dot shortcut node = new store dot shortcut node ( location ) ; ir store dot shortcut node attach decoration ( new i r d expression type ( read ? value type : void class ) ) ; ir store dot shortcut node attach decoration ( new i r d store type ( value type ) ) ; ir store dot shortcut node attach decoration ( new i r d method ( script scope get decoration ( user dot node , setter painless method class ) get setter painless method ( ) ) ) ; ir store node = ir store dot shortcut node ; } if ( write = = false | | compound ) { load dot shortcut node ir load dot shortcut node = new load dot shortcut node ( location ) ; ir load dot shortcut node attach decoration ( new i r d expression type ( value type ) ) ; ir load dot shortcut node attach decoration ( new i r d method ( script scope get decoration ( user dot node , getter painless method class ) get getter painless method ( ) ) ) ; ir load node = ir load dot shortcut node ; } access depth = 1 ; } else if ( script scope get condition ( user dot node , map shortcut class ) ) { constant node ir constant node = new constant node ( location ) ; ir constant node attach decoration ( new i r d expression type ( string class ) ) ; ir constant node attach decoration ( new i r d constant ( index ) ) ; ir index node = ir constant node ; if ( write | | compound ) { store map shortcut node ir store map shortcut node = new store map shortcut node ( location ) ; ir store map shortcut node attach decoration ( new i r d expression type ( read ? value type : void class ) ) ; ir store map shortcut node attach decoration ( new i r d store type ( value type ) ) ; ir store map shortcut node attach decoration ( new i r d method ( script scope get decoration ( user dot node , setter painless method class ) get setter painless method ( ) ) ) ; ir store node = ir store map shortcut node ; } if ( write = = false | | compound ) { load map shortcut node ir load map shortcut node = new load map shortcut node ( location ) ; ir load map shortcut node attach decoration ( new i r d expression type ( value type ) ) ; ir load map shortcut node attach decoration ( new i r d method ( script scope get decoration ( user dot node , getter painless method class ) get getter painless method ( ) ) ) ; ir load node = ir load map shortcut node ; } access depth = 2 ; } else if ( script scope get condition ( user dot node , list shortcut class ) ) { constant node ir constant node = new constant node ( location ) ; ir constant node attach decoration ( new i r d expression type ( int class ) ) ; ir constant node attach decoration ( new i r d constant ( script scope get decoration ( user dot node , standard constant class ) get standard constant ( ) ) ) ; ir index node = ir constant node ; if ( write | | compound ) { store list shortcut node ir store list shortcut node = new store list shortcut node ( location ) ; ir store list shortcut node attach decoration ( new i r d expression type ( read ? value type : void class ) ) ; ir store list shortcut node attach decoration ( new i r d store type ( value type ) ) ; ir store list shortcut node attach decoration ( new i r d method ( script scope get decoration ( user dot node , setter painless method class ) get setter painless method ( ) ) ) ; ir store node = ir store list shortcut node ; } if ( write = = false | | compound ) { load list shortcut node ir load list shortcut node = new load list shortcut node ( location ) ; ir load list shortcut node attach decoration ( new i r d expression type ( value type ) ) ; ir load list shortcut node attach decoration ( new i r d method ( script scope get decoration ( user dot node , getter painless method class ) get getter painless method ( ) ) ) ; ir load node = ir load list shortcut node ; } access depth = 2 ; } else { throw user dot node create error ( new illegal state exception ( " illegal tree structure " ) ) ; } script scope put decoration ( user dot node , new access depth ( access depth ) ) ; ir expression node = build load store ( access depth , location , user dot node is null safe ( ) , ir prefix node , ir index node , ir load node , ir store node ) ; } script scope put decoration ( user dot node , new i r node decoration ( ir expression node ) ) ; }


see original { @ link stubber # do throw ( class ) }

b d d stubber will throw ( class < ? extends throwable > to be thrown ) ;


file { @ code version } contains the following fields : node type layout version namespace i d fs state creation time other fields specific for this node type the version file is always written last during storage directory updates the existence of the version file indicates that all other files have been successfully written in the storage directory , the storage is valid and does not need to be recovered

public file get version file ( ) { if ( root = = null ) { return null ; } return new file ( new file ( root , storage dir current ) , storage file version ) ; }


writes a jdom xml { @ link document } to a { @ link file } , with a prettier format than { @ link # write doc to file ( document , file ) }

public static void write pretty doc to file ( document doc , file dest ) throws i o exception { x m l outputter outputter = new x m l outputter ( ) ; outputter set format ( format get pretty format ( ) ) ; try ( file writer fw = new file writer ( dest ) ) { outputter output ( doc , fw ) ; } }


initialize direct field access for this data binder , as alternative to the default bean property access

public void init direct field access ( ) { assert state ( this binding result = = null , " data binder is already initialized - call init direct field access before other configuration methods " ) ; this direct field access = true ; }


returns the lesser of the two values according to this ordering if the values compare as 0 , the first is returned < b > implementation note : < b > this method is invoked by the default implementations of the other { @ code min } overloads , so overriding it will affect their behavior < b > note : < b > consider using { @ code comparators min ( a , b , this comparator ) } instead if { @ code this comparator } is { @ link ordering # natural } , then use { @ code comparators min ( a , b ) }

public < e extends t > e min ( @ nullable e a , @ nullable e b ) { return ( compare ( a , b ) < = 0 ) ? a : b ; }


populate the bean instance in the given bean wrapper with the property values from the bean definition

protected void populate bean ( string bean name , root bean definition mbd , @ nullable bean wrapper bw ) { if ( bw = = null ) { if ( mbd has property values ( ) ) { throw new bean creation exception ( mbd get resource description ( ) , bean name , " cannot apply property values to null instance " ) ; } else { / / skip property population phase for null instance return ; } } / / give any instantiation aware bean post processors the opportunity to modify the / / state of the bean before properties are set this can be used , for example , / / to support styles of field injection if ( ! mbd is synthetic ( ) & & has instantiation aware bean post processors ( ) ) { for ( instantiation aware bean post processor bp : get bean post processor cache ( ) instantiation aware ) { if ( ! bp post process after instantiation ( bw get wrapped instance ( ) , bean name ) ) { return ; } } } property values pvs = ( mbd has property values ( ) ? mbd get property values ( ) : null ) ; int resolved autowire mode = mbd get resolved autowire mode ( ) ; if ( resolved autowire mode = = autowire by name | | resolved autowire mode = = autowire by type ) { mutable property values new pvs = new mutable property values ( pvs ) ; / / add property values based on autowire by name if applicable if ( resolved autowire mode = = autowire by name ) { autowire by name ( bean name , mbd , bw , new pvs ) ; } / / add property values based on autowire by type if applicable if ( resolved autowire mode = = autowire by type ) { autowire by type ( bean name , mbd , bw , new pvs ) ; } pvs = new pvs ; } boolean has inst aware bpps = has instantiation aware bean post processors ( ) ; boolean needs dep check = ( mbd get dependency check ( ) ! = abstract bean definition dependency check none ) ; property descriptor [ ] filtered pds = null ; if ( has inst aware bpps ) { if ( pvs = = null ) { pvs = mbd get property values ( ) ; } for ( instantiation aware bean post processor bp : get bean post processor cache ( ) instantiation aware ) { property values pvs to use = bp post process properties ( pvs , bw get wrapped instance ( ) , bean name ) ; if ( pvs to use = = null ) { if ( filtered pds = = null ) { filtered pds = filter property descriptors for dependency check ( bw , mbd allow caching ) ; } pvs to use = bp post process property values ( pvs , filtered pds , bw get wrapped instance ( ) , bean name ) ; if ( pvs to use = = null ) { return ; } } pvs = pvs to use ; } } if ( needs dep check ) { if ( filtered pds = = null ) { filtered pds = filter property descriptors for dependency check ( bw , mbd allow caching ) ; } check dependencies ( bean name , mbd , filtered pds , pvs ) ; } if ( pvs ! = null ) { apply property values ( bean name , mbd , bw , pvs ) ; } }


return the bitmap with the specified color

public static bitmap draw color ( @ non null final bitmap src , @ color int final int color , final boolean recycle ) { if ( is empty bitmap ( src ) ) return null ; bitmap ret = recycle ? src : src copy ( src get config ( ) , true ) ; canvas canvas = new canvas ( ret ) ; canvas draw color ( color , porter duff mode darken ) ; return ret ; }


public void join ( ) throws interrupted exception { server join ( ) ; }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 0 : / / success return success ; default : return null ; } }


fix offset and length of block locations note that this method modifies the original array

static block location [ ] fix block locations ( block location [ ] locations , long start , long len , long file offset in har ) { / / offset 1 past last byte of desired range long end = start + len ; for ( block location location : locations ) { / / offset of part block relative to beginning of desired file / / ( may be negative if file starts in this part block ) long har block start = location get offset ( ) - file offset in har ; / / offset 1 past last byte of har block relative to beginning of / / desired file long har block end = har block start + location get length ( ) ; if ( start > har block start ) { / / desired range starts after beginning of this har block / / fix offset to beginning of relevant range ( relative to desired file ) location set offset ( start ) ; / / fix length to relevant portion of har block location set length ( location get length ( ) - ( start - har block start ) ) ; } else { / / desired range includes beginning of this har block location set offset ( har block start ) ; } if ( har block end > end ) { / / range ends before end of this har block / / fix length to remove irrelevant portion at the end location set length ( location get length ( ) - ( har block end - end ) ) ; } } return locations ; }


public void remove server ( internal instrumented < server stats > server ) { remove ( servers , server ) ; server socket map prev = per server sockets remove ( id ( server ) ) ; assert prev ! = null ; assert prev is empty ( ) ; }


regression test : make sure that if an evaluation fails before a dirty value starts evaluation ( in particular , before it is reset ) , the graph remains consistent

public void many dirty values clear children on error ( ) throws exception { many dirty values clear children on fail ( / * interrupt = * / false ) ; }


adds a part to the uploads without any size limitations this method is non - blocking and does not wait for the part upload to complete

public void upload part ( ref counted f s output stream file ) throws i o exception { / / this is to guarantee that nobody is / / writing to the file we are uploading check state ( file is closed ( ) ) ; final completable future < part e tag > future = new completable future < > ( ) ; uploads in progress add ( future ) ; final long part length = file get pos ( ) ; current upload info register new part ( part length ) ; file retain ( ) ; / / keep the file while the async upload still runs upload thread pool execute ( new upload task ( s 3 access helper , current upload info , file , future ) ) ; }


returns a map view that associates each key with the corresponding values in the multimap changes to the returned map , such as element removal , will update the underlying multimap the map does not support { @ code set value ( ) } on its entries , { @ code put } , or { @ code put all } when passed a key that is present in the map , { @ code as map ( ) get ( object ) } has the same behavior as { @ link # get } , returning a live collection when passed a key that is not present , however , { @ code as map ( ) get ( object ) } returns { @ code null } instead of an empty collection < b > note : < b > the returned map ' s values are guaranteed to be of type { @ link sorted set } to obtain this map with the more specific generic type { @ code map < k , sorted set < v > > } , call { @ link multimaps # as map ( sorted set multimap ) } instead < b > however < b > , the returned map itself is not necessarily a { @ link sorted map } : a { @ code sorted set multimap } must expose the values for a given key in sorted order , but it need not expose the keys in sorted order individual { @ code sorted set multimap } implementations , like those built with { @ link multimap builder # tree keys ( ) } , may make additional guarantees

map < k , collection < v > > as map ( ) ;


public void update row id ( string column label , row id x ) throws s q l exception { }


get a long parameter , or { @ code null } if not present throws an exception if it the parameter value isn ' t a number

public static long get long parameter ( servlet request request , string name ) throws servlet request binding exception { if ( request get parameter ( name ) = = null ) { return null ; } return get required long parameter ( request , name ) ; }


find a suitable parent for a method reference the method owner is not always a valid parent to dispatch to for instance , take the following example : < code > package a ; public class a { public void public method ( ) ; } package a ; class b extends a { public void public method ( ) ; } package b ; public class c extends b { } < code > when instrumenting c , the first method reference for " public method " is on class b which we cannot invoke directly since it ' s present on a private package b which is not located in the same package as c however c can still call the " public method " since it ' s defined on a which is a public class we cannot just blindly take the top most definition of " public method " hoping this is the accessible one since you can very well do : < code > package a ; class a { public void public method ( ) ; } package a ; public class b extends a { public void public method ( ) ; } package b ; public class c extends b { } < code > in that case , the top most parent class is the one defined the unaccessible method reference therefore , the solution is to walk up the hierarchy until we find the same method defined on an accessible class , if we cannot find such a method , the suitable parent is the parent class of the visited class which is legal ( but might consume a dex id )

string find parent class for method ( @ non null method reference method reference ) { logger verbose ( " method ref % 1 $ s access ( % 2 $ s ) - > owner % 3 $ s access ( % 4 $ s ) " , method reference method name , method reference method access , method reference owner name , method reference owner access ) ; / / if the method owner class is accessible from the visited class , just use that if ( is parent class visible ( method reference owner , class node ) ) { return method reference owner name ; } logger verbose ( " found an inaccessible method reference % 1 $ s " , method reference method name ) ; / / walk up the hierarchy , starting at the method reference owner iterator < class node > parent iterator = parent nodes iterator ( ) ; class node parent = parent iterator next ( ) ; while ( ! parent name equals ( method reference owner name ) & & parent iterator has next ( ) ) { parent = parent iterator next ( ) ; } while ( parent iterator has next ( ) ) { class node node = parent iterator next ( ) ; / / check that this parent is visible , there might be several layers of package / / private classes if ( is parent class visible ( node , class node ) ) { / / noinspection unchecked : asm api for ( method node method node : ( list < method node > ) node methods ) { / / do not reference bridge methods , they might not be translated into dex , or / / might disappear in the next javac compiler for that use case if ( method node name equals ( method reference method name ) & & method node desc equals ( method reference method desc ) & & ( method node access & ( opcodes acc bridge | opcodes acc abstract ) ) = = 0 ) { logger verbose ( " using class % 1 $ s for dispatching % 2 $ s : % 3 $ s " , node name , method reference method name , method reference method desc ) ; return node name ; } } } } logger verbose ( " using immediate parent for dispatching % 1 $ s " , method reference method desc ) ; return class node super name ; }


returns an iterator for the values in the map remove is supported if { @ link collections # allocate iterators } is false , the same iterator instance is returned each time this method is called use the { @ link entries } constructor for nested or multithreaded iteration

public values values ( ) { if ( collections allocate iterators ) return new values ( this ) ; if ( values 1 = = null ) { values 1 = new values ( this ) ; values 2 = new values ( this ) ; } if ( ! values 1 valid ) { values 1 reset ( ) ; values 1 valid = true ; values 2 valid = false ; return values 1 ; } values 2 reset ( ) ; values 2 valid = true ; values 1 valid = false ; return values 2 ; }


returns true if the arbiter runs in unbounded mode

public final boolean is unbounded ( ) { return unbounded ; }


public refresh response refresh ( refresh request refresh request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( refresh request , indices request converters : : refresh , options , refresh response : : from x content , empty set ( ) ) ; }


public int get table size ( ) { return get row size ( ) * get num rows ( ) ; }


returns a new { @ link wildcard type } with { @ code upper bound }

static wildcard type subtype of ( type upper bound ) { return new wildcard type impl ( new type [ 0 ] , new type [ ] { upper bound } ) ; }


sets the items visible in the list , clearing the selection if it is no longer valid if a selection is { @ link array selection # get required ( ) } , the first item is selected this can safely be called with a ( modified ) array returned from { @ link # get items ( ) }

public void set items ( array new items ) { if ( new items = = null ) throw new illegal argument exception ( " new items cannot be null " ) ; float old pref width = get pref width ( ) , old pref height = get pref height ( ) ; if ( new items ! = items ) { items clear ( ) ; items add all ( new items ) ; } over index = - 1 ; pressed index = - 1 ; selection validate ( ) ; invalidate ( ) ; if ( old pref width ! = get pref width ( ) | | old pref height ! = get pref height ( ) ) invalidate hierarchy ( ) ; }


returns the string value of the requested attribute , or - default value - if the attribute is missing or not the correct type

public string get string ( int attribute , string default value ) { d w a r f string attribute attr = get attribute ( attribute , d w a r f string attribute class ) ; return ( attr ! = null ) ? attr get value ( get program ( ) get debug strings ( ) ) : default value ; }


determines whether or not the current cluster state represents an entirely new cluster , either when a node joins a cluster for the first time or when the node receives a cluster state update from a brand new cluster ( different uuid from the previous cluster ) , which will happen when a master node is elected that has never been part of the cluster before

public boolean is new cluster ( ) { final string prev cluster u u i d = previous state metadata ( ) cluster u u i d ( ) ; final string curr cluster u u i d = state metadata ( ) cluster u u i d ( ) ; return prev cluster u u i d equals ( curr cluster u u i d ) = = false ; }


a { @ link cache loader } for a cache of stat calls input : ( path , following symlinks ) output : file status

private static cache loader < pair < path , symlinks > , object > new stat loader ( ) { return new cache loader < pair < path , symlinks > , object > ( ) { @ override public object load ( pair < path , symlinks > p ) { try { file status f = p first stat if found ( p second ) ; return ( f = = null ) ? no status : f ; } catch ( i o exception e ) { return e ; } } } ; }


creates a new comment to indicate a new group { @ link identity link } has been created or deleted , if history is enabled

void create group identity link comment ( string task id , string group id , string type , boolean create ) ;


protected void process tasks ( ) { collection < object > keys = get all task keys ( ) ; for ( object task key : keys ) { abstract delay task task = remove task ( task key ) ; if ( null = = task ) { continue ; } nacos task processor processor = get processor ( task key ) ; if ( null = = processor ) { get engine log ( ) error ( " processor not found for task , so discarded " + task ) ; continue ; } try { / / re add task if process failed if ( ! processor process ( task ) ) { retry failed task ( task key , task ) ; } } catch ( throwable e ) { get engine log ( ) error ( " nacos task execute error : " + e to string ( ) , e ) ; retry failed task ( task key , task ) ; } } }


the event definition on which the timer is based takes in an optional execution , if missing the { @ link no execution variable scope } will be used ( eg timer start event )

public static timer job entity create timer entity for timer event definition ( timer event definition timer event definition , boolean is interrupting timer , execution entity execution entity , string job handler type , string job handler config ) { process engine configuration impl process engine configuration = context get process engine configuration ( ) ; string business calendar ref = null ; expression expression = null ; expression manager expression manager = process engine configuration get expression manager ( ) ; / / act - 1415 : timer - declaration on start - event may contain expressions not / / evaluating variables but other context , evaluating should happen nevertheless variable scope scope for expression = execution entity ; if ( scope for expression = = null ) { scope for expression = no execution variable scope get shared instance ( ) ; } if ( string utils is not empty ( timer event definition get time date ( ) ) ) { business calendar ref = due date business calendar name ; expression = expression manager create expression ( timer event definition get time date ( ) ) ; } else if ( string utils is not empty ( timer event definition get time cycle ( ) ) ) { business calendar ref = cycle business calendar name ; expression = expression manager create expression ( timer event definition get time cycle ( ) ) ; } else if ( string utils is not empty ( timer event definition get time duration ( ) ) ) { business calendar ref = duration business calendar name ; expression = expression manager create expression ( timer event definition get time duration ( ) ) ; } if ( string utils is not empty ( timer event definition get calendar name ( ) ) ) { business calendar ref = timer event definition get calendar name ( ) ; expression business calendar expression = expression manager create expression ( business calendar ref ) ; business calendar ref = business calendar expression get value ( scope for expression ) to string ( ) ; } if ( expression = = null ) { throw new activiti exception ( " timer needs configuration ( either time date , time cycle or time duration is needed ) ( " + timer event definition get id ( ) + " ) " ) ; } business calendar business calendar = process engine configuration get business calendar manager ( ) get business calendar ( business calendar ref ) ; string due date string = null ; date duedate = null ; object due date value = expression get value ( scope for expression ) ; if ( due date value instanceof string ) { due date string = ( string ) due date value ; } else if ( due date value instanceof date ) { duedate = ( date ) due date value ; } else if ( due date value instanceof date time ) { / / joda time support duedate = ( ( date time ) due date value ) to date ( ) ; } else if ( due date value ! = null ) { throw new activiti exception ( " timer ' " + execution entity get activity id ( ) + " ' was not configured with a valid duration / time , either hand in a java util date or a string in format ' yyyy - mm - dd ' t ' hh : mm : ss ' " ) ; } if ( duedate = = null & & due date string ! = null ) { duedate = business calendar resolve duedate ( due date string ) ; } timer job entity timer = null ; if ( duedate ! = null ) { timer = context get command context ( ) get timer job entity manager ( ) create ( ) ; timer set job type ( job entity job type timer ) ; timer set revision ( 1 ) ; timer set job handler type ( job handler type ) ; timer set job handler configuration ( job handler config ) ; timer set exclusive ( true ) ; timer set retries ( process engine configuration get async executor number of retries ( ) ) ; timer set duedate ( duedate ) ; if ( execution entity ! = null ) { timer set execution ( execution entity ) ; timer set process definition id ( execution entity get process definition id ( ) ) ; timer set process instance id ( execution entity get process instance id ( ) ) ; / / inherit tenant identifier ( if applicable ) if ( execution entity get tenant id ( ) ! = null ) { timer set tenant id ( execution entity get tenant id ( ) ) ; } } } if ( string utils is not empty ( timer event definition get time cycle ( ) ) ) { / / see act - 1427 : a boundary timer with a cancel activity = ' true ' , doesn ' t need to repeat itself boolean repeat = ! is interrupting timer ; / / act - 1951 : intermediate catching timer events shouldn ' t repeat according to spec if ( execution entity ! = null ) { flow element current element = execution entity get current flow element ( ) ; if ( current element instanceof intermediate catch event ) { repeat = false ; } } if ( repeat ) { string prepared = prepare repeat ( due date string ) ; timer set repeat ( prepared ) ; } } if ( timer ! = null & & execution entity ! = null ) { timer set execution ( execution entity ) ; timer set process definition id ( execution entity get process definition id ( ) ) ; / / inherit tenant identifier ( if applicable ) if ( execution entity get tenant id ( ) ! = null ) { timer set tenant id ( execution entity get tenant id ( ) ) ; } } return timer ; }


creates a mock objc proto library rule in the current main workspace

public static void setup objc proto library ( scratch scratch ) throws exception { / / append file instead of creating one in case it already exists string tools repo = test constants tools repository ; scratch file ( " objc proto library / build " , " " ) ; scratch file ( " objc proto library / objc proto library bzl " , " def impl ( ctx ) : " , " return [ apple common new objc provider ( ) ] " , " " , " objc proto library = rule ( " , " impl , " , " attrs = { " , " ' deps ' : attr label list ( ) , " , " ' portable proto filters ' : attr label list ( allow files = true ) , " , " ' lib protobuf ' : attr label ( default = ' " + tools repo + " / / objcproto : protobuf lib ' ) , " , " } " , " ) " ) ; }


return the { @ link geo point } that is used for distance computations

public geo point origin ( ) { return origin ; }


a helper function for incompatible configured target ( ) to actually create the incompatible { @ link configured target }

private static configured target create incompatible configured target ( rule context rule context , @ nullable immutable list < configured target > targets responsible for incompatibility , @ nullable immutable list < constraint value info > violated constraints ) throws action conflict exception , interrupted exception { / / create a dummy configured target that has the incompatible platform provider set immutable list < artifact > output artifacts = rule context get output artifacts ( ) ; if ( rule context is test target ( ) & & output artifacts is empty ( ) ) { / / test targets require runfiles support to be added to the rule configured target builder / / which needs an " executable " create one here if none exist already / / / / it would be ideal if we could avoid this currently the problem is that some rules like / / sh test only declare an output artifact in the corresponding configured target factory / / function ( see sh binary java ) since this code path here replaces the factory function rules / / like sh test never get a chance to declare an output artifact / / / / on top of that , the rest of the code base makes the assumption that test targets provide an / / instance runfiles support this can be seen in the test provider , the test action builder , and / / the rule configured target builder classes there might be a way to break this assumption , but / / it ' s currently too heavily baked in to work around it more nicely than this / / / / theoretically , this hack shouldn ' t be an issue because the corresponding actions will never / / get executed they cannot be queried either output artifacts = immutable list of ( rule context create output artifact ( ) ) ; } nested set < artifact > files to build = nested set builder < artifact > stable order ( ) add all ( output artifacts ) build ( ) ; runfiles builder runfiles builder = new runfiles builder ( rule context get workspace name ( ) , rule context get configuration ( ) legacy external runfiles ( ) ) ; runfiles runfiles = runfiles builder add transitive artifacts ( files to build ) add runfiles ( rule context , runfiles provider default runfiles ) build ( ) ; rule configured target builder builder = new rule configured target builder ( rule context ) ; builder set files to build ( files to build ) ; if ( targets responsible for incompatibility ! = null ) { builder add ( incompatible platform provider class , incompatible platform provider incompatible due to targets ( targets responsible for incompatibility ) ) ; } else if ( violated constraints ! = null ) { builder add ( incompatible platform provider class , incompatible platform provider incompatible due to constraints ( violated constraints ) ) ; } else { throw new illegal argument exception ( " both violated constraints and targets responsible for incompatibility are null " ) ; } / / if this is an analysis test , rule configured target builder performs some additional sanity / / checks satisfy them with an appropriate provider if ( rule context get rule ( ) is analysis test ( ) ) { builder add native declared provider ( new analysis test result info ( / * success = * / false , " this test is incompatible and should not have been run please file a bug " + " upstream " ) ) ; } builder add ( runfiles provider class , runfiles provider simple ( runfiles ) ) ; if ( ! output artifacts is empty ( ) ) { artifact executable = output artifacts get ( 0 ) ; runfiles support runfiles support = runfiles support with executable ( rule context , runfiles , executable ) ; builder set runfiles support ( runfiles support , executable ) ; rule context register action ( new fail action ( rule context get action owner ( ) , output artifacts , " can ' t build this this target is incompatible please file a bug upstream " , code cant build incompatible target ) ) ; } return builder build ( ) ; }


adds a new item to the < code > photo urls < code > list

public pet add photo urls item ( string photo urls item ) { this photo urls add ( photo urls item ) ; return this ; }


public void move ( int src , int dest , int length ) { dirty = true ; system arraycopy ( data , src , data , dest , length ) ; }


this method retrieves all the node labels in the cluster , and it is reachable by using { @ link r m w s consts # get node labels }

node labels info get cluster node labels ( http servlet request hsr ) throws i o exception ;


alternative to { @ link # set allowed origins } that supports origins declared via wildcard patterns in contrast to { @ link # set allowed origins allowed origins } which does support the special value { @ code " " } , this property allows more flexible patterns , e g { @ code " https : domain 1 com " } furthermore it always sets the { @ code access - control - allow - origin } response header to the matched origin and never to { @ code " " } , nor to any other pattern , and therefore can be used in combination with { @ link # set allow credentials } set to { @ code true } by default this is not set

public cors configuration set allowed origin patterns ( @ nullable list < string > allowed origin patterns ) { if ( allowed origin patterns = = null ) { this allowed origin patterns = null ; } else { this allowed origin patterns = new array list < > ( allowed origin patterns size ( ) ) ; for ( string pattern value : allowed origin patterns ) { add allowed origin pattern ( pattern value ) ; } } return this ; }


sets all operands with the given type to a masked or unmasked state note : this is done in a background task since it may be long - running

private void mask operands by type ( int op type , boolean mask ) { task b task = new task ( " masking operands " , true , true , true ) { @ override public void run ( task monitor monitor ) { monitor set maximum ( get row count ( ) * get column count ( ) ) ; for ( int i = 0 ; i < get row count ( ) ; i + + ) { for ( int j = 0 ; j < get column count ( ) ; j + + ) { if ( monitor is cancelled ( ) ) { return ; } monitor increment progress ( 1 ) ; instruction table data object obj = get cell data ( i , j ) ; mask operand by type ( op type , mask , obj ) ; } } } } ; new task launcher ( b task , this ) ; instruction table model model = ( instruction table model ) get model ( ) ; model fire table data changed ( ) ; }


returns the next intercepter in the chain

r m admin request interceptor get next interceptor ( ) ;


adds the container localizer arguments for a @ { link shell command executor } , as expected by container localizer main

public static void build main args ( list < string > command , string user , string app id , string loc id , inet socket address nm addr , string token file name , list < string > local dirs , configuration conf ) { string log level = conf get ( yarn configuration nm container localizer log level , yarn configuration nm container localizer log level default ) ; add log 4j system properties ( log level , command ) ; command add ( container localizer class get name ( ) ) ; command add ( user ) ; command add ( app id ) ; command add ( loc id ) ; command add ( nm addr get host name ( ) ) ; command add ( integer to string ( nm addr get port ( ) ) ) ; command add ( token file name ) ; for ( string dir : local dirs ) { command add ( dir ) ; } }


views the array as an immutable list does not check for nulls

static < e > immutable list < e > as immutable list ( object [ ] elements , int length ) { if ( length = = 0 ) { return of ( ) ; } return new regular immutable list < e > ( elements , length ) ; }


get the offset of this data item from the start of its immediate parent

public int get parent offset ( ) { return offset ; }


delete purchase order by id for valid response try integer i ds with value & lt ; 1000 anything above 1000 or nonintegers will generate api errors

public void delete order test ( ) { string order id = null ; / / api delete order ( order id ) ; / / todo : test validations }


callback method for when a new record is added used for maintaining indexes only may be called before the old record is actually inserted

void inserted record ( d b record record ) throws i o exception { / / add secondary index entries for new record for ( int indexed column : indexed columns ) { index table index table = secondary indexes get ( indexed column ) ; index table add entry ( record ) ; } }


public void zoom in graph ( ) { view zoom in graph ( ) ; }


writes the ' { @ code value } ' attribute to the supplied { @ link tag writer } subclasses may choose to override this implementation to control exactly when the value is written

protected void write value ( tag writer tag writer ) throws jsp exception { string value to use = ( get value ( ) ! = null ? get value ( ) : get default value ( ) ) ; tag writer write attribute ( " value " , process field value ( get name ( ) , value to use , get type ( ) ) ) ; }


return true iff calling { @ link # decrypt ( char [ ] ) } requires a non - empty password

public boolean has password ( ) { return has password ; }


public void name test ( ) { / / todo : test name }


handles a custom source event from the source reader this method has a default implementation that does nothing , because it is only required to be implemented by some sources , which have a custom event protocol between reader and enumerator the common events for reader registration and split requests are not dispatched to this method , but rather invoke the { @ link # add reader ( int ) } and { @ link # handle split request ( int , string ) } methods

default void handle source event ( int subtask id , source event source event ) { }


add instruction context pattern to the current pattern group

public void add context pattern ( pattern block maskvalue ) { / / todo : not implemented }


returns the wait time this is the amount of time that the feedback operator keeps listening for feedback elements once the time expires the operation will close and will not receive further elements

public long get wait time ( ) { return wait time ; }


escapes the character unsafe for e - mail address see http : en wikipedia orgwiki e - mail address for the details , but here the vocabulary is even more restricted

public static string to email safe string ( string project name ) { / / todo : escape non - ascii characters string builder buf = new string builder ( project name length ( ) ) ; for ( int i = 0 ; i < project name length ( ) ; i + + ) { char ch = project name char at ( i ) ; if ( ( ' a ' < = ch & & ch < = ' z ' ) | | ( ' a ' < = ch & & ch < = ' z ' ) | | ( ' 0 ' < = ch & & ch < = ' 9 ' ) | | " - " index of ( ch ) > = 0 ) buf append ( ch ) ; else buf append ( ' ' ) ; / / escape } return string value of ( buf ) ; }


public static string sha base 6 4 ( final string salt , final string data , final string separator , final boolean chunked ) { val result = raw digest ( message digest algorithms sha 1 , salt , optional of nullable ( separator ) map ( s - > data + s ) or else ( data ) ) ; return encoding utils encode base 6 4 ( result , chunked ) ; }


returns the target model class that should be used to deserialize the input data the discriminator mappings are used to determine the target model class

public static class < ? > get class for element ( json node node , class < ? > model class ) { class discriminator mapping cdm = model discriminators get ( model class ) ; if ( cdm ! = null ) { return cdm get class for element ( node , new hash set < class < ? > > ( ) ) ; } return null ; }


shows { @ link channel # class loading time }

public long get class loading time ( ) throws i o exception , interrupted exception { if ( channel = = null ) { return - 1 ; } return channel call ( new loading time ( false ) ) ; }


constructs a new distance based sort on a geo point like field

public static geo distance sort builder geo distance sort ( string field name , geo point points ) { return new geo distance sort builder ( field name , points ) ; }


reads and parses the blob with given name , applying name translation using the { link # blob name } method

public t read ( blob container blob container , string name , named x content registry named x content registry , big arrays big arrays ) throws i o exception { string blob name = blob name ( name ) ; try ( releasable bytes stream output out = new releasable bytes stream output ( big arrays ) ; input stream in = blob container read blob ( blob name ) ) { streams copy ( in , out , false ) ; return deserialize ( blob name , named x content registry , out bytes ( ) ) ; } }


creates a string representation of allocated resources to a container memory , followed with v cores are always the first two resources of the resulted string , followed with any custom resources , if any is present

string get resources ( container info container ) { map < string , long > allocated resources = container get allocated resources ( ) ; string builder sb = new string builder ( ) ; sb append ( get resource as string ( resource information memory uri , allocated resources get ( resource information memory uri ) ) ) append ( " , " ) ; sb append ( get resource as string ( resource information vcores uri , allocated resources get ( resource information vcores uri ) ) ) ; if ( container has custom resources ( ) ) { container get allocated resources ( ) for each ( ( key , value ) - > { if ( ! key equals ( resource information memory uri ) & & ! key equals ( resource information vcores uri ) ) { sb append ( " , " ) ; sb append ( get resource as string ( key , value ) ) ; } } ) ; } return sb to string ( ) ; }


creates a new dummy edge to be used in the graph

private edge new dummy edge ( node source node , node target node ) { / / boolean added edge ; dummy edge part edge part = new dummy edge part ( ) ; edge edge = new edge ( edge part , source node , target node ) ; edge weight = 2 ; / / add the new edge to the edge list edge list add ( edge ) ; / / target node = source node ; / / added edge = true ; return edge ; }


returns the { @ link timer job entity } instances that are elegible to execute , meaning the due date of the timer has been passed

list < timer job entity > find timer jobs to execute ( page page ) ;


public boolean is fixed rotation ( ) { return body is fixed rotation ( ) ; }


sets the extras buffer on the message { @ link byte buf # release ( ) } ownership of { @ code extras } is transferred to this { @ link binary memcache message }

binary memcache message set extras ( byte buf extras ) ;


gets all the key - value pairs that belong to the windows within in the given time range

key value iterator < windowed < k > , v > fetch all ( instant time from , instant time to ) throws illegal argument exception ;


public string get last name ( ) { return last name ; }


applies the given visitor to all type path elements

public void type path infos accept ( clazz clazz , method method , type path info visitor type path visitor ) { for ( int index = 0 ; index < type path length ; index + + ) { / / we don ' t need double dispatching here , since there is only one / / type of type path info type path visitor visit type path info ( clazz , method , this , type path [ index ] ) ; } }


request that the renderer render a frame this method is typically used when the render mode has been set to { @ link # rendermode when dirty } , so that frames are only rendered on demand may be called from any thread must not be called before a renderer has been set

public void request render ( ) { gl thread request render ( ) ; }


this method attempts to find the bottom - right alignment pattern in the image it is a bit messy since it ' s pretty performance - critical and so is written to be fast foremost

alignment pattern find ( ) throws not found exception { int start x = this start x ; int height = this height ; int max j = start x + width ; int middle i = start y + ( height / 2 ) ; / / we are looking for black / white / black modules in 1 : 1 : 1 ratio ; / / this tracks the number of black / white / black modules seen so far int [ ] state count = new int [ 3 ] ; for ( int i gen = 0 ; i gen < height ; i gen + + ) { / / search from middle outwards int i = middle i + ( ( i gen & 0x 0 1 ) = = 0 ? ( i gen + 1 ) / 2 : - ( ( i gen + 1 ) / 2 ) ) ; state count [ 0 ] = 0 ; state count [ 1 ] = 0 ; state count [ 2 ] = 0 ; int j = start x ; / / burn off leading white pixels before anything else ; if we start in the middle of / / a white run , it doesn ' t make sense to count its length , since we don ' t know if the / / white run continued to the left of the start point while ( j < max j & & ! image get ( j , i ) ) { j + + ; } int current state = 0 ; while ( j < max j ) { if ( image get ( j , i ) ) { / / black pixel if ( current state = = 1 ) { / / counting black pixels state count [ 1 ] + + ; } else { / / counting white pixels if ( current state = = 2 ) { / / a winner ? if ( found pattern cross ( state count ) ) { / / yes alignment pattern confirmed = handle possible center ( state count , i , j ) ; if ( confirmed ! = null ) { return confirmed ; } } state count [ 0 ] = state count [ 2 ] ; state count [ 1 ] = 1 ; state count [ 2 ] = 0 ; current state = 1 ; } else { state count [ + + current state ] + + ; } } } else { / / white pixel if ( current state = = 1 ) { / / counting black pixels current state + + ; } state count [ current state ] + + ; } j + + ; } if ( found pattern cross ( state count ) ) { alignment pattern confirmed = handle possible center ( state count , i , max j ) ; if ( confirmed ! = null ) { return confirmed ; } } } / / hmm , nothing we saw was observed and confirmed twice if we had / / any guess at all , return it if ( ! possible centers is empty ( ) ) { return possible centers get ( 0 ) ; } throw not found exception get not found instance ( ) ; }


public collection < ? extends d b s entity association > get associations ( @ not null d b r progress monitor monitor ) throws d b exception { return null ; }


by default , return true to render the " edit view " link on the page this method is really just for the default " all " view to hide the edit link so that the default hudson top page remains the same as before 1 316

public boolean is editable ( ) { return true ; }


test { @ code map file reader mid key ( ) } method

public void test mid key on current api ( ) throws exception { / / write a mapfile of simple data : keys are final string test prefix = " test mid key on current api mapfile " ; map file writer writer = null ; map file reader reader = null ; try { writer = create writer ( test prefix , int writable class , int writable class ) ; / / 0 , 1 , 9 int size = 10 ; for ( int i = 0 ; i < size ; i + + ) writer append ( new int writable ( i ) , new int writable ( i ) ) ; writer close ( ) ; reader = create reader ( test prefix , int writable class ) ; assert equals ( new int writable ( ( size - 1 ) / 2 ) , reader mid key ( ) ) ; } finally { i o utils cleanup with logger ( log , writer , reader ) ; } }


convert a { @ linkplain search request } into a { @ linkplain request }

static request search ( search request search request , string search endpoint ) throws i o exception { request request = new request ( http post method name , endpoint ( search request indices ( ) , search endpoint ) ) ; params params = new params ( ) ; add search request params ( params , search request ) ; if ( search request source ( ) ! = null ) { request set entity ( create entity ( search request source ( ) , request body content type ) ) ; } request add parameters ( params as map ( ) ) ; return request ; }


return the current byte position in the input file

public synchronized long get position ( ) throws i o exception { return in get pos ( ) ; }


create a { @ link marshaller } for protos of the same type as { @ code default instance }

public static < t extends message > marshaller < t > marshaller ( final t default instance ) { return proto lite utils marshaller ( default instance ) ; }


returns the window that is being evaluated


sets the item at the given index < b > note : < b > at least one of { @ code descriptor } or { @ code signature } must be passed as non - null

public void set ( int n , int start pc , int length , cst string name , cst string descriptor , cst string signature , int index ) { set 0 ( n , new item ( start pc , length , name , descriptor , signature , index ) ) ; }


this returns selenium remote control logs associated with the session id

public synchronized string get log ( session id session id ) throws i o exception { / / todo ( chandra ) : provide option to clear logs after get log ( ) string logs = formatted records ( session id ) ; logs = " \ n < rc logs rc session id = " + session id + " > \ n " + logs + " \ n < / rc logs > \ n " ; return logs ; }


removes and returns all { @ link response context } instances that match the predicate

public list < response context < ? extends transport response > > prune ( predicate < response context < ? extends transport response > > predicate ) { final list < response context < ? extends transport response > > holders = new array list < > ( ) ; for ( map entry < long , response context < ? extends transport response > > entry : handlers entry set ( ) ) { response context < ? extends transport response > holder = entry get value ( ) ; if ( predicate test ( holder ) ) { response context < ? extends transport response > remove = handlers remove ( entry get key ( ) ) ; if ( remove ! = null ) { holders add ( holder ) ; } } } return holders ; }


gets the number of 32 - bit words required to hold instances of all the elements of this list this is a sum of the widths ( categories ) of all the elements


hands in a channel after a successful connection

private void hand in channel ( channel channel ) { synchronized ( connect lock ) { if ( connection shutdown future get ( ) ! = null | | failure cause ! = null ) { / / close the channel and we are done any queued requests / / are removed on the close / failure call and after that no / / new ones can be enqueued channel close ( ) ; } else { established = new established connection ( server address , serializer , channel ) ; while ( ! queued requests is empty ( ) ) { final pending request pending = queued requests poll ( ) ; established send request ( pending request ) when complete ( ( response , throwable ) - > { if ( throwable ! = null ) { pending complete exceptionally ( throwable ) ; } else { pending complete ( response ) ; } } ) ; } / / publish the channel for the general public established connections put ( server address , established ) ; pending connections remove ( server address ) ; / / check shut down for possible race with shut down we / / don ' t want any lingering connections after shut down , / / which can happen if we don ' t check this here if ( client shutdown future get ( ) ! = null ) { if ( established connections remove ( server address , established ) ) { established close ( ) ; } } } } }


post fakeinline - additional properties : test inline additional properties

default response entity < void > test inline additional properties ( @ api param ( value = " request body " , required = true ) @ valid @ request body map < string , string > param ) { return new response entity < > ( http status not implemented ) ; }


sets an user provided hash for this operator this will be used as is the create the job vertex i d the user provided hash is an alternative to the generated hashes , that is considered when identifying an operator through the default hash mechanics fails ( e g because of changes between flink versions ) important : this should be used as a workaround or for trouble shooting the provided hash needs to be unique per transformation and job otherwise , job submission will fail furthermore , you cannot assign user - specified hash to intermediate nodes in an operator chain and trying so will let your job fail a use case for this is in migration between flink versions or changing the jobs in a way that changes the automatically generated hashes in this case , providing the previous hashes directly through this method ( e g obtained from old logs ) can help to reestablish a lost mapping from states to their target operator

public data stream sink < t > set uid hash ( string uid hash ) { transformation set uid hash ( uid hash ) ; return this ; }


public static string compare md 5 old result ( list < string > changed group keys ) { string builder sb = new string builder ( ) ; for ( string group key : changed group keys ) { string [ ] data id group id = group key 2 parse key ( group key ) ; sb append ( data id group id [ 0 ] ) ; sb append ( " : " ) ; sb append ( data id group id [ 1 ] ) ; sb append ( " ; " ) ; } return sb to string ( ) ; }


get the value of the ' { @ code onfocus } ' attribute

protected string get onfocus ( ) { return this onfocus ; }


tests that a non - dynamic { @ link event sample stream } will return a buffer with { @ link c # buffer flag end of stream } when trying to read sample out - of - bound

public void read data out of bound return end of stream after format for non dynamic event sample stream ( ) { event stream event stream = new event stream ( scheme id , value , time scale , new long [ 0 ] , new event message [ 0 ] ) ; event sample stream sample stream = new event sample stream ( event stream , format , false ) ; / / first read - read format read data ( sample stream ) ; int result = read data ( sample stream ) ; assert that ( result ) is equal to ( c result buffer read ) ; assert that ( input buffer is end of stream ( ) ) is true ( ) ; }


returns the double - click strategy ready to be used in this viewer when double clicking onto text of the given content type ( note : the same double - click strategy object is used for all content types )

public i text double click strategy get double click strategy ( i source viewer source viewer , string content type ) { return new s q l double click strategy ( ) ; }


sets the stop reason of the download with the given id in a terminal state ( { @ link download # state completed } , { @ link download # state failed } ) does nothing if a download with the given id does not exist , or if it ' s not in a terminal state this method may be slow and shouldn ' t normally be called on the main thread

void set stop reason ( string id , int stop reason ) throws i o exception ;


get the # of degrees an image must be rotated to match the given exif orientation

public static int get exif orientation degrees ( int exif orientation ) { final int degrees to rotate ; switch ( exif orientation ) { case exif interface orientation transpose : case exif interface orientation rotate 90 : degrees to rotate = 90 ; break ; case exif interface orientation rotate 180 : case exif interface orientation flip vertical : degrees to rotate = 180 ; break ; case exif interface orientation transverse : case exif interface orientation rotate 270 : degrees to rotate = 270 ; break ; default : degrees to rotate = 0 ; break ; } return degrees to rotate ; }


return the default html escape setting , differentiating between no default specified and an explicit value

public boolean get default html escape ( ) { return this default html escape ; }


lists the application attempts matching the given applicationid

private void list application attempts ( string application id ) throws yarn exception , i o exception { print writer writer = new print writer ( new output stream writer ( sysout , charset for name ( " utf - 8 " ) ) ) ; list < application attempt report > app attempts report = client get application attempts ( application id from string ( application id ) ) ; writer println ( " total number of application attempts " + " : " + app attempts report size ( ) ) ; writer printf ( application attempts pattern , " application attempt - id " , " state " , " am - container - id " , " tracking - url " ) ; for ( application attempt report app attempt report : app attempts report ) { writer printf ( application attempts pattern , app attempt report get application attempt id ( ) , app attempt report get yarn application attempt state ( ) , app attempt report get a m container id ( ) = = null ? " n / a " : app attempt report get a m container id ( ) to string ( ) , app attempt report get tracking url ( ) ) ; } writer flush ( ) ; }


static boolean in verify phase ( ) { return boolean parse boolean ( system get property ( " tests verify phase " ) ) ; }


public object put ( string key , object value ) { return data put ( key , value ) ; }