public class data read class data ( ) { ensure four bytes aligned ( table of contents class datas , false ) ; return super read class data ( ) ; }


convenient method to find a single object given a single string parameter

public t find object ( string p 1 ) throws data access exception { return find object ( p 1 , null ) ; }


verifies that { @ code key } and { @ code value } are non - null , and returns a new immutable entry with those values a call to { @ link entry # set value } on the returned entry will always throw { @ link unsupported operation exception }

static < k , v > entry < k , v > entry of ( k key , v value ) { check entry not null ( key , value ) ; return new abstract map simple immutable entry < > ( key , value ) ; }


check safe mode stays in extension pending extension period

public void test check safe mode 5 ( ) { bm safe mode activate ( block total ) ; whitebox set internal state ( bm safe mode , " extension " , integer max value ) ; set safe mode status ( b m safe mode status extension ) ; set block safe ( block threshold ) ; bm safe mode check safe mode ( ) ; assert equals ( b m safe mode status extension , get safe mode status ( ) ) ; }


a convenience method to create a worker that uses a shared thread pool for performing operations for gui clients in a background thread < p > note : the shared thread pool of the worker created here has a max number of threads as defined by { @ link system utilities # get default thread pool size ( ) } if there is a point in time where we notice contention in thread due to too many clients of this method ( i e , too many tasks are blocking because the thread pool is full ) , then we can update the size of the thread pool for this worker

public static worker create gui worker ( ) { return new worker ( swing gswing thread pool name ) ; }


public file download file from response ( response response ) throws api exception { try { file file = prepare download file ( response ) ; files copy ( response read entity ( input stream class ) , file to path ( ) ) ; return file ; } catch ( i o exception e ) { throw new api exception ( e ) ; } }


enable this to get merge path support for devices running kit kat ( 19 ) and above merge paths currently don ' t work if the the operand shape is entirely contained within the first shape if you need to cut out one shape from another shape , use an even - odd fill type instead of using merge paths

public void enable merge paths for kit kat and above ( boolean enable ) { lottie drawable enable merge paths for kit kat and above ( enable ) ; }


return true if this outer composite object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } outer composite outer composite = ( outer composite ) o ; return objects equals ( this my number , outer composite my number ) & & objects equals ( this my string , outer composite my string ) & & objects equals ( this my boolean , outer composite my boolean ) ; }


regression test for b 1 6 2 4 3 1 5 1 4 the { @ code labels } query operator uses { @ link configured target accessor # get prerequisites } which is the actual logic being tested here

public void test get prerequisites from alias returns actual prerequisites ( ) throws exception { mock rule rule with dep = ( ) - > mock rule define ( " rule with dep " , attr ( " dep " , label ) allowed file types ( file type set any file ) ) ; helper use rule class provider ( set rule class providers ( rule with dep ) build ( ) ) ; write file ( " test / build " , " alias ( name = ' alias ' , actual = ' : actual ' ) " , " rule with dep ( name = ' actual ' , dep = ' : dep ' ) " , " rule with dep ( name = ' dep ' ) " ) ; keyed configured target dep = iterables get only element ( eval ( " labels ( ' dep ' , ' / / test : alias ' ) " ) ) ; assert that ( dep get label ( ) ) is equal to ( label parse absolute unchecked ( " / / test : dep " ) ) ; }


get the { @ link path } to the output directory for the map - reduce job

public static path get output path ( job context job ) { string name = job get configuration ( ) get ( file output format outdir ) ; return name = = null ? null : new path ( name ) ; }


sets the model ' s current selection to the indicated selection if the selection is empty , it gets adjusted to the empty last line when in unlocked mode

public void set selection ( field selection selection ) { if ( updating selection ) { return ; } if ( this selection equals ( selection ) ) { return ; } end field editing ( ) ; this selection clear ( ) ; int num ranges = selection get num ranges ( ) ; for ( int i = 0 ; i < num ranges ; i + + ) { field range range = selection get field range ( i ) ; this selection add range ( range get start ( ) get index ( ) int value ( ) , range get end ( ) get index ( ) int value ( ) ) ; } adjust current row ( ) ; selection changed ( ) ; }


{ @ link default node } holds statistics of every node in the invoke tree we use parent id to hold the tree structure

public static node vo from default node ( default node node , string parent id ) { if ( node = = null ) { return null ; } node vo vo = new node vo ( ) ; vo id = uuid random u u i d ( ) to string ( ) ; vo parent id = parent id ; vo resource = node get id ( ) get show name ( ) ; vo thread num = node cur thread num ( ) ; vo pass qps = ( long ) node pass qps ( ) ; vo block qps = ( long ) node block qps ( ) ; vo total qps = ( long ) node total qps ( ) ; vo average rt = ( long ) node avg rt ( ) ; vo success qps = ( long ) node success qps ( ) ; vo exception qps = ( long ) node exception qps ( ) ; vo one minute exception = node total exception ( ) ; vo one minute pass = node total request ( ) - node block request ( ) ; vo one minute block = node block request ( ) ; vo one minute total = node total request ( ) ; vo timestamp = system current time millis ( ) ; return vo ; }


public map < string , config key > config keys ( ) { return config keys ; }


build an { @ link r socket requester } with an { @ link io rsocket core r socket client } that connects over web socket to the given url the requester can be used to make requests concurrently requests are made over a shared connection that is also re - established as needed when further requests are made

r socket requester websocket ( uri uri ) ;


constructs a { @ link container logs request } object , and obtains { @ link container logs request } from the corresponding { @ link log aggregation file controller }

public list < container log meta > get container log metas ( ) throws i o exception { application id application id = application id from string ( get app id ( ) ) ; container logs request request = new container logs request ( ) ; request set app id ( application id ) ; request set app attempt id ( application attempt id ) ; if ( container id ! = null ) { request set container id ( container id to string ( ) ) ; } request set app owner ( app owner ) ; request set node id ( node id ) ; return factory get file controller for read ( application id , app owner ) read aggregated logs meta ( request ) ; }


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


public string [ ] get reserved columns ( ) { string [ ] pass through col names = new string [ reserved cols length ] ; for ( int i = 0 ; i < reserved cols length ; i + + ) { pass through col names [ i ] = input col names [ reserved cols [ i ] ] ; } return pass through col names ; }


test to verify access check failure leaves intermediate folders undeleted

public void test delete auth check failure leaves files undeleted ( ) throws throwable { path parent dir = new path ( " / test delete auth check failure leaves files undeleted " ) ; path child path 1 = new path ( parent dir , " child 1 " ) ; path child path 2 = new path ( parent dir , " child 2 " ) ; path test path 1 = new path ( child path 1 , " test dat " ) ; path test path 2 = new path ( child path 2 , " test dat " ) ; authorizer add auth rule for owner ( " / " , write , true ) ; authorizer add auth rule for owner ( " / test delete auth check failure leaves files undeleted * " , write , true ) ; fs update wasb authorizer ( authorizer ) ; try { fs create ( test path 1 ) ; fs create ( test path 2 ) ; contract test utils assert path exists ( fs , " test path 1 was not created " , test path 1 ) ; contract test utils assert path exists ( fs , " test path 2 was not created " , test path 2 ) ; / / revoke write on one of the child folders authorizer delete all auth rules ( ) ; authorizer add auth rule for owner ( " / " , write , true ) ; authorizer add auth rule for owner ( parent dir to string ( ) , write , true ) ; authorizer add auth rule for owner ( child path 2 to string ( ) , write , true ) ; authorizer add auth rule for owner ( child path 1 to string ( ) , write , false ) ; assert false ( fs delete ( parent dir , true ) ) ; / / assert that only child 2 contents are deleted contract test utils assert path exists ( fs , " child 1 is deleted ! " , test path 1 ) ; contract test utils assert path does not exist ( fs , " child 2 exists after deletion ! " , test path 2 ) ; contract test utils assert path does not exist ( fs , " child 2 exists after deletion ! " , child path 2 ) ; contract test utils assert path exists ( fs , " parent dir is deleted ! " , parent dir ) ; } finally { allow recursive delete ( fs , parent dir to string ( ) ) ; fs delete ( parent dir , true ) ; } }


public void set max header table size ( byte buf out , long max header table size ) throws http 2 exception { if ( max header table size < min header table size | | max header table size > max header table size ) { throw connection error ( protocol error , " header table size must be > = % d and < = % d but was % d " , min header table size , max header table size , max header table size ) ; } if ( this max header table size = = max header table size ) { return ; } this max header table size = max header table size ; ensure capacity ( 0 ) ; / / casting to integer is safe as we verified the max header table size is a valid unsigned int encode integer ( out , 0x 2 0 , 5 , max header table size ) ; }


finishes creating the cache , must be called after a call to { @ link # begin ( ) } , only after this call the cache will be valid ( until the next call to { @ link # begin ( ) } ) calling this method will process all renderables added using one of the add ( ) methods and will combine them if possible

public void end ( ) { if ( ! building ) throw new gdx runtime exception ( " call begin ( ) prior to calling end ( ) " ) ; building = false ; if ( items size = = 0 ) return ; sorter sort ( camera , items ) ; int item count = items size ; int init count = renderables size ; final renderable first = items get ( 0 ) ; vertex attributes vertex attributes = first mesh part mesh get vertex attributes ( ) ; material material = first material ; int primitive type = first mesh part primitive type ; int offset = renderables size ; mesh builder begin ( vertex attributes ) ; mesh part part = mesh builder part ( " " , primitive type , mesh part pool obtain ( ) ) ; renderables add ( obtain renderable ( material , primitive type ) ) ; for ( int i = 0 , n = items size ; i < n ; + + i ) { final renderable renderable = items get ( i ) ; final vertex attributes va = renderable mesh part mesh get vertex attributes ( ) ; final material mat = renderable material ; final int pt = renderable mesh part primitive type ; final boolean same attributes = va equals ( vertex attributes ) ; final boolean indexed mesh = renderable mesh part mesh get num indices ( ) > 0 ; final int vertices to add = indexed mesh ? renderable mesh part mesh get num vertices ( ) : renderable mesh part size ; final boolean can hold vertices = mesh builder get num vertices ( ) + vertices to add < = mesh builder max vertices ; final boolean same mesh = same attributes & & can hold vertices ; final boolean same part = same mesh & & pt = = primitive type & & mat same ( material , true ) ; if ( ! same part ) { if ( ! same mesh ) { final mesh mesh = mesh builder end ( mesh pool obtain ( vertex attributes , mesh builder get num vertices ( ) , mesh builder get num indices ( ) ) ) ; while ( offset < renderables size ) renderables get ( offset + + ) mesh part mesh = mesh ; mesh builder begin ( vertex attributes = va ) ; } final mesh part new part = mesh builder part ( " " , pt , mesh part pool obtain ( ) ) ; final renderable previous = renderables get ( renderables size - 1 ) ; previous mesh part offset = part offset ; previous mesh part size = part size ; part = new part ; renderables add ( obtain renderable ( material = mat , primitive type = pt ) ) ; } mesh builder set vertex transform ( renderable world transform ) ; mesh builder add mesh ( renderable mesh part mesh , renderable mesh part offset , renderable mesh part size ) ; } final mesh mesh = mesh builder end ( mesh pool obtain ( vertex attributes , mesh builder get num vertices ( ) , mesh builder get num indices ( ) ) ) ; while ( offset < renderables size ) renderables get ( offset + + ) mesh part mesh = mesh ; final renderable previous = renderables get ( renderables size - 1 ) ; previous mesh part offset = part offset ; previous mesh part size = part size ; }


initial de select fields with unselected fields

public void init fields ( set < string > unselected fields ) { if ( unselected fields = = null ) { return ; } for ( string field : unselected fields ) { if ( ! field trim ( ) is empty ( ) ) { string [ ] literals array = field split ( " , " ) ; for ( string literals : literals array ) { if ( literals ! = null & & ! literals trim ( ) is empty ( ) ) { de select type type = de select type obtain type ( literals ) ; if ( type = = null ) { log warn ( " invalid de selects string " + literals trim ( ) ) ; de select type [ ] type array = de select type values ( ) ; string all suppport literals = arrays to string ( type array ) ; throw new bad request exception ( " invalid de selects string " + literals trim ( ) + " specified it should be one of " + all suppport literals ) ; } else { this types add ( type ) ; } } } } } }


removes the function with the given entry point

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


constructs a new { @ link file artifact value } , optionally taking a known stat and digest

private file artifact value construct file artifact value ( artifact artifact , @ nullable file status with digest stat no follow , @ nullable byte [ ] injected digest ) throws i o exception { check state ( ! artifact is tree artifact ( ) , " % s is a tree artifact " , artifact ) ; file artifact value value = file artifact value from artifact ( artifact , artifact path resolver , stat no follow , injected digest ! = null , / / prevent constant metadata artifacts from notifying the timestamp granularity monitor / / and potentially delaying the build for no reason artifact is constant metadata ( ) ? null : tsgm ) ; / / ensure that we don ' t have both an injected digest and a digest from the filesystem byte [ ] file digest = value get digest ( ) ; if ( file digest ! = null & & injected digest ! = null ) { throw new illegal state exception ( string format ( " digest % s was injected for artifact % s , but got % s from the filesystem ( % s ) " , base encoding base 1 6 ( ) encode ( injected digest ) , artifact , base encoding base 1 6 ( ) encode ( file digest ) , value ) ) ; } file state type type = value get type ( ) ; if ( ! type exists ( ) ) { / / nonexistent files should only occur before executing an action throw new file not found exception ( artifact pretty print ( ) + " does not exist " ) ; } if ( type is symlink ( ) ) { / / we always create a file artifact value for an unresolved symlink with a digest ( calling / / readlink ( ) is easy , unlike checksumming a potentially huge file ) check not null ( file digest , " % s missing digest " , value ) ; return value ; } if ( type is file ( ) & & file digest ! = null ) { / / the digest is in the file value and that is all that is needed for this file ' s metadata return value ; } if ( type is directory ( ) ) { / / this branch is taken when the output of an action is a directory : / / - a fileset ( in this case , blaze is correct ) / / - a directory someone created in a local action ( in this case , changes under the / / directory may not be detected since we use the mtime of the directory for / / up - to - dateness checks ) / / - a symlink to a source directory due to filesets return file artifact value create for directory with mtime ( artifact path resolver to path ( artifact ) get last modified time ( ) ) ; } if ( injected digest = = null & & type is file ( ) ) { / / we don ' t have an injected digest and there is no digest in the file value ( which attempts a / / fast digest ) manually compute the digest instead injected digest = digest utils manually compute digest ( artifact path resolver to path ( artifact ) , value get size ( ) ) ; } return file artifact value create from injected digest ( value , injected digest , / * is shareable = * / ! artifact is constant metadata ( ) ) ; }


returns the statements of the loop body non - empty if parsing succeeded

public immutable list < statement > get body ( ) { return body ; }


returns the contained instance if it is present ; { @ code null } otherwise if the instance is known to be present , use { @ link # get ( ) } instead < b > comparison to { @ code java util optional } : < b > this method is equivalent to java 8 ' s { @ code optional or else ( null ) }


calls the on chart gesture listener to do the start callback

public void start action ( motion event me ) { on chart gesture listener l = m chart get on chart gesture listener ( ) ; if ( l ! = null ) l on chart gesture start ( me , m last gesture ) ; }


public void length cm test ( ) { / / todo : test length cm }


a method that subclasses can override to affect whether this class uses a binary search for a particular column

protected boolean can binary search column ( int column ) { return is sorted ( column ) ; }


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

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


return a string representation of this status code

public string to string ( ) { return this value + " " + name ( ) ; }


abstract void init ( job job ) throws i o exception ;


this method will cause the next scheduled task to run even though the task manager is suspended calling this method while the queue is not suspended has no effect because if not suspended , it will be busy ( or have nothing to do )

public void run next task even when suspended ( ) { lock lock ( ) ; try { run next task if not busy ( ) ; wake up waiting thread ( ) ; } finally { lock unlock ( ) ; } }


return the number of advisors applying to this proxy the default implementation delegates to { @ code get advisors ( ) length }

default int get advisor count ( ) { return get advisors ( ) length ; }


this method has to be called in the { @ link android live wallpaper service # on create application } method it sets up all the things necessary to get input , render via open g l and so on you can configure other aspects of the application with the rest of the fields in the { @ link android application configuration } instance

public void initialize ( application listener listener , android application configuration config ) { if ( debug ) log d ( tag , " > android live wallpaper service - initialize ( ) " ) ; app initialize ( listener , config ) ; if ( config get touch events for live wallpaper & & integer parse int ( android os build version sdk ) > = 7 ) linked engine set touch events enabled ( true ) ; / / on resume ( ) ; do not call it there }


the current checkpoint which can be advanced by { @ link # mark seq no as processed ( long ) }

public long get processed checkpoint ( ) { return processed checkpoint get ( ) ; }


get the preferred length for a new component for unions and internally aligned structures the preferred component length for a fixed - length data type will be the length of that data type otherwise the length returned will be no larger than the specified length

protected int get preferred component length ( data type data type , int length ) { if ( ( is internally aligned ( ) | | ( this instanceof union ) ) & & ! ( data type instanceof dynamic ) ) { length = - 1 ; / / force use of datatype size } int dt length = data type get length ( ) ; if ( length < = 0 ) { length = dt length ; } else if ( dt length > 0 & & dt length < length ) { length = dt length ; } if ( length < = 0 ) { throw new illegal argument exception ( " positive length must be specified for " + data type get display name ( ) + " component " ) ; } return length ; }


the flag is volatile to avoid synchronization here re - entrancy is unlikely except in failure mode ( and inexpensive )

static checksum new crc 3 2 c ( ) { try { return use java 9 crc 3 2 c ? java 9 crc 3 2 c factory create checksum ( ) : new pure java crc 3 2 c ( ) ; } catch ( exception in initializer error | runtime exception e ) { / / should not happen log error ( " crc32c creation failed , switching to pure java crc 3 2 c " , e ) ; use java 9 crc 3 2 c = false ; return new pure java crc 3 2 c ( ) ; } }


gets the order of elements within a group for the first input if no such order has been set , this method returns null

public ordering get group order for input one ( ) { return get group order ( 0 ) ; }


returns the highest line number with the default null source , or 0 if there aren ' t any such line numbers

public int get highest line number ( ) { int highest line number = 0 ; for ( int index = 0 ; index < u 2line number table length ; index + + ) { line number info info = line number table [ index ] ; if ( info get source ( ) = = null ) { int line number = info u 2line number ; if ( line number > highest line number ) { highest line number = line number ; } } } return highest line number ; }


get the actual instance of ` danish pig ` if the actual instanct is not ` danish pig ` , the class cast exception will be thrown

public danish pig get danish pig ( ) throws class cast exception { return ( danish pig ) super get actual instance ( ) ; }


< t > invoker < t > select ( list < invoker < t > > invokers , url url , invocation invocation ) throws rpc exception ;


specify the interval between recovery attempts , in < b > milliseconds < b > the default is 5000 ms , that is , 5 seconds this is a convenience method to create a { @ link fixed back off } with the specified interval for more recovery options , consider specifying a { @ link back off } instance instead

public void set recovery interval ( long recovery interval ) { this back off = new fixed back off ( recovery interval , long max value ) ; }


returns the cloned reference if valid , null otherwise

public static < t > closeable reference < t > clone or null ( @ nullable closeable reference < t > ref ) { return ( ref ! = null ) ? ref clone or null ( ) : null ; }


starts a new task chain beginning at this operator this operator will not be chained ( thread co - located for increased performance ) to any previous tasks even if possible


@ min ( 20 ) @ max ( 200 ) public integer get int 3 2 ( ) { return int 3 2 ; }


public string get login ( ) { return get first ( login ) ; }


put a value in the j s o n array , where the value will be a j s o n object which is produced from a map

public j s o n array put ( map value ) { put ( new j s o n object ( value ) ) ; return this ; }


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 cache builder configured according to this instance ' s specification

cache builder < object , object > to cache builder ( ) { cache builder < object , object > builder = cache builder new builder ( ) ; if ( initial capacity ! = null ) { builder initial capacity ( initial capacity ) ; } if ( maximum size ! = null ) { builder maximum size ( maximum size ) ; } if ( maximum weight ! = null ) { builder maximum weight ( maximum weight ) ; } if ( concurrency level ! = null ) { builder concurrency level ( concurrency level ) ; } if ( key strength ! = null ) { switch ( key strength ) { case weak : builder weak keys ( ) ; break ; default : throw new assertion error ( ) ; } } if ( value strength ! = null ) { switch ( value strength ) { case soft : builder soft values ( ) ; break ; case weak : builder weak values ( ) ; break ; default : throw new assertion error ( ) ; } } if ( record stats ! = null & & record stats ) { builder record stats ( ) ; } if ( write expiration time unit ! = null ) { builder expire after write ( write expiration duration , write expiration time unit ) ; } if ( access expiration time unit ! = null ) { builder expire after access ( access expiration duration , access expiration time unit ) ; } if ( refresh time unit ! = null ) { builder refresh after write ( refresh duration , refresh time unit ) ; } return builder ; }


returns the character at the current index and then increments the index by one if the resulting index is greater or equal to the end index , the current index is reset to the end index and a value of done is returned

public char get and increment ( ) { try { return string char at ( index + + ) ; } catch ( index out of bounds exception e ) { index = string length ( ) ; return done ; } }


sets this matrix to a rotation matrix that will rotate any vector in counter - clockwise direction around the z - axis

public matrix 3 set to rotation ( float degrees ) { return set to rotation rad ( math utils degrees to radians * degrees ) ; }


test the echo map servlet that uses get parameter map

@ test public void test echo map ( ) throws exception { assert equals ( " a : b \ nc : d \ n " , read output ( new url ( base url , " / echomap ? a = b & c = d " ) ) ) ; assert equals ( " a : b , & gt ; \ nc & lt ; : d \ n " , read output ( new url ( base url , " / echomap ? a = b & c < = d & a = > " ) ) ) ; }


obtient la valeur de la propriété exactmatch

public long get exactmatch ( ) { return exactmatch ; }


to participate in election , the app will call join election the result will be notified by a callback on either the become active or become standby app interfaces < br > after this the elector will automatically monitor the leader status and perform re - election if necessary < br > the app could potentially start off in standby mode and ignore the become standby call

public synchronized void join election ( byte [ ] data ) throws hadoop illegal argument exception { if ( data = = null ) { throw new hadoop illegal argument exception ( " data cannot be null " ) ; } if ( want to be in election ) { log info ( " already in election not re - connecting " ) ; return ; } app data = new byte [ data length ] ; system arraycopy ( data , 0 , app data , 0 , data length ) ; if ( log is debug enabled ( ) ) { log debug ( " attempting active election for " + this ) ; } join election internal ( ) ; }


sets the < code > user status < code > property

public void set user status ( integer user status ) { this user status = user status ; }


finds the best suit constructor for creating an instance of a class the principle is that the constructor with least parameters and has no self type parameter will be the best suit one to create instance

protected constructor < ? > find best suit constructor ( class < ? > model class ) { constructor < ? > [ ] constructors = model class get declared constructors ( ) ; if ( constructors length = = 0 ) throw new lite pal support exception ( model class get name ( ) + " has no constructor lite pal could not handle it " ) ; constructor < ? > best suit constructor = null ; int min constructor param length = integer max value ; for ( constructor < ? > constructor : constructors ) { class < ? > [ ] types = constructor get parameter types ( ) ; boolean can use this constructor = true ; / / under some conditions , constructor can not use for create instance for ( class < ? > parameter type : types ) { if ( parameter type = = model class | | parameter type get name ( ) starts with ( " com android " ) & & parameter type get name ( ) ends with ( " instant reload exception " ) ) { / / we can not use this constructor can use this constructor = false ; break ; } } if ( can use this constructor ) { / / we can use this constructor if ( types length < min constructor param length ) { / / find the constructor with least parameter best suit constructor = constructor ; min constructor param length = types length ; } } } if ( best suit constructor ! = null ) { best suit constructor set accessible ( true ) ; } else { string builder builder = new string builder ( model class get name ( ) ) append ( " has no suited constructor to new instance constructors defined in class : " ) ; for ( constructor < ? > constructor : constructors ) { builder append ( " \ n " ) append ( constructor to string ( ) ) ; } throw new lite pal support exception ( builder to string ( ) ) ; } return best suit constructor ; }


finds all class serializers for all types and returns them logs errors when necessary maps fully qualified class names to their serializers

public static class serializer resolve ( base processor processor ) { class serializer out = new class serializer ( new object map < > ( ) , new object map < > ( ) , new object map < > ( ) ) ; for ( stype type : processor types ( type i o handler class ) ) { / / look at all type i o handler methods seq < smethod > methods = type methods ( ) ; for ( smethod meth : methods ) { if ( meth is ( modifier public ) & & meth is ( modifier static ) ) { seq < svar > params = meth params ( ) ; / / 2 params , second one is type , first is writer if ( params size = = 2 & & params first ( ) tname ( ) to string ( ) equals ( " arc util io writes " ) ) { out writers put ( fix ( params get ( 1 ) tname ( ) to string ( ) ) , type full name ( ) + " " + meth name ( ) ) ; } else if ( params size = = 1 & & params first ( ) tname ( ) to string ( ) equals ( " arc util io reads " ) & & ! meth is void ( ) ) { / / 1 param , one is reader , returns type out readers put ( fix ( meth retn ( ) to string ( ) ) , type full name ( ) + " " + meth name ( ) ) ; } else if ( params size = = 2 & & params first ( ) tname ( ) to string ( ) equals ( " arc util io reads " ) & & ! meth is void ( ) & & meth ret ( ) equals ( meth params ( ) get ( 1 ) mirror ( ) ) ) { / / 2 params , one is reader , other is type , returns type - these are made to reduce garbage allocated out mutator readers put ( fix ( meth retn ( ) to string ( ) ) , type full name ( ) + " " + meth name ( ) ) ; } } } } return out ; }


unsupported ( returns zero in all cases )

public long get pos ( ) throws i o exception { return 0 ; }


adds the headers of the given { @ code header info } into the one being built

public builder merge header info ( header info other header info ) { this modular public headers add all ( other header info modular public headers ) ; this modular private headers add all ( other header info modular private headers ) ; this textual headers add all ( other header info textual headers ) ; return this ; }


return the number of valid bytes currently in the buffer

protected synchronized int get buffered data size ( ) { return count ; }


sets relocation tables to be readwritten

public void set relocation table ( boolean b ) { relocation table = b ; }


test the property ' prefix namespace number '

public void prefix namespace number test ( ) { / / todo : test prefix namespace number }


records the caller ' s current stack trace and the specified additional arbitrary information so that the { @ link resource leak detector } can tell where the leaked resource was accessed lastly


{ @ inherit doc } < b > note : < b > : this throws an exception if this item is not internable

public int compare to 0 ( offsetted item other ) { if ( ! is internable ( ) ) { throw new unsupported operation exception ( " uninternable instance " ) ; } annotations directory item other directory = ( annotations directory item ) other ; return class annotations compare to ( other directory class annotations ) ; }


public static boolean copy ( final string src path , final string dest path ) { return copy ( get file by path ( src path ) , get file by path ( dest path ) , null ) ; }


returns the decision for being allowed to rebalance the shard invoking this method will return { @ code null } if { @ link # can remain ( ) } ( ) } returns { @ code false } , which means the node is not allowed to remain on its current node , so the cluster is forced to attempt to move the shard to a different node , as opposed to attempting to rebalance the shard if a better cluster balance is possible by moving it if { @ link # is decision taken ( ) } returns { @ code false } , then invoking this method will throw an { @ code illegal state exception }

public decision get cluster rebalance decision ( ) { check decision state ( ) ; return cluster rebalance decision ; }


the substitute method for a private instance method in an interface

public final method decl info substitute of interface instance method ( ) { / / unset static and access modifier bits return to builder ( ) set method key ( method key ( ) substitute of interface instance method ( ) ) set member access ( ( member access ( ) & ~ 0xf ) | acc public | acc static ) build ( ) ; }


sets rotation options for the image , whether to rotate by a multiple of 90 degrees , use the exif metadata ( relevant to j p e gs only ) or to not rotate this also specifies whether the rotation should be left until the bitmap is rendered ( as the gpu can do this more efficiently than the effort to change the bitmap object )

public image request builder set rotation options ( @ nullable rotation options rotation options ) { m rotation options = rotation options ; return this ; }


moves an item from from position to to position if the new position of the item is within the currently visible range , a layout is calculated immediately on the ui thread

public final void move item ( int from position , int to position ) { thread utils assert main thread ( ) ; if ( sections debug enabled ) { log d ( sections debug tag , " ( " + hash code ( ) + " ) move item " + from position + " to " + to position ) ; } final component tree holder holder ; final boolean is new position in range ; synchronized ( this ) { holder = m component tree holders remove ( from position ) ; m component tree holders add ( to position , holder ) ; is new position in range = m estimated viewport count ! = unset & & to position > = m current first visible position - ( m estimated viewport count * m range ratio ) & & to position < = m current first visible position + m estimated viewport count + ( m estimated viewport count * m range ratio ) ; } final boolean is tree valid = holder is tree valid ( ) ; if ( is tree valid & & ! is new position in range ) { holder acquire state and release tree ( m acquire state handler on release ) ; } m internal adapter notify item moved ( from position , to position ) ; m viewport manager set should update ( m viewport manager move affects visible range ( from position , to position , m estimated viewport count ) ) ; }


adds a type information hint about the return type of this operator this method can be used in cases where flink cannot determine automatically what the produced type of a function is that can be the case if the function uses generic type variables in the return type that cannot be inferred from the input type in most cases , the methods { @ link # returns ( class ) } and { @ link # returns ( type hint ) } are preferable

public o returns ( type information < out > type info ) { require non null ( type info , " type information must not be null " ) ; fill in type ( type info ) ; @ suppress warnings ( " unchecked " ) o return type = ( o ) this ; return return type ; }


creates a new 8 - byte big - endian buffer that holds the specified 64 - bit floating point number

public static byte buf copy double ( double value ) { byte buf buf = buffer ( 8 ) ; buf write double ( value ) ; return buf ; }


returns a port that is within a probable free range < p > based on the ports in http : en wikipedia orgwiki ephemeral ports , this method stays away from all well - known ephemeral port ranges , since they can arbitrarily race with the operating system in allocations due to the port - greedy nature of selenium this happens fairly frequently staying within the known safe range increases the probability tests will run green quite significantly

private static int create acceptable port ( ) { synchronized ( random ) { final int first port ; final int last port ; int free above = highest port - ephemeral range detector get highest ephemeral port ( ) ; int free below = max ( 0 , ephemeral range detector get lowest ephemeral port ( ) - start of user ports ) ; if ( free above > free below ) { first port = ephemeral range detector get highest ephemeral port ( ) ; last port = 65535 ; } else { first port = 1024 ; last port = ephemeral range detector get lowest ephemeral port ( ) ; } if ( first port = = last port ) { return first port ; } if ( first port > last port ) { throw new unsupported operation exception ( " could not find ephemeral port to use " ) ; } final int random int = random next int ( ) ; final int port without offset = math abs ( random int % ( last port - first port + 1 ) ) ; return port without offset + first port ; } }


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 " ) ; }


to test enum parameters to test enum parameters

public void test enum parameters test ( ) { list < string > enum header string array = null ; string enum header string = null ; list < string > enum query string array = null ; string enum query string = null ; integer enum query integer = null ; double enum query double = null ; list < string > enum form string array = null ; string enum form string = null ; api test enum parameters ( 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 ) ; / / todo : test validations }


helper for { @ link # assign indices } which does assignment for one instruction

private static void assign indices ( cst insn insn , dalv code assign indices callback callback ) { constant cst = insn get constant ( ) ; int index = callback get index ( cst ) ; if ( index > = 0 ) { insn set index ( index ) ; } if ( cst instanceof cst member ref ) { cst member ref member = ( cst member ref ) cst ; cst type definer = member get defining class ( ) ; index = callback get index ( definer ) ; if ( index > = 0 ) { insn set class index ( index ) ; } } }


public outer enum get outer enum ( ) { return outer enum ; }


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


returns the { @ link types } instance associated with the current execution of the rule

public types get types ( ) { check state ( elements ! = null , " not running within the rule " ) ; return types ; }


public abstract float get progress ( ) throws i o exception ;


set the username that this factory should use to access the remote service default is none the username will be sent by hessian via http basic authentication

public void set username ( string username ) { this proxy factory set user ( username ) ; }


public authentication get authentication ( string auth name ) { return authentications get ( auth name ) ; }


recursively walk { @ code tree } against { @ code pattern tree } , filling { @ code match } { @ link parse tree match # labels labels }

protected parse tree match impl ( parse tree tree , parse tree pattern tree , multi map < string , parse tree > labels ) { if ( tree = = null ) { throw new illegal argument exception ( " tree cannot be null " ) ; } if ( pattern tree = = null ) { throw new illegal argument exception ( " pattern tree cannot be null " ) ; } / / x and < id > , x and y , or x and x ; or could be mismatched types if ( tree instanceof terminal node & & pattern tree instanceof terminal node ) { terminal node t 1 = ( terminal node ) tree ; terminal node t 2 = ( terminal node ) pattern tree ; parse tree mismatched node = null ; / / both are tokens and they have same type if ( t 1 get symbol ( ) get type ( ) = = t 2 get symbol ( ) get type ( ) ) { if ( t 2 get symbol ( ) instanceof token tag token ) { / / x and < id > token tag token token tag token = ( token tag token ) t 2 get symbol ( ) ; / / track label - > list - of - nodes for both token name and label ( if any ) labels map ( token tag token get token name ( ) , tree ) ; if ( token tag token get label ( ) ! = null ) { labels map ( token tag token get label ( ) , tree ) ; } } else if ( t 1 get text ( ) equals ( t 2 get text ( ) ) ) { / / x and x } else { / / x and y if ( mismatched node = = null ) { mismatched node = t 1 ; } } } else { if ( mismatched node = = null ) { mismatched node = t 1 ; } } return mismatched node ; } if ( tree instanceof parser rule context & & pattern tree instanceof parser rule context ) { parser rule context r 1 = ( parser rule context ) tree ; parser rule context r 2 = ( parser rule context ) pattern tree ; parse tree mismatched node = null ; / / ( expr ) and < expr > rule tag token rule tag token = get rule tag token ( r 2 ) ; if ( rule tag token ! = null ) { parse tree match m = null ; if ( r 1 get rule context ( ) get rule index ( ) = = r 2 get rule context ( ) get rule index ( ) ) { / / track label - > list - of - nodes for both rule name and label ( if any ) labels map ( rule tag token get rule name ( ) , tree ) ; if ( rule tag token get label ( ) ! = null ) { labels map ( rule tag token get label ( ) , tree ) ; } } else { if ( mismatched node = = null ) { mismatched node = r 1 ; } } return mismatched node ; } / / ( expr ) and ( expr ) if ( r 1 get child count ( ) ! = r 2 get child count ( ) ) { if ( mismatched node = = null ) { mismatched node = r 1 ; } return mismatched node ; } int n = r 1 get child count ( ) ; for ( int i = 0 ; i < n ; i + + ) { parse tree child match = match impl ( r 1 get child ( i ) , pattern tree get child ( i ) , labels ) ; if ( child match ! = null ) { return child match ; } } return mismatched node ; } / / if nodes aren ' t both tokens or both rule nodes , can ' t match return tree ; }


set the next node of the given node at the given level

static void help set next node ( long node , long next node , int level , level index header level index header , allocator space allocator ) { if ( node = = head node ) { level index header update next node ( level , next node ) ; return ; } chunk chunk = space allocator get chunk by id ( space utils get chunk id by address ( node ) ) ; int offset in chunk = space utils get chunk offset by address ( node ) ; memory segment segment = chunk get memory segment ( offset in chunk ) ; int offset in byte buffer = chunk get offset in segment ( offset in chunk ) ; if ( level = = 0 ) { put next key pointer ( segment , offset in byte buffer , next node ) ; } else { put next index node ( segment , offset in byte buffer , level , next node ) ; } }


called before scheduling a new unit work

object on before submit work ( string tag ) ;


register a listener that will be called when this model is bound to a view the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules you may clear the listener by setting a null value , or by calling { @ link # reset ( ) }

public model with annotated class on bind ( on model bound listener < model with annotated class , object > listener ) { on mutation ( ) ; this on model bound listener epoxy generated model = listener ; return this ; }


sets the given directories to by loose include directories that are only allowed to be referenced when headers checking is { @ link headers checking mode # loose }

private void set loose include dirs ( set < path fragment > loose include dirs ) { this loose include dirs = loose include dirs ; }


wait for the task to trigger a new speculation

private void wait for speculation ( final task speculated task , final controlled clock c clock ) throws timeout exception , interrupted exception { generic test utils wait for ( ( ) - > { if ( speculated task get attempts ( ) size ( ) ! = 2 ) { c clock tick msec ( 250l ) ; return false ; } return true ; } , 250 , 60000 ) ; }


edit log op instances are cached internally using thread - local storage this test checks that the cached instances are reset in between different transactions processed on the same thread , so that we don ' t accidentally apply incorrect attributes to an inode

public void test reset thread local cached ops ( ) throws i o exception { configuration conf = new hdfs configuration ( ) ; conf set boolean ( d f s config keys dfs namenode acls enabled key , true ) ; / / set single handler thread , so all transactions hit same thread - local ops conf set int ( d f s config keys dfs namenode handler count key , 1 ) ; mini d f s cluster cluster = null ; file system file sys = null ; try { cluster = new mini d f s cluster builder ( conf ) num data nodes ( 1 ) build ( ) ; cluster wait active ( ) ; file sys = cluster get file system ( ) ; / / create / dir 1 with a default acl path dir 1 = new path ( " / dir 1 " ) ; file sys mkdirs ( dir 1 ) ; list < acl entry > acl spec = lists new array list ( acl entry ( default , user , " foo " , read execute ) ) ; file sys modify acl entries ( dir 1 , acl spec ) ; / / / dir 1 / dir 2 is expected to clone the default acl path dir 2 = new path ( " / dir 1 / dir 2 " ) ; file sys mkdirs ( dir 2 ) ; / / / dir 1 / file 1 is expected to clone the default acl path file 1 = new path ( " / dir 1 / file 1 " ) ; file sys create ( file 1 ) close ( ) ; / / / dir 3 is not a child of / dir 1 , so must not clone the default acl path dir 3 = new path ( " / dir 3 " ) ; file sys mkdirs ( dir 3 ) ; / / / file 2 is not a child of / dir 1 , so must not clone the default acl path file 2 = new path ( " / file 2 " ) ; file sys create ( file 2 ) close ( ) ; / / restart and assert the above stated expectations i o utils cleanup with logger ( log , file sys ) ; cluster restart name node ( ) ; file sys = cluster get file system ( ) ; assert false ( file sys get acl status ( dir 1 ) get entries ( ) is empty ( ) ) ; assert false ( file sys get acl status ( dir 2 ) get entries ( ) is empty ( ) ) ; assert false ( file sys get acl status ( file 1 ) get entries ( ) is empty ( ) ) ; assert true ( file sys get acl status ( dir 3 ) get entries ( ) is empty ( ) ) ; assert true ( file sys get acl status ( file 2 ) get entries ( ) is empty ( ) ) ; } finally { i o utils cleanup with logger ( log , file sys ) ; if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


public authentication get authentication ( string token ) { claims claims = jwts parser builder ( ) set signing key ( auth configs get secret key bytes ( ) ) build ( ) parse claims jws ( token ) get body ( ) ; list < granted authority > authorities = authority utils comma separated string to authority list ( ( string ) claims get ( authorities key ) ) ; user principal = new user ( claims get subject ( ) , " " , authorities ) ; return new username password authentication token ( principal , " " , authorities ) ; }


public static set < long > get concurrency map key set ( ) { return now calls map key set ( ) ; }


tests for dst transitions that cause the rounding to jump " backwards " because they round from one back to the previous day usually these rounding start before

public void test forwards backwards time zones ( ) { for ( string zone id : java zone ids ) { zone id tz = zone id of ( zone id ) ; zone rules rules = tz get rules ( ) ; for ( zone offset transition transition : rules get transitions ( ) ) { check for forwards backwards transition ( tz , transition ) ; } int first year ; if ( rules get transitions ( ) is empty ( ) ) { / / pick an arbitrary year to start the range first year = 1999 ; } else { zone offset transition last transition = rules get transitions ( ) get ( rules get transitions ( ) size ( ) - 1 ) ; first year = last transition get date time after ( ) get year ( ) + 1 ; } / / pick an arbitrary year to end the range too int last year = 2050 ; int year = random from ( first year , last year ) ; for ( zone offset transition rule transition rule : rules get transition rules ( ) ) { zone offset transition transition = transition rule create transition ( year ) ; check for forwards backwards transition ( tz , transition ) ; } } }


returns if the context is a viable configuration

private boolean is compatible ( cache context context ) { boolean async incompatible = context is async ( ) & & ( ( context implementation ( ) ! = implementation caffeine ) | | ! context is strong values ( ) ) ; boolean async loader incompatible = context is async loading ( ) & & ( ! context is async ( ) | | ! context is loading ( ) ) ; boolean refresh incompatible = context refreshes ( ) & & ! context is loading ( ) ; boolean weigher incompatible = context is unbounded ( ) & & context is weighted ( ) ; boolean reference incompatible = cache spec requires weak or soft ( ) & & context is strong keys ( ) & & context is strong values ( ) ; boolean expiry incompatible = ( context expiry type ( ) ! = cache expiry disabled ) & & ( ( context implementation ( ) ! = implementation caffeine ) | | ( context expire after access ( ) ! = expire disabled ) | | ( context expire after write ( ) ! = expire disabled ) ) ; boolean expiration incompatible = ( cache spec must expire with any of ( ) length > 0 ) & & ! arrays stream ( cache spec must expire with any of ( ) ) any match ( context : : expires ) ; boolean scheduler ignored = ( context cache scheduler ! = cache scheduler default ) & & ! context expires ( ) ; boolean skip = async incompatible | | async loader incompatible | | refresh incompatible | | weigher incompatible | | expiry incompatible | | expiration incompatible | | reference incompatible | | scheduler ignored ; return ! skip ; }


compares 2 checkpoints ignoring some inner fields this is for comparing 2 checkpoints to check whether the transform requires an update

public boolean matches ( transform checkpoint that ) { if ( this = = that ) { return true ; } return objects equals ( this transform id , that transform id ) & & this indices checkpoints size ( ) = = that indices checkpoints size ( ) / / quick check / / do the expensive deep equal operation last & & this indices checkpoints entry set ( ) stream ( ) all match ( e - > arrays equals ( e get value ( ) , that indices checkpoints get ( e get key ( ) ) ) ) ; }


returns the maximum allowed length of the aggregated message in bytes

public final int max content length ( ) { return max content length ; }


if the attribute of the given name on the given target is a label or label list , then this method returns the list of corresponding target instances otherwise returns an empty list if an error occurs during resolution , it throws a { @ link query exception } using the caller and error message prefix

iterable < t > get prerequisites ( query expression caller , t target , string attr name , string error msg prefix ) throws query exception , interrupted exception ;


private path real path ( path p , path parent ) { path root path = new path ( path separator ) ; if ( root path compare to ( p ) = = 0 ) { return parent ; } return new path ( parent , new path ( p to string ( ) substring ( 1 ) ) ) ; }


returns non - zero positive number when < code > op mode 1 < code > is greater than < code > op mode 2 < code >

public static int compare ( operation mode op mode 1 , operation mode op mode 2 ) { return integer compare ( op mode 1 id , op mode 2 id ) ; }


called when a function has been added looks at address for call reference

public boolean added ( program program , address set view set , task monitor monitor , message log log ) { listing listing = program get listing ( ) ; address set func starts = new address set ( ) ; monitor set message ( " finding external entry functions " ) ; / / / / add entry points / / address iterator entry iter = program get symbol table ( ) get external entry point iterator ( ) ; while ( entry iter has next ( ) & & ! monitor is cancelled ( ) ) { address entry = entry iter next ( ) ; if ( set contains ( entry ) & & listing get instruction at ( entry ) ! = null ) { func starts add range ( entry , entry ) ; } } / / remove any addresses that are already functions symbol iterator iter = program get symbol table ( ) get symbols ( func starts , symbol type function , true ) ; address set already function set = new address set ( ) ; while ( iter has next ( ) & & ! monitor is cancelled ( ) ) { symbol element = iter next ( ) ; already function set add range ( element get address ( ) , element get address ( ) ) ; } func starts delete ( already function set ) ; if ( monitor is cancelled ( ) ) { return false ; } auto analysis manager amgr = auto analysis manager get analysis manager ( program ) ; amgr create function ( func starts , false ) ; return true ; }


public long get $ special property name ( ) { return $ special property name ; }


evaluate the x path and assert that content exists

public result matcher exists ( ) { return result - > { mock http servlet response response = result get response ( ) ; this xpath helper exists ( response get content as byte array ( ) , get defined encoding ( response ) ) ; } ; }


creates ( but does not start ) a new stopwatch using { @ link system # nano time } as its time source

public static stopwatch create unstarted ( ) { return new stopwatch ( ) ; }


public void shrink to fit ( ) { super shrink to fit ( ) ; rebuild label to index ( ) ; }


get available headroom in terms of resources for the application ' s user

public resource get headroom ( ) { return resource limit ; }


test scenario where proto symbols are mixed between the low and top level binaries there is an implicit dependency hierarchy between the different apple binary types ( executable , loadable bundle , dylib ) which looks like this ( top level binary types can depend on lower level binary types ) : loadable bundle \ dylib ( s ) executable | dylibs the mechanism to remove duplicate dependencies between dylibs and executable binaries works the same way between executable and loadable bundle binaries ; the only difference is through which attribute the dependency is declared ( dylibs vs bundle loader ) this test scenario sets up dependencies for low level and top level binaries and checks that the correct files are linked for each of the binaries

private void check proto deduping deps partial ( binary type dep binary type ) throws exception { mock objc support setup objc proto library ( scratch ) ; scratch file ( " x / filter a pbascii " ) ; scratch file ( " x / filter b pbascii " ) ; scratch file ( " protos / build " , test constants load proto library , " load ( ' / / objc proto library : objc proto library bzl ' , ' objc proto library ' ) " , " proto library ( " , " name = ' protos 1 ' , " , " srcs = [ ' data a proto ' , ' data b proto ' ] , " , " ) " , " proto library ( " , " name = ' protos 2 ' , " , " srcs = [ ' data b proto ' , ' data c proto ' ] , " , " ) " , " proto library ( " , " name = ' protos 3 ' , " , " srcs = [ ' data a proto ' , ' data c proto ' , ' data d proto ' ] , " , " ) " , " objc proto library ( " , " name = ' objc protos a ' , " , " portable proto filters = [ ' filter a pbascii ' ] , " , " deps = [ ' : protos 1 ' ] , " , " ) " , " objc proto library ( " , " name = ' objc protos b ' , " , " portable proto filters = [ ' filter b pbascii ' ] , " , " deps = [ ' : protos 2 ' , ' : protos 3 ' ] , " , " ) " ) ; scratch file ( " libs / build " , " objc library ( " , " name = ' main lib ' , " , " srcs = [ ' a m ' ] , " , " deps = [ ' / / protos : objc protos a ' , ' / / protos : objc protos b ' ] " , " ) " , " objc library ( " , " name = ' apple low level lib ' , " , " srcs = [ ' b m ' ] , " , " deps = [ ' / / protos : objc protos a ' ] " , " ) " ) ; if ( dep binary type = = binary type dylib ) { scratch framework starlark stub ( " frameworkstub / framework stub bzl " ) ; scratch file ( " dep binary / build " , " load ( ' / / frameworkstub : framework stub bzl ' , ' framework stub rule ' ) " , " apple binary ( " , " name = ' apple low level binary ' , " , " deps = [ ' / / libs : apple low level lib ' ] , " , " platform type = ' ios ' , " , " binary type = ' dylib ' , " , " ) " , " framework stub rule ( " , " name = ' low level framework ' , " , " deps = [ ' : apple low level binary ' ] , " , " binary = ' : apple low level binary ' ) " ) ; get rule type ( ) scratch target ( scratch , " binary type " , " ' executable ' " , " deps " , " [ ' / / libs : main lib ' ] " , " dylibs " , " [ ' / / dep binary : low level framework ' ] " ) ; } else { assert that ( dep binary type = = binary type loadable bundle ) is true ( ) ; scratch file ( " dep binary / build " , " apple binary ( " , " name = ' apple low level binary ' , " , " deps = [ ' / / libs : apple low level lib ' ] , " , " platform type = ' ios ' , " , " binary type = ' executable ' , " , " ) " ) ; get rule type ( ) scratch target ( scratch , " binary type " , " ' loadable bundle ' " , " deps " , " [ ' / / libs : main lib ' ] " , " bundle loader " , " ' / / dep binary : apple low level binary ' " ) ; } / / the proto libraries objc lib depends on should be linked into the low level binary but not x artifact low level binary = iterables get only element ( link action ( " / / dep binary : apple low level binary " ) get outputs ( ) ) ; immutable list < artifact > low level object files = get all object files linked in bin ( low level binary ) ; assert that ( get first artifact ending with ( low level object files , " data a pbobjc o " ) ) is not null ( ) ; assert that ( get first artifact ending with ( low level object files , " data b pbobjc o " ) ) is not null ( ) ; assert that ( get first artifact ending with ( low level object files , " data c pbobjc o " ) ) is null ( ) ; assert that ( get first artifact ending with ( low level object files , " data d pbobjc o " ) ) is null ( ) ; artifact bin = iterables get only element ( link action ( " / / x : x " ) get outputs ( ) ) ; immutable list < artifact > bin object files = get all object files linked in bin ( bin ) ; assert that ( get first artifact ending with ( bin object files , " data a pbobjc o " ) ) is null ( ) ; assert that ( get first artifact ending with ( bin object files , " data b pbobjc o " ) ) is null ( ) ; assert that ( get first artifact ending with ( bin object files , " data c pbobjc o " ) ) is not null ( ) ; assert that ( get first artifact ending with ( bin object files , " data d pbobjc o " ) ) is not null ( ) ; }


{ @ inherit doc } this implementation composes a string by iterating over its mappings if this map contains itself as a key or a value , the string " ( this map ) " will appear in its place

public string to string ( ) { if ( is empty ( ) ) { return " { } " ; } string builder buffer = new string builder ( m size * 28 ) ; buffer append ( ' { ' ) ; for ( int i = 0 ; i < m size ; i + + ) { if ( i > 0 ) { buffer append ( " , " ) ; } object key = key at ( i ) ; if ( key ! = this ) { buffer append ( key ) ; } else { buffer append ( " ( this map ) " ) ; } buffer append ( ' = ' ) ; object value = value at ( i ) ; if ( value ! = this ) { buffer append ( value ) ; } else { buffer append ( " ( this map ) " ) ; } } buffer append ( ' } ' ) ; return buffer to string ( ) ; }


create a { @ link request mapping info } from the supplied { @ link request mapping @ request mapping } annotation , which is either a directly declared annotation , a meta - annotation , or the synthesized result of merging annotation attributes within an annotation hierarchy

protected request mapping info create request mapping info ( request mapping request mapping , @ nullable request condition < ? > custom condition ) { request mapping info builder builder = request mapping info paths ( resolve embedded values in patterns ( request mapping path ( ) ) ) methods ( request mapping method ( ) ) params ( request mapping params ( ) ) headers ( request mapping headers ( ) ) consumes ( request mapping consumes ( ) ) produces ( request mapping produces ( ) ) mapping name ( request mapping name ( ) ) ; if ( custom condition ! = null ) { builder custom condition ( custom condition ) ; } return builder options ( this config ) build ( ) ; }


remove and return the property source with the given name , { @ code null } if not found

public property source < ? > remove ( string name ) { synchronized ( this property source list ) { int index = this property source list index of ( property source named ( name ) ) ; return ( index ! = - 1 ? this property source list remove ( index ) : null ) ; } }


asserts that a single { @ link data source # open ( data spec ) } call has been made to the upstream source , with the specified start ( inclusive ) and end ( exclusive ) positions

private void assert single open ( fake data source upstream source , int start , int end ) { data spec [ ] opened data specs = upstream source get and clear opened data specs ( ) ; assert that ( opened data specs ) has length ( 1 ) ; assert that ( opened data specs [ 0 ] position ) is equal to ( start ) ; assert that ( opened data specs [ 0 ] length ) is equal to ( end - start ) ; }


put a keyvalue pair in the j s o n object , where the value will be a j s o n array which is produced from a collection

public j s o n object put ( string key , collection value ) throws j s o n exception { put ( key , new j s o n array ( value ) ) ; return this ; }


returns whether arrays need to be allocated

boolean needs alloc arrays ( ) { return table = = null ; }


compresses the data using the provided hadoop { @ link compression codec } and { @ link configuration }

public compress writer factory < in > with hadoop compression ( string codec name , configuration hadoop config ) throws i o exception { this codec extension = get hadoop codec extension ( codec name , hadoop config ) ; this hadoop codec name = codec name ; for ( map entry < string , string > entry : hadoop config ) { hadoop config map put ( entry get key ( ) , entry get value ( ) ) ; } return this ; }


< code > optional aapt pb style style = 2 ; < code >


generates the memory usage statistics graph

public trend chart do graph ( @ query parameter string type ) throws i o exception { jenkins get ( ) check any permission ( jenkins system read , jenkins manage ) ; return multi stage time series create trend chart ( time scale parse ( type ) , used , max ) ; }


generates a class object from the generated byte code

class < ? > define factory ( string name , byte [ ] bytes ) { return define class ( name , bytes , 0 , bytes length , codesource ) ; }


parse the package at the given location automatically detects if the package is a monolithic style ( single apk file ) or cluster style ( directory of a p ks ) this performs sanity checking on cluster style packages , such as requiring identical package name and version codes , a single base apk , and unique split names note that this does not perform signature verification ; that must be done separately in { @ link # collect certificates ( package , int ) }

public package parse package ( final file package file , final int flags ) throws package parser exception { throw new runtime exception ( " stub ! " ) ; }


render the inner ' { @ code option } ' tags using the { @ link # option source }

private void render from enum ( tag writer tag writer ) throws jsp exception { do render from collection ( collection utils array to list ( ( ( class < ? > ) this option source ) get enum constants ( ) ) , tag writer ) ; }


log the throwable , which occurs in dubbo rpc service

private void deal exception ( throwable throwable ) { abstract span span = context manager active span ( ) ; span log ( throwable ) ; }


adds a new { @ link build step } to this { @ link project } and saves the configuration

public void add publisher ( publisher build step ) throws i o exception { get publishers list ( ) add ( build step ) ; }


get value of adaptive annotation or if empty return splitted simple name

private string [ ] get method adaptive value ( adaptive adaptive annotation ) { string [ ] value = adaptive annotation value ( ) ; / / value is not set , use the value generated from class name as the key if ( value length = = 0 ) { string split name = string utils camel to split name ( type get simple name ( ) , " " ) ; value = new string [ ] { split name } ; } return value ; }


return the request attribute value , or a default , fallback value

default < t > t get attribute or default ( string name , t default value ) { return ( t ) get attributes ( ) get or default ( name , default value ) ; }


returns an iterator over the items of the stack the iterator starts from the bottom of the stack

public iterator < e > iterator ( ) { return list iterator ( ) ; }


find the fields constant that matches field id , throwing an exception if it is not found

public static fields find by thrift id or throw ( int field id ) { fields fields = find by thrift id ( field id ) ; if ( fields = = null ) throw new illegal argument exception ( " field " + field id + " doesn ' t exist ! " ) ; return fields ; }


peeks at the next long without incrementing the current index

public long peek next long ( ) throws i o exception { return read long ( current index ) ; }


returns a new factory that will match each type ' s raw type for assignability to { @ code hierarchy type }

public static type adapter factory new type hierarchy factory ( class < ? > hierarchy type , object type adapter ) { return new single type factory ( type adapter , null , false , hierarchy type ) ; }


public static boolean is status bar light mode ( @ non null final activity activity ) { return is status bar light mode ( activity get window ( ) ) ; }


drop the specified handle to this repository

public void drop handle ( repository handle impl handle ) { synchronized ( handle list ) { handle list remove ( handle ) ; } }


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 " ) ; }


get the size of the byte range in the byte array


sets { @ link format # accessibility channel } the default value is { @ link # no value }

public builder set accessibility channel ( int accessibility channel ) { this accessibility channel = accessibility channel ; return this ; } / / provided by source


void remove sensor ( final sensor sensor ) ;


if { @ code code point from } and { @ code code point to } are both < = u + ffff , returns a new { @ link range transition } otherwise , returns a new { @ link set transition }

public static transition create with code point range ( a t n state target , int code point from , int code point to ) { if ( character is supplementary code point ( code point from ) | | character is supplementary code point ( code point to ) ) { return new set transition ( target , interval set of ( code point from , code point to ) ) ; } else { return new range transition ( target , code point from , code point to ) ; } }


close this response , freeing any resources created


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


public e add or replace ( e entry ) { return add ( entry , true ) ; }


{ @ code handle cached authentication } is called when a { @ link user } is retrieved from the cache the first { @ code user } parameter is the user object that was found in the cache the default implementation returns a { @ link authentication result # success ( user ) success result } with the provided user , but sub - classes can return a different { @ code user } object , or an unsuccessful result

protected void handle cached authentication ( user user , action listener < authentication result > listener ) { listener on response ( authentication result success ( user ) ) ; }


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


indicates that the caller is momentarily unable to progress , until the occurrence of one or more actions on the part of other activities by invoking this method within each iteration of a spin - wait loop construct , the calling thread indicates to the runtime that it is busy - waiting the runtime may take action to improve the performance of invoking spin - wait loop constructions

public static void on spin wait ( ) { / / call java lang thread on spin wait ( ) on java se versions that support it do nothing otherwise / / this should optimize away to either nothing or to an inlining of java lang thread on spin wait ( ) if ( null ! = on spin wait method handle ) { try { on spin wait method handle invoke exact ( ) ; } catch ( final throwable ignore ) { } } }


test ( de ) serialization on all previous released versions

public void test serialization b w c ( ) throws i o exception { for ( version version : version utils all released versions ( ) ) { nested query builder test query = create test query builder ( ) ; assert serialization ( test query , version ) ; } }


public final cancellable exists source async ( get request get request , request options options , action listener < boolean > listener ) { get source request get source request = get source request from ( get request ) ; return perform request async ( get source request , request converters : : source exists , options , rest high level client : : convert exists response , listener , empty set ( ) ) ; }


public void set max interval ( long max interval ) { this max interval = max interval ; }


test the normal operation of loading transactions from file journal manager 3 edits directories are setup without any failures test that we read in the expected number of transactions

public void test normal operation ( ) throws i o exception { file f 1 = new file ( test edit log test dir + " / normtest 0 " ) ; file f 2 = new file ( test edit log test dir + " / normtest 1 " ) ; file f 3 = new file ( test edit log test dir + " / normtest 2 " ) ; list < uri > edit uris = immutable list of ( f 1 to u r i ( ) , f 2 to u r i ( ) , f 3 to u r i ( ) ) ; n n storage storage = setup edits ( edit uris , 5 ) ; long num journals = 0 ; for ( storage directory sd : storage dir iterable ( name node dir type edits ) ) { file journal manager jm = new file journal manager ( conf , sd , storage ) ; assert equals ( 6 * txns per roll , get number of transactions ( jm , 1 , true , false ) ) ; num journals + + ; } assert equals ( 3 , num journals ) ; }


get the collection of application protocols supported by this application ( in preference order )


internal method to < b > try < b > and reconcile the {

private static internal node reconcile ( final layout state context layout state context , final component context parent context , final default internal node current , final component next , @ nullable final string next key , final set < string > keys ) { int mode = get reconciliation mode ( next get scoped context ( layout state context , next key ) , current , keys ) ; final internal node layout ; switch ( mode ) { case reconciliation mode copy : if ( components configuration should use deep clone during reconciliation ) { layout = current deep clone ( ) ; } else { layout = reconcile ( layout state context , current , next , next key , keys , reconciliation mode copy ) ; } break ; case reconciliation mode reconcile : layout = reconcile ( layout state context , current , next , next key , keys , reconciliation mode reconcile ) ; break ; case reconciliation mode recreate : layout = layout create ( parent context , next , false , true , next key ) ; break ; default : throw new illegal argument exception ( mode + " is not a valid reconciliation mode " ) ; } return layout ; }


returns the currently selected code completion returns " " if there is none

public code completion get completion ( ) { int i = jlist get selected index ( ) ; if ( - 1 = = i ) { return null ; } return completion list get ( i ) ; }


a { @ link bean factory } to use for resolving an executor name this factory reference will automatically be set when { @ code web async task } is used within a spring mvc controller

public void set bean factory ( bean factory bean factory ) { this bean factory = bean factory ; }


sets the { @ code git host } and returns a reference to this builder so that the methods can be chained together

public builder with git host ( string git host ) { this git host = git host ; return this ; }


returns the key serializer for the queryable state instance

public type serializer < k > get key serializer ( ) { return key serializer ; }


returns maximum namespace address within the specified address space for upgrade iterators for a signed stack space , the negative region is treated as positive for the purpose of identifying the maximum address key encoding

public static address get max address ( address space addr space , long namespace i d ) { if ( addr space is stack space ( ) ) { return new old generic namespace address ( addr space , - 1 , namespace i d ) ; } return new old generic namespace address ( addr space , addr space get max address ( ) get offset ( ) , namespace i d ) ; }


next largest power of 2 : given a binary integer value x , the next largest power of 2 can be computed by a swar algorithm that recursively " folds " the upper bits into the lower bits this process yields a bit vector with the same most significant 1 as x , but all 1 ' s below it adding 1 to that value yields the next largest power of 2

public final static int next power of two ( int x ) { x | = x > > 1 ; x | = x > > 2 ; x | = x > > 4 ; x | = x > > 8 ; x | = x > > 16 ; return x + 1 ; }


filters ' tests ' ( by mutation ) according to the ' tags ' attribute , specifically those that match all of the tags in tags attribute @ precondition { @ code env get accessor ( ) is test suite ( test suite ) } @ precondition { @ code env get accessor ( ) is test rule ( test ) } for all test in tests

public static void filter tests ( rule test suite , set < target > tests ) { list < string > tags attribute = nonconfigurable attribute mapper of ( test suite ) get ( " tags " , type string list ) ; / / split the tags list into positive and negative tags pair < collection < string > , collection < string > > tag lists = sort tags by sense ( tags attribute ) ; collection < string > positive tags = tag lists first ; collection < string > negative tags = tag lists second ; tests remove if ( ( target t ) - > ! test matches filters ( ( rule ) t , positive tags , negative tags ) ) ; }


calls { @ link media period # prepare ( media period callback , long ) } on the playback thread and blocks until the method has been called

public count down latch prepare period ( final media period media period , final long position us ) { final condition variable prepare called = new condition variable ( ) ; final count down latch prepared latch = new count down latch ( 1 ) ; run on playback thread ( ( ) - > { media period prepare ( new media period callback ( ) { @ override public void on prepared ( media period media period 1 ) { prepared latch count down ( ) ; } @ override public void on continue loading requested ( media period source ) { / / do nothing } } , position us ) ; prepare called open ( ) ; } ) ; prepare called block ( ) ; return prepared latch ; }


returns the first artifact found in the given set whose path ends with the given suffix

public static artifact get first artifact ending with ( nested set < ? extends artifact > artifacts , string suffix ) { return get first artifact ending with ( artifacts to list ( ) , suffix ) ; }


returns the build version which includes version , revision , user and date

public static string get build version ( ) { return yarn version info get build version ( ) ; }


get a set of offsets for the specified partition identifiers this may be more efficient than calling { @ link # offset ( map ) } repeatedly note that when errors occur , this method omits the associated data and tries to return as many of the requested values as possible this allows a task that ' s managing many partitions to still proceed with any available data therefore , implementations should take care to check that the data is actually available in the returned response the only case when an exception will be thrown is if the entire request failed , e g because the underlying storage was unavailable

< t > map < map < string , t > , map < string , object > > offsets ( collection < map < string , t > > partitions ) ;


test gpu topology allocation and analysis the gpu allocation ' s performance against the actual performance data using tensorflow benchmarks https : github comtensorflowbenchmarks

public void test topology scheduling performance with pack policy with n v link ( ) throws exception { nvidia g p u plugin for runtime v 2 plugin = mock eight g p u plugin ( ) ; nvidia g p u plugin for runtime v 2 spy plugin = spy ( plugin ) ; set < device > all devices = spy plugin get devices ( ) ; map < string , string > env = new hash map < > ( ) ; env put ( nvidia g p u plugin for runtime v 2 topology policy env key , nvidia g p u plugin for runtime v 2 topology policy pack ) ;


calls { @ link memoizing evaluator # evaluate } on the given { @ link skyframe executor } ' s graph

public static < t extends sky value > evaluation result < t > evaluate ( skyframe executor skyframe executor , sky key key , boolean keep going , extended event handler error event listener ) throws interrupted exception { evaluation context evaluation context = evaluation context new builder ( ) set keep going ( keep going ) set num threads ( skyframe executor default thread count ) set event handler ( error event listener ) build ( ) ; return skyframe executor get driver ( ) evaluate ( immutable list of ( key ) , evaluation context ) ; }


get the type of { @ link decompressor } needed by this { @ link compression codec }

class < ? extends decompressor > get decompressor type ( ) ;


invoke model attribute methods to populate the model attributes are added only if not already present in the model

private void invoke model attribute methods ( native web request request , model and view container container ) throws exception { while ( ! this model methods is empty ( ) ) { invocable handler method model method = get next model method ( container ) get handler method ( ) ; model attribute ann = model method get method annotation ( model attribute class ) ; assert state ( ann ! = null , " no model attribute annotation " ) ; if ( container contains attribute ( ann name ( ) ) ) { if ( ! ann binding ( ) ) { container set binding disabled ( ann name ( ) ) ; } continue ; } object return value = model method invoke for request ( request , container ) ; if ( model method is void ( ) ) { if ( string utils has text ( ann value ( ) ) ) { if ( logger is debug enabled ( ) ) { logger debug ( " name in @ model attribute is ignored because method returns void : " + model method get short log message ( ) ) ; } } continue ; } string return value name = get name for return value ( return value , model method get return type ( ) ) ; if ( ! ann binding ( ) ) { container set binding disabled ( return value name ) ; } if ( ! container contains attribute ( return value name ) ) { container add attribute ( return value name , return value ) ; } } }


returns all captured values use it when capturing varargs or when the verified method was called multiple times when varargs method was called multiple times , this method returns merged list of all values from all invocations example : < pre class = " code " > < code class = " java " > mock do something ( new person ( " john " ) ; mock do something ( new person ( " jane " ) ; argument captor & lt ; person & gt ; people captor = argument captor for class ( person class ) ; verify ( mock , times ( 2 ) ) do something ( people captor capture ( ) ) ; list & lt ; person & gt ; captured people = people captor get all values ( ) ; assert equals ( " john " , captured people get ( 0 ) get name ( ) ) ; assert equals ( " jane " , captured people get ( 1 ) get name ( ) ) ; example of capturing varargs : < pre class = " code " > < code class = " java " > mock count people ( new person ( " john " ) , new person ( " jane " ) ; vararg method argument captor & lt ; person & gt ; people captor = argument captor for class ( person class ) ; verify ( mock ) count people ( people captor capture ( ) ) ; list expected = as list ( new person ( " john " ) , new person ( " jane " ) ) ; assert equals ( expected , people captor get all values ( ) ) ; < code > see more examples in javadoc for { @ link argument captor } class

public list < t > get all values ( ) { return this capturing matcher get all values ( ) ; }


set the time the resource was last changed , as specified by the { @ code last - modified } header

public void set last modified ( zoned date time last modified ) { set zoned date time ( last modified , last modified with zone same instant ( gmt ) ) ; }


returns { @ code true } if the desugar tool transforms given invocation site in an adapter strategy , that is to replace the original invocation with its corresponding adapter method

static boolean should use api type adapter ( method invocation site verbatim invocation site , boot class path digest boot class path digest ) { return verbatim invocation site invocation kind ( ) ! = member use kind invokespecial & & verbatim invocation site owner ( ) is android domain type ( ) & & boot class path digest contains type ( verbatim invocation site owner ( ) ) & & verbatim invocation site method ( ) get header type name set ( ) stream ( ) any match ( class name : : is desugar shadowed type ) ; }


any comments associated with the element < code > optional string comment = 2 ; < code >

public builder set comment ( java lang string value ) { copy on write ( ) ; instance set comment ( value ) ; return this ; }


returns record associated with this bookmark or null if bookmark has been deleted

d b record get record ( ) { return check is valid ( ) ? record : null ; }


configure the registry for adapting various reactive types by default this is an instance of { @ link reactive adapter registry } with default settings

public void set reactive adapter registry ( reactive adapter registry registry ) { assert not null ( registry , " reactive adapter registry is required " ) ; this reactive adapter registry = registry ; }


post user : create user this can only be done by the logged in user

public response entity < void > create user ( @ api param ( value = " created user object " , required = true ) @ valid @ request body user body ) { return new response entity < > ( http status not implemented ) ; }


add extra middlemen artifacts that should be built by reverse dependency binaries this method exists solely to support the unfortunate legacy behavior of some rules ; new uses should not be added

public builder add legacy extra middleman ( artifact middleman ) { preconditions check argument ( middleman is middleman artifact ( ) , middleman ) ; extra middlemen builder add ( middleman ) ; return this ; }


called when the renderer is stopped the default implementation is a no - op

protected void on stopped ( ) { / / do nothing }


this enables or disables the generation of a dynamic library link action the default is to generate a dynamic library note that the selection between dynamic or static linking is performed at the binary rule level

public cc linking helper set should create dynamic library ( boolean emit dynamic library ) { this should create dynamic library = emit dynamic library ; return this ; }


update the flash map instances in the underlying storage

protected abstract void update flash maps ( list < flash map > flash maps , http servlet request request , http servlet response response ) ;