public build patch infos create history t patches ( boolean diff bundle dex , final i logger logger ) throws patch exception { final build patch infos build patch infos = new build patch infos ( ) ; list < patch info > patch infos = history build patch infos get patches ( ) ; patch infos parallel stream ( ) filter ( new java util function predicate < patch info > ( ) { @ override public boolean test ( patch info patch info ) { if ( ! version list is empty ( ) & & ! version list contains ( patch info get patch version ( ) ) ) { return false ; } return true ; } } ) for each ( new consumer < patch info > ( ) { @ override public void accept ( patch info patch info ) { if ( null ! = logger ) { logger info ( " [ create his patch ] " + patch info get patch version ( ) + " " ) ; } his patch infos put ( patch info get patch version ( ) , patch info ) ; patch info new patch info = null ; try { new patch info = create his t patch ( patch info get patch version ( ) , logger ) ; } catch ( exception e ) { throw new gradle exception ( e get message ( ) , e ) ; } synchronized ( build patch infos ) { build patch infos get patches ( ) add ( new patch info ) ; } } } ) ; return build patch infos ; }


checks that the current running process can read , write , and execute the given directory by using methods of the file object

private static void check access by file methods ( file dir ) throws disk error exception { if ( ! dir is directory ( ) ) { throw new disk error exception ( " not a directory : " + dir to string ( ) ) ; } if ( ! file util can read ( dir ) ) { throw new disk error exception ( " directory is not readable : " + dir to string ( ) ) ; } if ( ! file util can write ( dir ) ) { throw new disk error exception ( " directory is not writable : " + dir to string ( ) ) ; } if ( ! file util can execute ( dir ) ) { throw new disk error exception ( " directory is not executable : " + dir to string ( ) ) ; } }


awaits the specified amount of time or until this { @ code test observer } { @ code test subscriber } receives an { @ code on error } or { @ code on complete } events , whichever happens first

public final boolean await ( long time , @ non null time unit unit ) throws interrupted exception { boolean d = done get count ( ) = = 0 | | ( done await ( time , unit ) ) ; timeout = ! d ; return d ; } / / assertion methods


create random { @ link direct candidate generator builder }

public static direct candidate generator builder random candidate generator ( ) { direct candidate generator builder generator = new direct candidate generator builder ( random alpha of length ( 10 ) ) ; maybe set ( generator : : accuracy , random float ( ) ) ; maybe set ( generator : : max edits , random int between ( 1 , 2 ) ) ; maybe set ( generator : : max inspections , random int between ( 1 , 20 ) ) ; maybe set ( generator : : max term freq , random float ( ) ) ; maybe set ( generator : : min doc freq , random float ( ) ) ; maybe set ( generator : : min word length , random int between ( 1 , 20 ) ) ; maybe set ( generator : : prefix length , random int between ( 1 , 20 ) ) ; maybe set ( generator : : pre filter , random alpha of length between ( 1 , 20 ) ) ; maybe set ( generator : : post filter , random alpha of length between ( 1 , 20 ) ) ; maybe set ( generator : : size , random int between ( 1 , 20 ) ) ; maybe set ( generator : : sort , random from ( " score " , " frequency " ) ) ; maybe set ( generator : : string distance , random from ( " internal " , " damerau levenshtein " , " levenshtein " , " jaro winkler " , " ngram " ) ) ; maybe set ( generator : : suggest mode , random from ( " missing " , " popular " , " always " ) ) ; return generator ; }


returns a { @ link virtual channel } that ' s connected to the privilege - escalated environment

public static virtual channel start ( final task listener listener , final string root username , final string root password ) throws i o exception , interrupted exception { if ( file path separator char = = ' ; ' ) / / on windows return new local channel ( ) ; / / todo : perhaps use run as to run as an administrator ? string os = util fix null ( system get property ( " os name " ) ) ; if ( os equals ( " linux " ) ) return new unix su ( ) { protected string sudo exe ( ) { return " sudo " ; } protected process sudo with pass ( argument list builder args ) throws i o exception { args prepend ( sudo exe ( ) , " - s " ) ; listener get logger ( ) println ( " $ " + util join ( args to list ( ) , " " ) ) ; process builder pb = new process builder ( args to command array ( ) ) ; process p = pb start ( ) ; / / todo : use - p to detect prompt / / todo : detect if the password didn ' t work print stream ps = new print stream ( p get output stream ( ) ) ; ps println ( root password ) ; ps println ( root password ) ; ps println ( root password ) ; return p ; } } start ( listener , root password ) ; if ( os equals ( " sun o s " ) ) return new unix su ( ) { protected string sudo exe ( ) { return " / usr / bin / pfexec " ; } protected process sudo with pass ( argument list builder args ) throws i o exception { listener get logger ( ) println ( " running with embedded su " ) ; process builder pb = new process builder ( args prepend ( sudo exe ( ) ) to command array ( ) ) ; return embedded su start with su ( root username , root password , pb ) ; } / / in solaris , pfexec never asks for a password , so username = = null means / / we won ' t be using password this helps disambiguate empty password } start ( listener , root username = = null ? null : root password ) ; / / todo : mac ? / / unsupported platform , take a chance return new local channel ( ) ; }


given specified < code > required capacity < code > determines if that amount of space is available note , you can not assume that if this method returns < code > true < code > that a call to { @ link ring buffer # next ( ) } will not block especially true if this ring buffer is set up to handle multiple producers

public boolean has available capacity ( int required capacity ) { return sequencer has available capacity ( required capacity ) ; }


create and start a new container using the specified factory

protected message listener container create listener container ( jms listener endpoint endpoint , jms listener container factory < ? > factory ) { message listener container listener container = factory create listener container ( endpoint ) ; if ( listener container instanceof initializing bean ) { try { ( ( initializing bean ) listener container ) after properties set ( ) ; } catch ( exception ex ) { throw new bean initialization exception ( " failed to initialize message listener container " , ex ) ; } } int container phase = listener container get phase ( ) ; if ( container phase < integer max value ) { / / a custom phase value if ( this phase < integer max value & & this phase ! = container phase ) { throw new illegal state exception ( " encountered phase mismatch between container factory definitions : " + this phase + " vs " + container phase ) ; } this phase = listener container get phase ( ) ; } return listener container ; }


gets the type handler to use when reading the result set tries to get from the type handler registry by searching for the property type if not found it gets the column jdbc type and tries to get a handler for it

public type handler < ? > get type handler ( class < ? > property type , string column name ) { type handler < ? > handler = null ; map < class < ? > , type handler < ? > > column handlers = type handler map get ( column name ) ; if ( column handlers = = null ) { column handlers = new hash map < > ( ) ; type handler map put ( column name , column handlers ) ; } else { handler = column handlers get ( property type ) ; } if ( handler = = null ) { jdbc type jdbc type = get jdbc type ( column name ) ; handler = type handler registry get type handler ( property type , jdbc type ) ; / / replicate logic of unknown type handler # resolve type handler / / see issue # 59 comment 10 if ( handler = = null | | handler instanceof unknown type handler ) { final int index = column names index of ( column name ) ; final class < ? > java type = resolve class ( class names get ( index ) ) ; if ( java type ! = null & & jdbc type ! = null ) { handler = type handler registry get type handler ( java type , jdbc type ) ; } else if ( java type ! = null ) { handler = type handler registry get type handler ( java type ) ; } else if ( jdbc type ! = null ) { handler = type handler registry get type handler ( jdbc type ) ; } } if ( handler = = null | | handler instanceof unknown type handler ) { handler = new object type handler ( ) ; } column handlers put ( property type , handler ) ; } return handler ; }


override this so that we don ' t set the target test root to any path under the root of the fs , and so that we don ' t try to delete the test dir , but rather only its contents

void initialize target test root ( ) throws i o exception { target test root = fs default make qualified ( new path ( " / " ) ) ; for ( file status status : fs default list status ( target test root ) ) { fs default delete ( status get path ( ) , true ) ; } }


public array queue < e > clone ( ) { try { array queue < e > result = ( array queue < e > ) super clone ( ) ; e [ ] new elements = ( e [ ] ) array new instance ( elements get class ( ) get component type ( ) , elements length ) ; system arraycopy ( elements , 0 , new elements , 0 , elements length ) ; result elements = new elements ; return result ; } catch ( clone not supported exception e ) { throw new assertion error ( ) ; } }


launch a new container with the given life time

public void add new container ( container container , long life time m s ) { log debug ( " node manager { } launches a new container ( { } ) " , node get node i d ( ) , container get id ( ) ) ; if ( life time m s ! = - 1 ) { / / normal container container simulator cs = new container simulator ( container get id ( ) , container get resource ( ) , life time m s + system current time millis ( ) , life time m s , container get allocation request id ( ) ) ; container queue add ( cs ) ; running containers put ( cs get id ( ) , cs ) ; } else { / / am container / / - 1 means a m container synchronized ( am container list ) { am container list add ( container get id ( ) ) ; } } }


to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model

public single < client > rx test client model ( client body ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate test client model ( body , fut ) ) ) ; }


private dynamic i o statistics active instance ( ) { check state ( instance ! = null , " already built " ) ; return instance ; }


returns the { @ code byte } value that , when treated as unsigned , is equal to { @ code value } , if possible

public static byte checked cast ( long value ) { check argument ( value > > byte size = = 0 , " out of range : % s " , value ) ; return ( byte ) value ; }


private static void timeout check ( default future future ) { timeout check task task = new timeout check task ( future get id ( ) ) ; future timeout check task = time out timer new timeout ( task , future get timeout ( ) , time unit milliseconds ) ; }


check that we don ' t rely on the percent array order and that the iterator returns the values in the original order

public void test percent order ( ) { final double [ ] percents = new double [ ] { 0 50 , 0 25 , 0 01 , 0 99 , 0 60 } ; internal percentiles bucket aggregation = create test instance ( " test " , collections empty map ( ) , percents , random boolean ( ) ) ; iterator < percentile > iterator = aggregation iterator ( ) ; iterator < string > name iterator = aggregation value names ( ) iterator ( ) ; for ( double percent : percents ) { assert true ( iterator has next ( ) ) ; assert true ( name iterator has next ( ) ) ; percentile percentile = iterator next ( ) ; string percentile name = name iterator next ( ) ; assert equals ( percent , percentile get percent ( ) , 0 0d ) ; assert equals ( percent , double value of ( percentile name ) , 0 0d ) ; assert equals ( aggregation percentile ( percent ) , percentile get value ( ) , 0 0d ) ; } assert false ( iterator has next ( ) ) ; assert false ( name iterator has next ( ) ) ; }


set the profiler configuration arguments if the string contains a ' % s ' it will be replaced with the name of the profiling output file when the task runs this value is passed to the task child jvm on the command line

public void set profile params ( string value ) { set ( job context task profile params , value ) ; }


verify permission for a mount point when the multiple destinations are present with both having different permissions it returns the actual permissions of either of the actual destinations pointed by the mount point

public void test mount table permissions multi dest different perm ( ) throws i o exception { try { map < string , string > dest map = new hash map < > ( ) ; dest map put ( " ns 0 " , " / tmp / testdir " ) ; dest map put ( " ns 1 " , " / tmp / testdir 0 1 " ) ; mount table add entry = mount table new instance ( " / testdir " , dest map ) ; assert true ( add mount table ( add entry ) ) ; nn fs 0 mkdirs ( new path ( " / tmp / testdir " ) ) ; nn fs 0 set owner ( new path ( " / tmp / testdir " ) , " aowner " , " agroup " ) ; nn fs 0 set permission ( new path ( " / tmp / testdir " ) , fs permission create immutable ( ( short ) 775 ) ) ; nn fs 1 mkdirs ( new path ( " / tmp / testdir 0 1 " ) ) ; nn fs 1 set owner ( new path ( " / tmp / testdir 0 1 " ) , " aowner 0 1 " , " agroup 0 1 " ) ; nn fs 1 set permission ( new path ( " / tmp / testdir 0 1 " ) , fs permission create immutable ( ( short ) 755 ) ) ; file status [ ] list = router fs list status ( new path ( " / " ) ) ; assert true ( " agroup " equals ( list [ 0 ] get group ( ) ) | | " agroup 0 1 " equals ( list [ 0 ] get group ( ) ) ) ; assert true ( " aowner " equals ( list [ 0 ] get owner ( ) ) | | " aowner 0 1 " equals ( list [ 0 ] get owner ( ) ) ) ; assert true ( ( ( short ) 775 ) = = list [ 0 ] get permission ( ) to short ( ) | | ( ( short ) 755 ) = = list [ 0 ] get permission ( ) to short ( ) ) ; } finally { nn fs 0 delete ( new path ( " / tmp " ) , true ) ; nn fs 1 delete ( new path ( " / tmp " ) , true ) ; } }


@ serial data the expected values per key , the number of distinct keys , the number of entries , and the entries in order

private void write object ( object output stream stream ) throws i o exception { stream default write object ( ) ; stream write int ( key set ( ) size ( ) ) ; for ( k key : key set ( ) ) { stream write object ( key ) ; } stream write int ( size ( ) ) ; for ( entry < k , v > entry : entries ( ) ) { stream write object ( entry get key ( ) ) ; stream write object ( entry get value ( ) ) ; } }


ensures the truth of an expression involving one or more parameters to the calling method see { @ link # check argument ( boolean , string , object ) } for details

public static void check argument ( boolean b , @ nullable decl string error message template , char p 1 , char p 2 ) { if ( ! b ) { throw new illegal argument exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } }


returns a key for { @ code type } annotated with { @ code annotations } , wrapped by { @ code set } , reporting failures against { @ code subject }

public static string get set key ( type type , annotation [ ] annotations , object subject ) { annotation qualifier = extract qualifier ( annotations , subject ) ; type = box if primitive ( type ) ; string builder result = new string builder ( ) ; if ( qualifier ! = null ) { result append ( qualifier ) append ( " / " ) ; } result append ( set prefix ) ; type to string ( type , result , true ) ; result append ( " > " ) ; return result to string ( ) ; }


appends the node to the tail of the list

public void append to tail ( node head ) { node tail = head prev ; head prev = this ; tail next = this ; next = head ; prev = tail ; }


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

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


public static string get name ( ) { return " # blob " ; }


public list < list < read only first > > get array array of model ( ) { return array array of model ; }


creates a { @ link remote environment } the remote environment sends ( parts of ) the program to a cluster for execution note that all file paths used in the program must be accessible from the cluster the execution will use the specified parallelism


public static void reset ( ) { factory bean instance count = 0 ; }


{ @ inherit doc } always returns null for { @ code phi insn } s

public insn get original rop insn ( ) { return null ; }


tests good path saslplain authentication over plaintext with old version of server that does not support sasl authenticate headers and new version of client

public void old sasl plain plaintext server without sasl authenticate header ( ) throws exception { verify sasl authenticate header interop ( false , true , security protocol sasl plaintext , " plain " ) ; }


sets the { @ link log level } for exo player logcat logging

public static void set log level ( @ log level int log level ) { log log level = log level ; }


returns true if the target { @ code from } is visible to the target { @ code to }

public static < t > boolean visible ( query expression caller , query environment < t > env , t to , t from ) throws query exception , interrupted exception { set < query visibility < t > > visible packages = env get accessor ( ) get visibility ( caller , from ) ; for ( query visibility < t > spec : visible packages ) { if ( spec contains ( to ) ) { return true ; } } return false ; }


suspends the component this clears the internal state of the slot manager

public void suspend ( ) { log info ( " suspending the slot manager " ) ; / / stop the timeout checks for the task managers and the slot requests if ( task manager timeouts and redundancy check ! = null ) { task manager timeouts and redundancy check cancel ( false ) ; task manager timeouts and redundancy check = null ; } if ( slot request timeout check ! = null ) { slot request timeout check cancel ( false ) ; slot request timeout check = null ; } for ( pending slot request pending slot request : pending slot requests values ( ) ) { cancel pending slot request ( pending slot request ) ; } pending slot requests clear ( ) ; array list < instance i d > registered task managers = new array list < > ( task manager registrations key set ( ) ) ; for ( instance i d registered task manager : registered task managers ) { unregister task manager ( registered task manager , new slot manager exception ( " the slot manager is being suspended " ) ) ; } resource manager id = null ; resource actions = null ; started = false ; }


public boolean get attribute boolean ( ) { return attribute boolean ; }


creates a new listenable future - style stub that supports unary calls on the service

public static load balancer future stub new future stub ( io grpc channel channel ) { io grpc stub abstract stub stub factory < load balancer future stub > factory = new io grpc stub abstract stub stub factory < load balancer future stub > ( ) { @ java lang override public load balancer future stub new stub ( io grpc channel channel , io grpc call options call options ) { return new load balancer future stub ( channel , call options ) ; } } ; return load balancer future stub new stub ( factory , channel ) ; }


validates zoom , x , and y values , and returns the total number of allowed tiles along the xy axis

private static int validate z x y ( int zoom , int x tile , int y tile ) { final int tiles = 1 < < check precision range ( zoom ) ; if ( x tile < 0 | | y tile < 0 | | x tile > = tiles | | y tile > = tiles ) { throw new illegal argument exception ( string format ( locale root , " zoom / x / y combination is not valid : % d / % d / % d " , zoom , x tile , y tile ) ) ; } return tiles ; }


gets the accumulated stats for r p cs sent by a test client

public com google common util concurrent listenable future < io grpc testing integration messages load balancer accumulated stats response > get client accumulated stats ( io grpc testing integration messages load balancer accumulated stats request request ) { return io grpc stub client calls future unary call ( get channel ( ) new call ( get get client accumulated stats method ( ) , get call options ( ) ) , request ) ; }


writes a field to the given { @ link data output view } this write method avoids java serialization , by writing only the classname of the field ' s declaring class and the field name the written field can be read using { @ link # read field ( data input view , class loader ) }

static void write field ( data output view out , field field ) throws i o exception { class < ? > declaring class = field get declaring class ( ) ; out write u t f ( declaring class get name ( ) ) ; out write u t f ( field get name ( ) ) ; }


set the rome feed type to use defaults to atom 1 0

public void set feed type ( string feed type ) { this feed type = feed type ; }


public float get float item ( ) { return float item ; }


check whether the batch has enough room for a record of the given size in bytes

public boolean has room for ( int size in bytes ) { if ( ! is open for appends ) { return false ; } if ( next offset - base offset > = integer max value ) { return false ; } int record size in bytes = default record size of body in bytes ( ( int ) ( next offset - base offset ) , 0 , - 1 , size in bytes , default record empty headers ) ; int unused size in bytes = max bytes - approximate size in bytes ( ) ; if ( unused size in bytes > = record size in bytes ) { return true ; } else if ( unflushed bytes > 0 ) { record output flush ( ) ; unflushed bytes = 0 ; unused size in bytes = max bytes - flushed size in bytes ( ) ; return unused size in bytes > = record size in bytes ; } else { return false ; } }


@ serial data the factory and the backing map

private void write object ( object output stream stream ) throws i o exception { stream default write object ( ) ; stream write object ( factory ) ; stream write object ( backing map ( ) ) ; }


protected logout response build saml logout response ( final saml registered service service provider metadata facade adaptor , final single logout service slo service , final request context request context , final saml registered service registered service , final logout request logout request ) { val request = web utils get http servlet request from external webflow context ( request context ) ; val response = web utils get http servlet response from external webflow context ( request context ) ; val id = ' ' + string value of ( random utils next long ( ) ) ; val builder = configuration context get logout response builder ( ) ; val status = builder new status ( status code success , " success " ) ; val issuer = builder new issuer ( configuration context get cas properties ( ) get authn ( ) get saml idp ( ) get entity id ( ) ) ; val location = string utils is blank ( slo service get response location ( ) ) ? slo service get location ( ) : slo service get response location ( ) ; logger trace ( " creating logout response for binding [ { } ] with issuer [ { } ] , location [ { } ] and service provider [ { } ] " , slo service get binding ( ) , issuer , location , adaptor get entity id ( ) ) ; val logout response = builder new logout response ( id , location , issuer , status , adaptor get entity id ( ) ) ; if ( configuration context get cas properties ( ) get authn ( ) get saml idp ( ) get logout ( ) is sign logout response ( ) ) { logger trace ( " signing logout request for service provider [ { } ] " , adaptor get entity id ( ) ) ; val logout response signed = configuration context get saml object signer ( ) encode ( logout response , registered service , adaptor , response , request , slo service get binding ( ) , logout request ) ; saml utils log saml object ( configuration context get open saml config bean ( ) , logout response signed ) ; return logout response signed ; } return logout response ; }


split target string with custom separator and pick the index - th ( start with 0 ) result

public static string split index ( string str , string separator , int index ) { if ( index < 0 ) { return null ; } string [ ] values = string utils split by whole separator preserve all tokens ( str , separator ) ; if ( index > = values length ) { return null ; } else { return values [ index ] ; } }


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


test the property ' enum string required '

public void enum string required test ( ) { / / todo : test enum string required }


send a handshaker request and return the handshaker response

public handshaker resp send ( handshaker req req ) throws interrupted exception , i o exception { create writer if null ( ) ; maybe throw io exception ( ) ; if ( ! response queue is empty ( ) ) { throw new i o exception ( " received an unexpected response " ) ; } writer on next ( req ) ; optional < handshaker resp > result = response queue take ( ) ; if ( ! result is present ( ) ) { maybe throw io exception ( ) ; } return result get ( ) ; }


returns the next element < b > note : < b > the implementation must call { @ link # end of data ( ) } when there are no elements left in the iteration failure to do so could result in an infinite loop the initial invocation of { @ link # has next ( ) } or { @ link # next ( ) } calls this method , as does the first invocation of { @ code has next } or { @ code next } following each successful call to { @ code next } once the implementation either invokes { @ code end of data } or throws an exception , { @ code compute next } is guaranteed to never be called again if this method throws an exception , it will propagate outward to the { @ code has next } or { @ code next } invocation that invoked this method any further attempts to use the iterator will result in an { @ link illegal state exception } the implementation of this method may not invoke the { @ code has next } , { @ code next } , or { @ link # peek ( ) } methods on this instance ; if it does , an { @ code illegal state exception } will result


gets the cursor the cursor is the offset in code units from the start of the input of the next code unit to be read or written , where the input generally consists of the code for a single method

public final int cursor ( ) { return cursor ; }


markrelease do nothing ; we have entire buffer

public final int mark ( ) { return - 1 ; }


public void enable scroll ( ) { view parent parent = get parent ( ) ; if ( parent ! = null ) parent request disallow intercept touch event ( false ) ; }


add an annotation for a specified amount of subsequent output any previously open annotation will be closed by this call if there is already pending annotation from one or more previous calls to this method , the new call " consumes " output after all the output covered by the previous calls

public void annotate ( int amt , string msg ) ;


recommend use context manager : : stop span ( abstract span span ) , because in that way , the tracing context core could verify this span is the active one , in order to avoid stop unexpected span if the current span is hard to get or only could get by low - performance way , this stop way is still acceptable

public static void stop span ( ) { final abstract tracer context context = get ( ) ; stop span ( context active span ( ) , context ) ; }


unmarshals the given provided { @ code javax xml transform source } into an object graph this implementation inspects the given result , and calls { @ code unmarshal dom source } , { @ code unmarshal sax source } , or { @ code unmarshal stream source }

public final object unmarshal ( source source ) throws i o exception , xml mapping exception { if ( source instanceof d o m source ) { return unmarshal dom source ( ( d o m source ) source ) ; } else if ( stax utils is stax source ( source ) ) { return unmarshal stax source ( source ) ; } else if ( source instanceof s a x source ) { return unmarshal sax source ( ( s a x source ) source ) ; } else if ( source instanceof stream source ) { return unmarshal stream source ( ( stream source ) source ) ; } else { throw new illegal argument exception ( " unknown source type : " + source get class ( ) ) ; } }


public boolean is animated ( ) { return name ( ) ends with ( " anime " ) ; }


public static string get chinese week ( final date date ) { return new simple date format ( " e " , locale china ) format ( date ) ; }


loads a yaml - file of key - value pairs colon and whitespace " : " separate key and value ( one per line ) the hash tag " # " starts a single - line comment example : jobmanager rpc address : localhost # network address for communication with the job manager jobmanager rpc port : 6123 # network port to connect to for communication with the job manager taskmanager rpc port : 6122 # network port the task manager expects incoming ipc connections this does not span the whole yaml specification , but only the syntax of simple yaml key - value pairs ( see issue # 113 on git hub ) if at any point in time , there is a need to go beyond simple key - value pairs syntax compatibility will allow to introduce a yaml parser library

private static configuration load y a m l resource ( file file ) { final configuration config = new configuration ( ) ; try ( buffered reader reader = new buffered reader ( new input stream reader ( new file input stream ( file ) ) ) ) { string line ; int line no = 0 ; while ( ( line = reader read line ( ) ) ! = null ) { line no + + ; / / 1 check for comments string [ ] comments = line split ( " # " , 2 ) ; string conf = comments [ 0 ] trim ( ) ; / / 2 get key and value if ( conf length ( ) > 0 ) { string [ ] kv = conf split ( " : " , 2 ) ; / / skip line with no valid key - value pair if ( kv length = = 1 ) { log warn ( " error while trying to split key and value in configuration file " + file + " : " + line no + " : \ " " + line + " \ " " ) ; continue ; } string key = kv [ 0 ] trim ( ) ; string value = kv [ 1 ] trim ( ) ; / / sanity check if ( key length ( ) = = 0 | | value length ( ) = = 0 ) { log warn ( " error after splitting key and value in configuration file " + file + " : " + line no + " : \ " " + line + " \ " " ) ; continue ; } log info ( " loading configuration property : { } , { } " , key , is sensitive ( key ) ? hidden content : value ) ; config set string ( key , value ) ; } } } catch ( i o exception e ) { throw new runtime exception ( " error parsing yaml configuration " , e ) ; } return config ; }


creates a { @ link pattern process function } that as a result will produce strings as follows : { @ code [ current processing time ] : [ event get name ] } the event get name will occur state number times if the match does not contain n - th pattern it will replace this position with " null "

private static pattern process function < event , string > extract current processing time and names ( int state number ) { return new access context with names ( state number , context - > string value of ( context current processing time ( ) ) ) ; }


this method is called by { @ link # start async } to initiate service startup the invocation of this method should cause a call to { @ link # notify started ( ) } , either during this method ' s run , or after it has returned if startup fails , the invocation should cause a call to { @ link # notify failed ( throwable ) } instead this method should return promptly ; prefer to do work on a different thread where it is convenient it is invoked exactly once on service startup , even when { @ link # start async } is called multiple times


public static boolean is removable ( docker container status container status ) { return ! container status equals ( docker container status nonexistent ) & & ! container status equals ( docker container status unknown ) & & ! container status equals ( docker container status removing ) & & ! container status equals ( docker container status running ) ; }


invoked by x stream when this object is read into memory

protected object read resolve ( ) { if ( properties ! = null ) { for ( tool property < ? > p : properties ) { set tool ( p , this ) ; } } return this ; }


public boolean add ( e elem ) { if ( elem = = null ) { return false ; } if ( elem is in list ( this ) ) { return false ; } element prev = root get prev ( intrusive collection this ) ; prev set next ( intrusive collection this , elem ) ; root set prev ( intrusive collection this , elem ) ; elem insert internal ( intrusive collection this , prev , root ) ; size + + ; return true ; }


public string get default hdrs check ( ) { return default hdrs check ! = null ? default hdrs check : " strict " ; }


queries whether the given thread is waiting to enter this monitor note that because cancellations may occur at any time , a { @ code true } return does not guarantee that this thread will ever enter this monitor this method is designed primarily for use in monitoring of the system state

public boolean has queued thread ( thread thread ) { return lock has queued thread ( thread ) ; }


test serialization of outer boolean types

public void fake outer boolean serialize test ( ) throws api exception { boolean body = null ; boolean response = api fake outer boolean serialize ( body ) ; / / todo : test validations }


returns { @ link calcite config } wraps in the given table config

public static calcite config get calcite config ( table config table config ) { return table config get planner config ( ) unwrap ( calcite config class ) or else ( calcite config $ module $ default ( ) ) ; }


sets the retry image scale type if not set , the default value center inside will be used

public generic drawee hierarchy builder set retry image scale type ( @ nullable scaling utils scale type retry image scale type ) { m retry image scale type = retry image scale type ; return this ; }


returns the position ( byte offset ) in the stream that is immediately after audio data , or { @ link c # position unset } if not known


set the value of the < code > name < code > property to the given type this is equivalent to < code > set ( & lt ; name & gt ; , value to string ( ) ) < code >

public < t extends enum < t > > void set enum ( string name , t value ) { set ( name , value to string ( ) ) ; }


returns the number of component rows in the viewer there may be a blank row at the end for selecting therefore this number can be different than the actual number of components currently in the structure being viewed in addition , if a flexible array component exists which is not included in { @ link # get num components ( ) } it will be included in this count and would appear after the blank row ( e g , get component ( get num components ( ) + 1 ) )

public int get row count ( ) { return ( view composite ! = null ) ? view composite get num components ( ) : 0 ; }


public void set initialized ( boolean ini ) { this initialized = ini ; }


public list < list < big decimal > > get array array number ( ) { return array array number ; }


sets the setting with the provided setting key and the int value

public builder put ( string setting , int value ) { put ( setting , string value of ( value ) ) ; return this ; }


private string get credentials ( string header ) { if ( header = = null ) { return null ; } final int space = header index of ( ' ' ) ; if ( space < = 0 ) { return null ; } final string method = header substring ( 0 , space ) ; if ( ! prefix equals ignore case ( method ) ) { return null ; } return header substring ( space + 1 ) ; }


{ @ link # load ( ) } in the descriptor is not a real load activity , so locking against " this " is enough

protected object get load lock ( ) { / / get a lock for the singleton extension list to prevent deadlocks ( jenkins - 55361 ) return get descriptor extension list ( ) get load lock ( ) ; }


sets the file to executable , if the argument is true it is currently not supported to unset the executable status of a file , so { code executable = false } yields an { @ link unsupported operation exception } note : for { @ link file system } s where { @ link # supports modifications ( path ) } returns false , this method will throw an { @ link unsupported operation exception }

protected abstract void set executable ( path path , boolean executable ) throws i o exception ;


test that writing fails silently when the directory is not writable

public void test silent failed write ( ) { string path = method dir to u r i ( ) to string ( ) ; metrics system ms = init metrics system ( path , true , false ) ; new my metrics 1 ( ) register with ( ms ) ; assert true ( file util set writable ( method dir , false ) ) ; mock sink errored = false ; try { / / publish the metrics ms publish metrics now ( ) ; assert false ( " an exception was generated while writing metrics " + " when the target directory was not writable , even though the " + " sink is set to ignore errors " , mock sink errored ) ; ms stop ( ) ; ms shutdown ( ) ; } finally { / / make sure the dir is writable again so we can delete it at the end method dir set writable ( true ) ; } }


determine whether the given class is a candidate for carrying the specified annotation ( at type , method or field level )

public static boolean is candidate class ( class < ? > clazz , string annotation name ) { if ( annotation name starts with ( " java " ) ) { return true ; } if ( annotations scanner has plain java annotations only ( clazz ) ) { return false ; } return true ; }


returns statistics over a dataset containing the given values the stream will be completely consumed by this method if you have a { @ code stream < double > } rather than a { @ code double stream } , you should collect the values using { @ link # to stats ( ) } instead

public static stats of ( double stream values ) { return values collect ( stats accumulator : : new , stats accumulator : : add , stats accumulator : : add all ) snapshot ( ) ; }


gets the paired { @ link plugin wrapper }

public plugin wrapper get wrapper ( ) { return wrapper ; }


determines the number of vf addresses in the vf table that begins at the specified base address

public static int get vf table count ( program program , address vf table base address ) { memory memory = program get memory ( ) ; memory block text block = memory get block ( " text " ) ; address set view initialized addresses = memory get loaded and initialized address set ( ) ; pseudo disassembler pseudo disassembler = new pseudo disassembler ( program ) ; / / create pointers starting at the address until reaching a 0 pointer / / terminate the possible table at any entry containing a cross reference that / / is beyond the first table entry and don ' t include it int table size = 0 ; address current vf pointer address = vf table base address ; int default pointer size = program get default pointer size ( ) ; while ( true ) { address referenced address = get absolute address ( program , current vf pointer address ) ; if ( referenced address = = null ) { break ; / / cannot get a virtual function address } if ( referenced address get offset ( ) = = 0 ) { break ; / / encountered 0 entry } if ( ! initialized addresses contains ( referenced address ) ) { break ; / / not pointing to initialized memory } if ( ( text block ! = null ) ? ! text block equals ( memory get block ( referenced address ) ) : false ) { break ; / / not pointing to text section } / / any references after the first one ends the table if ( table size > 0 & & program get reference manager ( ) has references to ( current vf pointer address ) ) { break ; } if ( ! pseudo disassembler is valid subroutine ( referenced address , true ) ) { break ; / / not pointing to possible function } table size + + ; / / count this entry in the table / / advance to the next table entry address current vf pointer address = current vf pointer address add ( default pointer size ) ; } return table size ; }


specify whether to add path variables to the model or not path variables are commonly bound to uri template variables through the { @ code @ path variable } annotation they ' re are effectively uri template variables with type conversion applied to them to derive typed object values such values are frequently needed in views for constructing links to the same and other u r ls path variables added to the model override static attributes ( see { @ link # set attributes ( properties ) } ) but not attributes already present in the model by default this flag is set to { @ code true } concrete view types can override this

public void set expose path variables ( boolean expose path variables ) { this expose path variables = expose path variables ; }


returns the current { @ link execution state } for this execution vertex

execution state get execution state ( ) ;


public static void build ( mesh part builder builder , float x 1 , float y 1 , float z 1 , float x 2 , float y 2 , float z 2 , float cap length , float stem thickness , int divisions ) { vector 3 begin = obtain v 3 ( ) set ( x 1 , y 1 , z 1 ) , end = obtain v 3 ( ) set ( x 2 , y 2 , z 2 ) ; float length = begin dst ( end ) ; float cone height = length * cap length ; float cone diameter = 2 * ( float ) ( cone height * math sqrt ( 1f / 3 ) ) ; float stem length = length - cone height ; float stem diameter = cone diameter * stem thickness ; vector 3 up = obtain v 3 ( ) set ( end ) sub ( begin ) nor ( ) ; vector 3 forward = obtain v 3 ( ) set ( up ) crs ( vector 3 z ) ; if ( forward is zero ( ) ) forward set ( vector 3 x ) ; forward crs ( up ) nor ( ) ; vector 3 left = obtain v 3 ( ) set ( up ) crs ( forward ) nor ( ) ; vector 3 direction = obtain v 3 ( ) set ( end ) sub ( begin ) nor ( ) ; / / matrices matrix 4 user transform = builder get vertex transform ( obtain m 4 ( ) ) ; matrix 4 transform = obtain m 4 ( ) ; float [ ] val = transform val ; val [ matrix 4 m00 ] = left x ; val [ matrix 4 m01 ] = up x ; val [ matrix 4 m02 ] = forward x ; val [ matrix 4 m10 ] = left y ; val [ matrix 4 m11 ] = up y ; val [ matrix 4 m12 ] = forward y ; val [ matrix 4 m20 ] = left z ; val [ matrix 4 m21 ] = up z ; val [ matrix 4 m22 ] = forward z ; matrix 4 temp = obtain m 4 ( ) ; / / stem transform set translation ( obtain v 3 ( ) set ( direction ) scl ( stem length / 2 ) add ( x 1 , y 1 , z 1 ) ) ; builder set vertex transform ( temp set ( transform ) mul ( user transform ) ) ; cylinder shape builder build ( builder , stem diameter , stem length , stem diameter , divisions ) ; / / cap transform set translation ( obtain v 3 ( ) set ( direction ) scl ( stem length ) add ( x 1 , y 1 , z 1 ) ) ; builder set vertex transform ( temp set ( transform ) mul ( user transform ) ) ; cone shape builder build ( builder , cone diameter , cone height , cone diameter , divisions ) ; builder set vertex transform ( user transform ) ; free all ( ) ; }


private void log released attribute entry ( final string attribute name , final object attribute value ) { logger debug ( " the attribute value [ { } ] for attribute name [ { } ] matches the pattern [ { } ] releasing attribute " , attribute value , attribute name , this compiled pattern pattern ( ) ) ; }


returns the server builder used to create server for each test run return { @ code null } if it shouldn ' t start a server in the same process

protected server builder < ? > get server builder ( ) { return null ; }


returns the result of calling { @ code to string } for a non - { @ code null } argument and { @ code " null " } for a { @ code null } argument

public static string to string ( object obj ) { return string value of ( obj ) ; }


attaches < code > recycler view header < code > to < code > recycler view < code > be sure that < code > set layout manager ( ) < code > has been called for < code > recycler view < code > before calling this method also , if you were planning to use < code > set on scroll listener ( ) < code > method for your < code > recycler view < code > , be sure to do it before calling this method

public void attach to ( recycler view recycler , boolean header already aligned ) { validate recycler ( recycler , header already aligned ) ; m recycler = recycler ; m already aligned = header already aligned ; m reversed = is layout manager reversed ( recycler ) ; setup alignment ( recycler ) ; setup header ( recycler ) ; }


protected boolean register one command ( butterfly module module , string name , command command object ) { return register one command ( module get name ( ) + " / " + name , command object ) ; }


returns < code > true < code > if queries should be lenient about unmapped fields the default is < code > true < code >

public boolean is default allow unmapped fields ( ) { return default allow unmapped fields ; }


invoked when the user has selected an item in the source panel

public void source panel selection changed ( boolean valid function ) { boolean has selection = source panel has selection ( ) ; boolean is immutable = source panel is selection immutable ( ) ; boolean is enabled = source panel is selection enabled ( ) ; add btn set enabled ( has selection & & valid function & & is enabled ) ; remove btn set enabled ( false ) ; if ( ! has selection ) { source panel clear selection ( ) ; } delete btn set enabled ( has selection & & ! is immutable ) ; }


called each time offline keys are removed

default void on drm keys removed ( int window index , @ nullable media period id media period id ) { }


returns an instance with a single command line

public static command lines of ( command line command line ) { return new command lines ( command line ) ; }


inserts a byte into this content at the given position

public void insert ( byte source , long position ) throws i o exception { if ( position > length ( ) ) return ; dirty = true ; last upper nibble position = position ; if ( actions ! = null ) actions event pre modify ( action history action type insert , position , true ) ; update changes ( position , true ) ; change list set ( ( int ) ( position - changes position ) , source & 0x 0ff ) ; notify listeners ( ) ; }


blocks until the stream is available or until the request is canceled

public synchronized optional < input stream > get stream ( ) { while ( stream = = null & & ! canceled ) { util wait ( this , 0 ) ; } return optional from nullable ( this stream ) ; }


return the number of gigabytes in this instance

public long to gigabytes ( ) { return this bytes / bytes per gb ; }


walks backward from the given start position to find the next namespace separator this allows clients to determine if a given position is inside of a namespace

private int find namespace start ( string text , int start , int stop ) { if ( ! text contains ( namespace delimiter ) ) { return - 1 ; } int colon count = 0 ; int paren depth = 0 ; int template depth = 0 ; int brace depth = 0 ; boolean is nested = false ; for ( int i = start ; i > = stop ; i - - ) { char c = text char at ( i ) ; switch ( c ) { case ' : ' : { colon count + + ; if ( colon count = = 2 ) { if ( ! is nested ) { return i + 2 ; } colon count = 0 ; } break ; } case ' ' : { if ( ! is nested ) { return - 1 ; / / a space implies a return type when not nested } break ; } case ' ( ' : { is nested = - - paren depth > 0 | | template depth > 0 | | brace depth > 0 ; break ; } case ' ) ' : { is nested = + + paren depth > 0 | | template depth > 0 | | brace depth > 0 ; break ; } case ' < ' : { is nested = paren depth > 0 | | - - template depth > 0 | | brace depth > 0 ; break ; } case ' > ' : { is nested = paren depth > 0 | | + + template depth > 0 | | brace depth > 0 ; break ; } case ' { ' : { is nested = paren depth > 0 | | template depth > 0 | | - - brace depth > 0 ; break ; } case ' } ' : { is nested = paren depth > 0 | | template depth > 0 | | + + brace depth > 0 ; break ; } default : continue ; } } return - 1 ; }


handles a redirect answer if needed and returns { @ code true } if a redirect query has been made

private boolean handle redirect ( dns question question , addressed envelope < dns response , inet socket address > envelope , final dns query lifecycle observer query lifecycle observer , promise < list < t > > promise ) { final dns response res = envelope content ( ) ; / / check if we have answers , if not this may be an non authority ns and so redirects must be handled if ( res count ( dns section answer ) = = 0 ) { authoritative name server list server names = extract authoritative name servers ( question name ( ) , res ) ; if ( server names ! = null ) { int additional count = res count ( dns section additional ) ; authoritative dns server cache authoritative dns server cache = authoritative dns server cache ( ) ; for ( int i = 0 ; i < additional count ; i + + ) { final dns record r = res record at ( dns section additional , i ) ; if ( r type ( ) = = dns record type a & & ! parent supports a records ( ) | | r type ( ) = = dns record type aaaa & & ! parent supports a a a a records ( ) ) { continue ; } / / we may have multiple additional entries for the same nameserver name for example one aaaa and / / one a record server names handle with additional ( parent , r , authoritative dns server cache ) ; } / / process all unresolved nameservers as well server names handle without additionals ( parent , resolve cache ( ) , authoritative dns server cache ) ; list < inet socket address > addresses = server names address list ( ) ; / / give the user the chance to sort or filter the used servers for the query dns server address stream server stream = parent new redirect dns server stream ( question name ( ) , addresses ) ; if ( server stream ! = null ) { query ( server stream , 0 , question , query lifecycle observer query redirected ( new dns address stream list ( server stream ) ) , true , promise , null ) ; return true ; } } } return false ; }


returns a new array based long buffer with the specified capacity

public static long buffer new long buffer ( int capacity ) { return new read write long array buffer ( capacity ) ; }


converts a string of the form " host : port " into an { @ link url }

public static url get correct hostname port ( string host port ) { return validate host port string ( host port ) ; }


tests that the function is invoked only once , even if it throws an exception

public void test transform value remains memoized ( ) throws exception { class holder { int value = 2 ; } final holder holder = new holder ( ) ; / / this function adds the holder ' s value to the input value function < integer , integer > adder = new function < integer , integer > ( ) { @ override public integer apply ( integer from ) { return from + holder value ; } } ; / / since holder value is 2 , applying 4 should yield 6 assert equals ( 6 , adder apply ( 4 ) int value ( ) ) ; listenable future < integer > immediate future = immediate future ( 4 ) ; future < integer > transformed future = transform ( immediate future , adder , direct executor ( ) ) ; / / the composed future also yields 6 assert equals ( 6 , get done ( transformed future ) int value ( ) ) ; / / repeated calls yield the same value even though the function ' s behavior / / changes holder value = 3 ; assert equals ( 6 , get done ( transformed future ) int value ( ) ) ; assert equals ( 7 , adder apply ( 4 ) int value ( ) ) ; / / once more , with feeling holder value = 4 ; assert equals ( 6 , get done ( transformed future ) int value ( ) ) ; assert equals ( 8 , adder apply ( 4 ) int value ( ) ) ; / / memoized get also retains the value assert equals ( 6 , get done from timeout overload ( transformed future ) int value ( ) ) ; / / unsurprisingly , recomposing the future will return an updated value assert equals ( 8 , get done ( transform ( immediate future , adder , direct executor ( ) ) ) int value ( ) ) ; / / repeating , with the timeout version assert equals ( 8 , get done from timeout overload ( transform ( immediate future , adder , direct executor ( ) ) ) int value ( ) ) ; }


defines the correct { @ link image transcoder } if a custom { @ link image transcoder } was define in the config , it will be used whenever possible else , if the native code is disabled it uses { @ link simple image transcoder factory } otherwise { @ link multi image transcoder factory } determines the { @ link image transcoder } to use based on the image format

private image transcoder factory get image transcoder factory ( ) { if ( m image transcoder factory = = null ) { if ( m config get image transcoder factory ( ) = = null & & m config get image transcoder type ( ) = = null & & m config get experiments ( ) is native code disabled ( ) ) { m image transcoder factory = new simple image transcoder factory ( m config get experiments ( ) get max bitmap size ( ) ) ; } else { m image transcoder factory = new multi image transcoder factory ( m config get experiments ( ) get max bitmap size ( ) , m config get experiments ( ) get use downsampling ratio for resizing ( ) , m config get image transcoder factory ( ) , m config get image transcoder type ( ) , m config get experiments ( ) is ensure transcoder library loaded ( ) ) ; } } return m image transcoder factory ; }


verify that when a service fails during its stop operation , its state does not change

public void test failing stop ( ) throws throwable { breakable service svc = new breakable service ( false , false , true ) ; svc init ( new configuration ( ) ) ; svc start ( ) ; try { svc stop ( ) ; fail ( " expected a failure , got " + svc ) ; } catch ( breakable service broken lifecycle event e ) { / / expected } assert state count ( svc , service state stopped , 1 ) ; }


create an open redirection url from a request it points to the same http f s endpoint but removes the " redirect " parameter

private uri create open redirection u r l ( uri info uri info ) { uri builder uri builder = uri info get request uri builder ( ) ; uri builder replace query param ( no redirect param name , ( object [ ] ) null ) ; return uri builder build ( ( object [ ] ) null ) ; }


clears and then copies the given settings into this object

public http 2 settings copy from ( http 2 settings settings ) { clear ( ) ; put all ( settings ) ; return this ; }


public builder add sdk dylibs ( nested set < string > sdk dylibs ) { this sdk dylibs add transitive ( sdk dylibs ) ; return this ; }


clears any usage marks from the given visitor accepter

protected void mark as unused ( visitor accepter visitor accepter ) { visitor accepter set visitor info ( null ) ; }


creates an instance for testing with the given embedded binaries root

public static bin tools for embedded bin ( path embedded binaries root , iterable < string > tools ) { return new bin tools ( embedded binaries root , immutable list copy of ( tools ) ) ; }


to test enum parameters to test enum parameters

public void test enum parameters ( list < string > enum header string array , string enum header string , list < string > enum query string array , string enum query string , integer enum query integer , double enum query double , list < string > enum form string array , string enum form string ) throws api exception { test enum parameters with http info ( enum header string array , enum header string , enum query string array , enum query string , enum query integer , enum query double , enum form string array , enum form string ) ; }


the entry for the list of resolved information


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

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


returns a fresh { @ link map maker internal map } with { @ link map maker dummy } values but otherwise as specified by the given { @ code builder } the returned { @ link map maker internal map } will be optimized to saved memory since { @ link map maker dummy } is a singleton , we don ' t need to store any values at all because of this optimization , { @ code build get value strength ( ) } must be { @ link strength # strong } this method is intended to only be used by the internal implementation of { @ link interners } , since a map of dummy values is the exact use case there

static < k > map maker internal map < k , dummy , ? extends internal entry < k , dummy , ? > , ? > create with dummy values ( map maker builder ) { if ( builder get key strength ( ) = = strength strong & & builder get value strength ( ) = = strength strong ) { return new map maker internal map < > ( builder , strong key dummy value entry helper < k > instance ( ) ) ; } if ( builder get key strength ( ) = = strength weak & & builder get value strength ( ) = = strength strong ) { return new map maker internal map < > ( builder , weak key dummy value entry helper < k > instance ( ) ) ; } if ( builder get value strength ( ) = = strength weak ) { throw new illegal argument exception ( " map cannot have both weak and dummy values " ) ; } throw new assertion error ( ) ; }


returns whether or not to skip bounding box validation

public static boolean is ignore malformed ( geo validation method method ) { return ( method = = geo validation method ignore malformed | | method = = geo validation method coerce ) ; }


creates { @ link validation exception } instance initialized with given error messages

public static validation exception with errors ( list < string > errors ) { validation exception e = new validation exception ( ) ; for ( string error : errors ) { e add validation error ( error ) ; } return e ; }


get the bytes associated with the specified code unit cu formatted as a string bytes will be returned as 2 - digit hex separated with a space any undefined bytes will be represented by " ? ? "

public static string get byte code string ( code unit cu ) { int length = cu get length ( ) ; string buffer buffer = new string buffer ( ) ; for ( int i = 0 ; i < length ; i + + ) { if ( i ! = 0 ) { buffer append ( " " ) ; } string hex ; try { hex = integer to hex string ( cu get byte ( i ) & 0x 0ff ) ; if ( hex length ( ) = = 1 ) { buffer append ( " 0 " ) ; } } catch ( memory access exception e ) { hex = " ? ? " ; } buffer append ( hex ) ; } return buffer to string ( ) ; }


public void bool item test ( ) { / / todo : test bool item }


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


visit a parse tree produced by the { @ code decimal literal } labeled alternative in { @ link sql base parser # number }

t visit decimal literal ( sql base parser decimal literal context ctx ) ;


create a new { @ code server service definition } whose { @ link server call handler } s will call { @ code interceptors } before calling the pre - existing { @ code server call handler } the last interceptor will have its { @ link server interceptor # intercept call } called first

public static server service definition intercept ( server service definition service def , list < ? extends server interceptor > interceptors ) { preconditions check not null ( service def , " service def " ) ; if ( interceptors is empty ( ) ) { return service def ; } server service definition builder service def builder = server service definition builder ( service def get service descriptor ( ) ) ; for ( server method definition < ? , ? > method : service def get methods ( ) ) { wrap and add method ( service def builder , method , interceptors ) ; } return service def builder build ( ) ; }


selects the given cell invalid cells are ignored

public void select cell ( @ not null grid pos cell ) { check widget ( ) ; add to cell selection ( cell ) ; update selection cache ( ) ; redraw ( ) ; }


private void read dictionary id data ( int total , writable int vector c , int row id ) { int left = total ; while ( left > 0 ) { if ( this current count = = 0 ) { this read next group ( ) ; } int n = math min ( left , this current count ) ; switch ( mode ) { case rle : c set ints ( row id , n , current value ) ; break ; case packed : c set ints ( row id , n , current buffer , current buffer idx ) ; current buffer idx + = n ; break ; } row id + = n ; left - = n ; current count - = n ; } }


returns a { @ link media source event listener event dispatcher } which dispatches all events to the registered listeners with the specified window index , media period id and time offset

protected final media source event listener event dispatcher create event dispatcher ( int window index , @ nullable media period id media period id , long media time offset ms ) { return event dispatcher with parameters ( window index , media period id , media time offset ms ) ; }


public boolean equals ( object o ) { if ( ! ( o instanceof simple writable ) ) return false ; simple writable other = ( simple writable ) o ; return this state = = other state ; }


controls the shard routing of the request using this value to hash the shard and not the id

public get request routing ( string routing ) { this routing = routing ; return this ; }


sanitize the given path uses the following rules : replace all " " by " "

private static string get sanitized path ( final string path ) { int index = path index of ( " / / " ) ; if ( index > = 0 ) { string builder sanitized = new string builder ( path ) ; while ( index ! = - 1 ) { sanitized delete char at ( index ) ; index = sanitized index of ( " / / " , index ) ; } return sanitized to string ( ) ; } return path ; }


public builder add defines ( iterable < string > defines ) { this defines add all ( defines ) ; return this ; }


returns an immutable view of this array ' s values as a { @ code list } ; note that { @ code double } values are boxed into { @ link double } instances on demand , which can be very expensive the returned list should be used once and discarded for any usages beyond that , pass the returned list to { @ link com google common collect immutable list # copy of ( collection ) immutable list copy of } and use that list instead

public list < double > as list ( ) { / * * typically we cache this kind of thing , but much repeated use of this view is a performance * anti - pattern anyway if we cache , then everyone pays a price in memory footprint even if * they never use this method * / return new as list ( this ) ; }


joins the specified multicast group at the specified interface and notifies the { @ link channel future } once the operation completes

channel future join group ( inet socket address multicast address , network interface network interface ) ;


validate a value against the set of regular expressions returning a string value of the aggregated groups

public string validate ( string value ) { if ( value = = null ) { return null ; } for ( pattern pattern : patterns ) { matcher matcher = pattern matcher ( value ) ; if ( matcher matches ( ) ) { int count = matcher group count ( ) ; if ( count = = 1 ) { return matcher group ( 1 ) ; } string builder buffer = new string builder ( ) ; for ( int j = 0 ; j < count ; j + + ) { string component = matcher group ( j + 1 ) ; if ( component ! = null ) { buffer append ( component ) ; } } return buffer to string ( ) ; } } return null ; }


void handle ( consumer record < string , bytes > record ) ;


reset the internal counter reset is needed when { @ link interval property # interval } or { @ link sample count property # sample count } is changed


the builder method if uri is null we use host , port , v host , username , password combination to initialize connection using { @ link r m q connection config # r m q connection config ( string , integer , string , string , string , integer , boolean , boolean , integer , integer , integer , integer , integer ) } otherwise the uri will be used to initialize the client connection { @ link r m q connection config # r m q connection config ( string , integer , boolean , boolean , integer , integer , integer , integer , integer ) }

public r m q connection config build ( ) { if ( this uri ! = null ) { return new r m q connection config ( this uri , this network recovery interval , this automatic recovery , this topology recovery , this connection timeout , this requested channel max , this requested frame max , this requested heartbeat , this prefetch count ) ; } else { return new r m q connection config ( this host , this port , this virtual host , this username , this password , this network recovery interval , this automatic recovery , this topology recovery , this connection timeout , this requested channel max , this requested frame max , this requested heartbeat , this prefetch count ) ; } }


< code > replace function parameter data type < code > replaces the data type of the indicated function parameter in program 1 with the data type from the origin program

public void replace function parameter data type ( address origin entry point , int ordinal , task monitor monitor ) { address result entry point = origin to result translator get address ( origin entry point ) ; function f 1 = result program get function manager ( ) get function at ( result entry point ) ; function f 2 = origin program get function manager ( ) get function at ( origin entry point ) ; if ( f 1 ! = null & & f 2 ! = null ) { parameter p 1 = f 1 get parameter ( get adjusted result ordinal ( f 1 , f 2 , ordinal ) ) ; parameter p 2 = f 2 get parameter ( ordinal ) ; try { try { if ( f 1 has custom variable storage ( ) & & p 1 get variable storage ( ) is unassigned storage ( ) ) { p 1 set data type ( p 2 get data type ( ) , p 2 get variable storage ( ) , false , f 2 get signature source ( ) ) ; } else if ( p 1 is auto parameter ( ) ) { / / skip / / todo : this may not handle all situations where p 2 really needs to be inserted ! ! string msg = " auto - parameter datatype may not be modified , " + p 1 get function ( ) get name ( true ) + " : " + p 1 get name ( ) ; msg error ( this , msg ) ; error msg append ( msg + " \ n " ) ; } else { data type dt = p 2 get data type ( ) ; if ( ! f 1 has custom variable storage ( ) ) { dt = p 2 get formal data type ( ) ; } p 1 set data type ( dt , true , false , source type analysis ) ; } } catch ( invalid input exception e ) { data type dt = p 2 get data type ( ) ; if ( ! f 1 has custom variable storage ( ) ) { dt = p 2 get formal data type ( ) ; } p 1 set data type ( dt , variable storage unassigned storage , false , source type default ) ; string msg = " parameter storage forced to unassigned for " + p 1 get function ( ) get name ( true ) + " : " + p 1 get name ( ) + " : \ n " + e get message ( ) ; msg error ( this , msg ) ; error msg append ( msg + " \ n " ) ; } } catch ( invalid input exception e ) { string msg = " can ' t replace parameter datatype for " + p 1 get function ( ) get name ( true ) + " : " + p 1 get name ( ) + " : \ n " + e get message ( ) ; msg error ( this , msg ) ; error msg append ( msg + " \ n " ) ; } } }


select the accept header ' s value from the given accepts array : if json exists in the given array , use it ; otherwise use all of them ( joining into a string )

public string select header accept ( string [ ] accepts ) { if ( accepts length = = 0 ) { return null ; } for ( string accept : accepts ) { if ( is json mime ( accept ) ) { return accept ; } } return string util join ( accepts , " , " ) ; }


public void set function ( boolean function ) { this function = function ; }


public static void close all ( closeable closeables ) throws i o exception { i o exception exception = null ; for ( closeable closeable : closeables ) { try { if ( closeable ! = null ) closeable close ( ) ; } catch ( i o exception e ) { if ( exception ! = null ) exception add suppressed ( e ) ; else exception = e ; } } if ( exception ! = null ) throw exception ; }


test adding objects only by add equality group , with no reference object specified in the constructor

public void test add equal object with o arg constructor ( ) { equals tester add equality group ( equal object 1 , not equal object 1 ) ; try { equals tester test equals ( ) ; } catch ( assertion failed error e ) { assert error message ( e , equal object 1 + " [ group 1 , item 1 ] must be object # equals to " + not equal object 1 + " [ group 1 , item 2 ] " ) ; return ; } fail ( " should get not equal to equal object error " ) ; }


verify creation of i node for acl enabled tree path throws an error

public void test to i node a c l not supported ( ) throws exception { block resolver block resolver = new fixed block resolver ( ) ; path root = new path ( " / " ) ; file status root file status = new file status ( 0 , false , 0 , 0 , 1 , root ) ; acl status acls = mock ( acl status class ) ; tree path tree path = new tree path ( root file status , 1 , null , null , acls ) ; u g i resolver ugi resolver = mock ( u g i resolver class ) ; when ( ugi resolver get permissions proto ( null , acls ) ) then return ( 1l ) ; tree path to i node ( ugi resolver , block resolver , null ) ; }


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

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


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

public boolean is set initial status ( ) { return this initial status ! = null ; }


marks the current { @ code reader index } in this buffer you can reposition the current { @ code reader index } to the marked { @ code reader index } by calling { @ link # reset reader index ( ) } the initial value of the marked { @ code reader index } is { @ code 0 }

public abstract byte buf mark reader index ( ) ;


public void set network timeout ( executor executor , int milliseconds ) throws s q l exception { }


undefined registered service service ticket expiration policy

static registered service service ticket expiration policy undefined ( ) { return new registered service service ticket expiration policy ( ) { private static final long serial version u i d = - 6204076273553630977l ; @ override public long get number of uses ( ) { return long min value ; } @ override public string get time to live ( ) { return null ; } } ; }


get the window that contains the specified provider ' s component

public window get provider window ( component provider provider ) { component placeholder placeholder = get active placeholder ( provider ) ; if ( placeholder ! = null ) { return root get window ( placeholder ) ; } return null ; }


returns a { @ link graph builder } for building undirected graphs

public static graph builder < object > undirected ( ) { return new graph builder < > ( false ) ; }


actually runs through the ast , calling the functions in the workspace file and adding rules to the external package

public void execute ( starlark file file , / / becomes resolved as a side effect map < string , module > additional loaded modules , workspace file value workspace file key workspace file key ) throws interrupted exception { loaded modules put all ( additional loaded modules ) ; / / set up predeclared environment hash map < string , object > predeclared = new hash map < > ( ) ; predeclared put all ( get default environment ( ) ) ; predeclared put all ( bindings ) ; / / ( may shadow bindings in default environment ) module module = module with predeclared ( starlark semantics , predeclared ) ; stored event handler local reporter = new stored event handler ( ) ; try { / / compile program prog = program compile file ( file , module ) ; / / create thread starlark thread thread = new starlark thread ( mutability , starlark semantics ) ; thread set loader ( loaded modules : : get ) ; thread set print handler ( event make debug print handler ( local reporter ) ) ; thread set thread local ( package factory package context class , new package factory package context ( builder , null , local reporter ) ) ; / / the workspace environment doesn ' t need the tools repository or the fragment map / / because executing workspace rules happens before analysis and it doesn ' t need a / / repository mapping because calls to the label constructor in the workspace file / / are , by definition , not in an external repository and so they don ' t need the mapping new bazel starlark context ( bazel starlark context phase workspace , / * tools repository = * / null , / * fragment name to class = * / null , / * repo mapping = * / immutable map of ( ) , / * converted labels in package = * / new hash map < > ( ) , new symbol generator < > ( workspace file key ) , / * analysis rule label = * / null ) store in thread ( thread ) ; list < string > globs = new array list < > ( ) ; / / unused if ( package factory check build syntax ( file , globs , globs , new hash map < > ( ) , error - > local reporter handle ( package error ( error location ( ) , error message ( ) , package loading code syntax error ) ) ) ) { try { starlark exec file program ( prog , module , thread ) ; } catch ( eval exception ex ) { local reporter handle ( package error ( null , ex get message with stack ( ) , package loading code starlark eval error ) ) ; } } / / accumulate the global bindings created by this chunk of the workspace file , / / for use in the next chunk this set does not include the bindings / / added by get default environment ; but it does include bindings created by load , / / so we will need to set the legacy load - binds - globally flag for this file in due course this bindings put all ( module get globals ( ) ) ; } catch ( syntax error exception ex ) { / / compilation failed event replay events on ( local reporter , ex errors ( ) ) ; } / / cleanup ( success or failure ) builder add posts ( local reporter get posts ( ) ) ; builder add events ( local reporter get events ( ) ) ; if ( local reporter has errors ( ) ) { builder set contains errors ( ) ; } }


returns whether the image is stored in the encoded memory cache

public boolean is in encoded memory cache ( final image request image request ) { if ( image request = = null ) { return false ; } final cache key cache key = m cache key factory get encoded cache key ( image request , null ) ; closeable reference < pooled byte buffer > ref = m encoded memory cache get ( cache key ) ; try { return closeable reference is valid ( ref ) ; } finally { closeable reference close safely ( ref ) ; } }


confirms if all messages have been consumed by all event processors

private boolean has backlog ( ) { final long cursor = ring buffer get cursor ( ) ; return consumer repository has backlog ( cursor , false ) ; }


public static void drop table ( database db , boolean if exists ) { string sql = " drop table " + ( if exists ? " if exists " : " " ) + " \ " relation entity \ " " ; db exec s q l ( sql ) ; }


public static void fire terminate ( object source ) { fire event ( new debug event ( source , debug event terminate ) ) ; }


returns the decision for where a shard should reside in the cluster if the shard is unassigned , then the { @ link allocate unassigned decision } will be non - null if the shard is not in the unassigned state , then the { @ link move decision } will be non - null this method is primarily used by the cluster allocation explain api to provide detailed explanations for the allocation of a single shard implementations of the { @ link # allocate ( routing allocation ) } method may use the results of this method implementation to decide on allocating shards in the routing table to the cluster if an implementation of this interface does not support explaining decisions for a single shard through the cluster explain api , then this method should throw a { @ code unsupported operation exception }

shard allocation decision decide shard allocation ( shard routing shard , routing allocation allocation ) ;


set a dimension resource to specify the padding value to use on each side of the carousel and in between carousel items

public void set padding res ( @ dimen res int padding res ) { int px = res to px ( padding res ) ; set padding ( px , px , px , px ) ; set item spacing px ( px ) ; }


test sps with empty file 1 create one empty file 2 call satisfy storage policy for empty file 3 sps should skip this file and xattr should not be added for empty file

public void test s p s when file length is zero ( ) throws exception { try { hdfs cluster = start cluster ( config , all disk types , num of datanodes , storages per datanode , capacity ) ; hdfs cluster wait active ( ) ; distributed file system fs = hdfs cluster get file system ( ) ; path file path = new path ( " / zero size file " ) ; d f s test util create file ( fs , file path , 0 , ( short ) 1 , 0 ) ; f s edit log editlog = hdfs cluster get name node ( ) get namesystem ( ) get edit log ( ) ; long last written tx id = editlog get last written tx id ( ) ; fs satisfy storage policy ( file path ) ; assert assert equals ( " xattr should not be added for the file " , last written tx id , editlog get last written tx id ( ) ) ; i node inode = hdfs cluster get name node ( ) get namesystem ( ) get f s directory ( ) get i node ( file path to string ( ) ) ; assert assert true ( " x attr feature should be null for file " , inode get x attr feature ( ) = = null ) ; } finally { shutdown cluster ( ) ; } }


called < b > before < b > any initialisation has been done this can for example be useful to change configuration settings before anything that uses those properties is created allows to tweak the process engine by passing the { @ link process engine configuration impl } which allows tweaking it programmatically an example is the jdbc url when a { @ link process engine configurator } instance wants to change it , it needs to do it in this method , or otherwise the datasource would already have been created with the ' old ' value for the jdbc url

void before init ( process engine configuration impl process engine configuration ) ;


public rack node get rack by name ( string name ) ;


public static void start mission ( context context , string [ ] urls , stored file helper storage , char kind , int threads , string source , string ps name , string [ ] ps args , long near length , mission recovery info [ ] recovery info ) { intent intent = new intent ( context , download manager service class ) ; intent set action ( intent action run ) ; intent put extra ( extra urls , urls ) ; intent put extra ( extra kind , kind ) ; intent put extra ( extra threads , threads ) ; intent put extra ( extra source , source ) ; intent put extra ( extra postprocessing name , ps name ) ; intent put extra ( extra postprocessing args , ps args ) ; intent put extra ( extra near length , near length ) ; intent put extra ( extra recovery info , recovery info ) ; intent put extra ( extra parent path , storage get parent uri ( ) ) ; intent put extra ( extra path , storage get uri ( ) ) ; intent put extra ( extra storage tag , storage get tag ( ) ) ; context start service ( intent ) ; }


returns the mean initial audio format bitrate , in bits per second , or { @ link c # length unset } if no audio format data is available

public int get mean initial audio format bitrate ( ) { return initial audio format bitrate count = = 0 ? c length unset : ( int ) ( total initial audio format bitrate / initial audio format bitrate count ) ; }


remove any user credentials for this proxy from the current thread statically specified user credentials apply again afterwards

public void remove credentials from current thread ( ) { this thread bound credentials remove ( ) ; }


returns any action that is bound to the given keystroke for the tool associated with this docking window manager instance

action get action for key stroke ( key stroke key stroke ) { docking tool actions tool actions = tool get tool actions ( ) ; if ( tool actions instanceof tool actions ) { / / using a cast here ; it didn ' t make sense to include this ' get action ' on the / / docking tool actions return ( ( tool actions ) tool actions ) get action ( key stroke ) ; } return null ; }


gets the default gnu demangler native process

public static synchronized gnu demangler native process get demangler native process ( ) throws i o exception { return get demangler native process ( demangler gnu ) ; }


returns a byte array representing this implementor of this interface

public byte [ ] to bytes ( data converter dc ) throws i o exception ;


throws the given { @ code throwable } in scenarios where the signatures do not allow you to throw an arbitrary throwable errors and runtime exceptions are thrown directly , other exceptions are packed into runtime exceptions

public static void rethrow ( throwable t ) { if ( t instanceof error ) { throw ( error ) t ; } else if ( t instanceof runtime exception ) { throw ( runtime exception ) t ; } else { throw new runtime exception ( t ) ; } }


return the underlying source of the resolvable type will return a { @ link field } , { @ link method parameter } or { @ link type } depending on how the { @ link resolvable type } was constructed with the exception of the { @ link # none } constant , this method will never return { @ code null } this method is primarily to provide access to additional type information or meta - data that alternative jvm languages may provide

public object get source ( ) { object source = ( this type provider ! = null ? this type provider get source ( ) : null ) ; return ( source ! = null ? source : this type ) ; }


test that program merge determines addresses in program 1 that are not in program 2

public void test only in one ( ) throws exception { program builder 1 create memory ( " d 1 " , " 0x 1 0 0 " , 0x 1 0 0 , null , ( byte ) 0x a c ) ; program builder 1 create memory ( " d 2 " , " 0x 2 0 0 " , 0x 1 0 0 ) ; program builder 2 create memory ( " d 1 " , " 0x 1 0 0 " , 0x 1 0 0 , null , ( byte ) 0x a f ) ; program builder 2 create memory ( " d 4 " , " 0x 4 0 0 " , 0x 1 0 0 ) ; program merge = new program merge manager ( p 1 , p 2 , task monitor adapter dummy monitor ) ; address set view as = program merge get addresses only in one ( ) ; address set as 1 = new address set ( ) ; as 1 add ( new address range impl ( addr ( 0x 2 0 0 ) , addr ( 0x 2ff ) ) ) ; assert equals ( as , as 1 ) ; }


public draw order [ ] get draw order ( ) { return m draw order ; }


restore pattern pair set from xml pull parser

public void restore xml ( xml pull parser parser , pattern factory pfactory ) throws i o exception { xml element el = parser start ( " patternpairs " ) ; total bits of check = spec xml utils decode int ( el get attribute ( " totalbits " ) ) ; post bits of check = spec xml utils decode int ( el get attribute ( " postbits " ) ) ; parser start ( " prepatterns " ) ; el = parser peek ( ) ; while ( el is start ( ) ) { ditted bit sequence preseq = new ditted bit sequence ( ) ; preseq restore xml data ( parser ) ; pre sequences add ( preseq ) ; el = parser peek ( ) ; } parser end ( ) ; while ( parser peek ( ) is start ( ) ) { parser start ( " postpatterns " ) ; el = parser peek ( ) ; array list < ditted bit sequence > postdit = new array list < ditted bit sequence > ( ) ; while ( el is start ( ) & & el get name ( ) equals ( " data " ) ) { ditted bit sequence postseq = new ditted bit sequence ( ) ; postseq restore xml data ( parser ) ; if ( postseq get num fixed bits ( ) > = post bits of check ) { postdit add ( postseq ) ; } el = parser peek ( ) ; } array list < post rule > post rule array = new array list < post rule > ( ) ; array list < match action > match action array = new array list < match action > ( ) ; if ( pfactory ! = null ) { pattern restore xml attributes ( post rule array , match action array , parser , pfactory ) ; } post rule [ ] post rules = new post rule [ post rule array size ( ) ] ; post rule array to array ( post rules ) ; match action [ ] match actions = new match action [ match action array size ( ) ] ; match action array to array ( match actions ) ; for ( ditted bit sequence element : postdit ) { pattern postpat = new pattern ( element , 0 , post rules , match actions ) ; post patterns add ( postpat ) ; } parser end ( ) ; / / end postpatterns } parser end ( ) ; / / end patternlist }


set the cache operation attribute source which is used to find cache attributes this should usually be identical to the source reference set on the cache interceptor itself

public void set cache operation source ( j cache operation source cache operation source ) { this cache operation source = cache operation source ; }


get the difference between the the current value and { @ link # starting value }

public long diff ( ) { return current value ( ) - starting value ; }


the instances are equal , but do not have object identity interceptors and interfaces and the target are the same

public void test singleton instances are equal ( ) { i test bean test 1 = ( i test bean ) factory get bean ( " test 1 " ) ; i test bean test 1 1 = ( i test bean ) factory get bean ( " test 1 " ) ; / / assert true ( " singleton instances = = " , test 1 = = test 1 1 ) ; assert that ( test 1 1 ) as ( " singleton instances = = " ) is equal to ( test 1 ) ; test 1 set age ( 25 ) ; assert that ( test 1 1 get age ( ) ) is equal to ( test 1 get age ( ) ) ; test 1 set age ( 250 ) ; assert that ( test 1 1 get age ( ) ) is equal to ( test 1 get age ( ) ) ; advised pc 1 = ( advised ) test 1 ; advised pc 2 = ( advised ) test 1 1 ; assert that ( pc 2 get advisors ( ) ) is equal to ( pc 1 get advisors ( ) ) ; int old length = pc 1 get advisors ( ) length ; nop interceptor di = new nop interceptor ( ) ; pc 1 add advice ( 1 , di ) ; assert that ( pc 2 get advisors ( ) ) is equal to ( pc 1 get advisors ( ) ) ; assert that ( pc 2 get advisors ( ) length ) as ( " now have one more advisor " ) is equal to ( ( old length + 1 ) ) ; assert that ( 0 ) is equal to ( di get count ( ) ) ; test 1 set age ( 5 ) ; assert that ( test 1 get age ( ) ) is equal to ( test 1 1 get age ( ) ) ; assert that ( 3 ) is equal to ( di get count ( ) ) ; }


sets an intercept touch handler that will be invoked when { @ link host view # on intercept touch event } is called

public void set intercept touch event handler ( @ nullable intercept touch handler intercept touch event handler ) { m on intercept touch event handler = intercept touch event handler ; }


registers this listener container as jms exception listener on the shared connection

protected void prepare shared connection ( connection connection ) throws j m s exception { super prepare shared connection ( connection ) ; connection set exception listener ( this ) ; }


adds a new node with the default number of replica

public synchronized void add ( t node ) { add ( node , default replication ) ; }


return the name of the target interface that this invoker operates on

public string get target interface name ( ) throws remote exception ;


interrupts and waits for all threads to complete ( using ' join ( ) ' ) rethrows exceptions accumulated by the execution of threads

public void clean up ( ) { stopping = true ; system out println ( " [ async testing ] interrupting and waiting for " + threads size ( ) + " threads to complete " ) ; while ( ! threads is empty ( ) ) { thread t = threads remove first ( ) ; try { t interrupt ( ) ; t join ( ) ; } catch ( interrupted exception e ) { throw new runtime exception ( e ) ; } } if ( ! problems is empty ( ) ) { throw new runtime exception ( " caught " + problems size ( ) + " exception ( s ) first one is included as cause " , problems get first ( ) ) ; } }


applies the given visitor to all local variable types

public void local variables accept ( clazz clazz , method method , code attribute code attribute , local variable type info visitor local variable type info visitor ) { for ( int index = 0 ; index < u 2local variable type table length ; index + + ) { / / we don ' t need double dispatching here , since there is only one / / type of local variable type info local variable type info visitor visit local variable type info ( clazz , method , code attribute , local variable type table [ index ] ) ; } }


check if a shard exists in the backup store


this creates two bindings one for the { @ code map entry < k , provider < v > > } and another for { @ code v }

public linked binding builder < v > add binding ( k key ) { multibinder check not null ( key , " key " ) ; multibinder check configuration ( ! is initialized ( ) , " map binder was already initialized " ) ; key < v > value key = key get ( value type , new real element ( entry set binder get set name ( ) ) ) ; entry set binder add binding ( ) to instance ( new map entry < > ( key , binder get provider ( value key ) ) ) ; return binder bind ( value key ) ; }


makes the frame buffer current so everything gets drawn to it , must be followed by call to either { @ link # next side ( ) } or { @ link # bind side ( com badlogic gdx graphics cubemap cubemap side ) } to activate the side to render onto

public void bind ( ) { current side = - 1 ; super bind ( ) ; }


verify that an invalid entry into the manual input field is rejected

public void test manual insert invalid ( ) { load bytes ( " 0000 abcd efgh 01011 " ) ; instruction table = dialog get table panel ( ) get table ( ) ; preview table = dialog get preview table panel ( ) get table ( ) ; assert equals ( 0 , dialog get search data ( ) get instructions ( ) size ( ) ) ; assert equals ( 0 , instruction table get row count ( ) ) ; window error dialog = wait for window by title containing ( " input error " ) ; assert not null ( error dialog ) ; run swing ( ( ) - > error dialog set visible ( false ) ) ; }


writes this module element to the given binder ( optional operation )


public void array item test ( ) { / / todo : test array item }


update accumulators ( discarded when the execution has already been terminated )

public void set accumulators ( map < string , accumulator < ? , ? > > user accumulators ) { synchronized ( accumulator lock ) { if ( ! state is terminal ( ) ) { this user accumulators = user accumulators ; } } }


copies all mappings from the specified table to this table the effect is equivalent to calling { @ link # put } with each row key column key value mapping in { @ code table }

void put all ( table < ? extends r , ? extends c , ? extends v > table ) ;


public integer get integer item ( ) { return integer item ; }


the collection of { @ link job } objects found in the query

public list < job > jobs ( ) { return results ; }


get all the trash roots for current user or all users

public collection < file status > get trash roots ( boolean all users ) { path user home = new path ( get home directory ( ) to uri ( ) get path ( ) ) ; list < file status > ret = new array list < > ( ) ; try { if ( ! all users ) { path user trash = new path ( user home , trash prefix ) ; if ( exists ( user trash ) ) { ret add ( get file status ( user trash ) ) ; } } else { path home parent = user home get parent ( ) ; if ( exists ( home parent ) ) { file status [ ] candidates = list status ( home parent ) ; for ( file status candidate : candidates ) { path user trash = new path ( candidate get path ( ) , trash prefix ) ; if ( exists ( user trash ) ) { candidate set path ( user trash ) ; ret add ( candidate ) ; } } } } } catch ( i o exception e ) { logger warn ( " cannot get all trash roots " , e ) ; } return ret ; }


private string get filename ( file split split ) { return split get path ( ) get name ( ) ; }


creates a single container priority - 1 request and submits to scheduler

protected application attempt id create scheduling request ( int memory , string queue id , string user id ) { return create scheduling request ( memory , queue id , user id , 1 ) ; }


update the extra data fields to contain a zip 6 4 extended information field if required

private static void add zip 6 4 extra ( zip file entry entry ) { enum set < feature > features = entry get feature set ( ) ; extra data list extra = entry get extra ( ) ; int extra size = 0 ; if ( features contains ( feature zip64 size ) ) { extra size + = 8 ; } if ( features contains ( feature zip64 csize ) ) { extra size + = 8 ; } if ( features contains ( feature zip64 offset ) ) { extra size + = 8 ; } if ( extra size > 0 ) { extra remove ( ( short ) 0x 0 0 0 1 ) ; byte [ ] zip 6 4 extra = new byte [ extra data fixed data size + extra size ] ; zip util short to little endian ( zip 6 4 extra , extra data id offset , ( short ) 0x 0 0 0 1 ) ; zip util short to little endian ( zip 6 4 extra , extra data length offset , ( short ) extra size ) ; int offset = extra data fixed data size ; if ( features contains ( feature zip64 size ) ) { zip util long to little endian ( zip 6 4 extra , offset , entry get size ( ) ) ; offset + = 8 ; } if ( features contains ( feature zip64 csize ) ) { zip util long to little endian ( zip 6 4 extra , offset , entry get compressed size ( ) ) ; offset + = 8 ; } if ( features contains ( feature zip64 offset ) ) { zip util long to little endian ( zip 6 4 extra , offset , entry get local header offset ( ) ) ; } extra add ( new extra data ( zip 6 4 extra , 0 ) ) ; } }


assert that the upstream signaled the specified values in order and then failed with a specific class or subclass of { @ link throwable }

public final u assert failure ( @ non null class < ? extends throwable > error , @ non null t values ) { return assert subscribed ( ) assert values ( values ) assert error ( error ) assert not complete ( ) ; }


configuration mutations not logged ( i e not persisted ) as such , they are not persisted and not versioned hence , version is always compatible , since it is in - memory

public void check version ( ) { / / does nothing ( version is always compatible since it ' s in memory ) }


unique id for the router , typically the hostname : port string for the router ' s rpc server this id may be null on router startup before the rpc server has bound to a port

public string get router id ( ) { return this router id ; }


check that the deprecated " edge n gram " filter throws exception for indices created since 7 0 0 and logs a warning for earlier indices when the filter is used as a custom filter

public void test edge n gram filter in custom analyzer deprecation error ( ) throws i o exception { final settings settings = settings builder ( ) put ( environment path home setting get key ( ) , create temp dir ( ) ) put ( index metadata setting version created , version utils random version between ( random ( ) , version v 8 0 0 , version current ) ) put ( " index analysis analyzer custom analyzer type " , " custom " ) put ( " index analysis analyzer custom analyzer tokenizer " , " standard " ) put list ( " index analysis analyzer custom analyzer filter " , " my ngram " ) put ( " index analysis filter my ngram type " , " edge n gram " ) build ( ) ; try ( common analysis plugin common analysis plugin = new common analysis plugin ( ) ) { illegal argument exception ex = expect throws ( illegal argument exception class , ( ) - > create test analysis ( index settings module new index settings ( " index " , settings ) , settings , common analysis plugin ) ) ; assert equals ( " the [ edge n gram ] token filter name was deprecated in 6 4 and cannot be used in new indices " + " please change the filter name to [ edge ngram ] instead " , ex get message ( ) ) ; } final settings settings pre 7 = settings builder ( ) put ( environment path home setting get key ( ) , create temp dir ( ) ) put ( index metadata setting version created , version utils random version between ( random ( ) , version v 7 0 0 , version v 7 6 0 ) ) put ( " index analysis analyzer custom analyzer type " , " custom " ) put ( " index analysis analyzer custom analyzer tokenizer " , " standard " ) put list ( " index analysis analyzer custom analyzer filter " , " my ngram " ) put ( " index analysis filter my ngram type " , " edge n gram " ) build ( ) ; try ( common analysis plugin common analysis plugin = new common analysis plugin ( ) ) { create test analysis ( index settings module new index settings ( " index " , settings pre 7 ) , settings pre 7 , common analysis plugin ) ; assert warnings ( " the [ edge n gram ] token filter name is deprecated and will be removed in a future version " + " please change the filter name to [ edge ngram ] instead " ) ; } }


returns a { @ link set } of all header names in this object the returned { @ link set } cannot be modified


public integer get snake case ( ) { return snake case ; }


sets the aliases to be used on the target index

public resize request set aliases ( list < alias > aliases ) { this aliases clear ( ) ; this aliases add all ( aliases ) ; return this ; }


returns a fragment of the output directory name for this configuration the output directory for the whole configuration contains all the short names by all fragments

public string get output directory name ( ) { return null ; }


sets the < code > anytype 1 < code > property

public additional properties class anytype 1 ( object anytype 1 ) { this anytype 1 = anytype 1 ; return this ; }


create the appropriate { @ link licenses provider } for a rule based on its { @ code rule context }

public static licenses provider of ( rule context rule context ) { if ( ! rule context get configuration ( ) check licenses ( ) ) { return empty ; } nested set builder < target license > builder = nested set builder link order ( ) ; build configuration configuration = rule context get configuration ( ) ; rule rule = rule context get rule ( ) ; attribute map attributes = rule context attributes ( ) ; license tool output license = rule get tool output license ( attributes ) ; target license output licenses = tool output license = = null ? null : new target license ( rule get label ( ) , tool output license ) ; if ( configuration is tool configuration ( ) & & tool output license ! = null ) { if ( tool output license ! = license no license ) { builder add ( output licenses ) ; } } else { if ( rule get license ( ) ! = license no license ) { builder add ( new target license ( rule get label ( ) , rule get license ( ) ) ) ; } list multimap < string , ? extends transitive info collection > configured map = rule context get configured target map ( ) ; for ( string dep attr name : attributes get attribute names ( ) ) { / / only add the transitive licenses for the attributes that do not have the output licenses attribute attribute = attributes get attribute definition ( dep attr name ) ; for ( transitive info collection dep : configured map get ( dep attr name ) ) { licenses provider provider = dep get provider ( licenses provider class ) ; if ( provider = = null ) { continue ; } if ( use output licenses ( attribute , configuration ) & & provider has output licenses ( ) ) { builder add ( provider get output licenses ( ) ) ; } else { builder add transitive ( provider get transitive licenses ( ) ) ; } } } } return new licenses provider impl ( builder build ( ) , output licenses ) ; }


returns current or last client area if grid controls are stacked then only the top is visible and has real client area so we cache it - all stack has the same client area

private rectangle get current or last client area ( ) { rectangle client area = get client area ( ) ; if ( client area width = = 0 ) { if ( last client area = = null ) { return client area ; } return last client area ; } last client area = client area ; return client area ; }