check if the given class or any of its super classes have a super method with the given name private methods are ignored since the generated subclass can ' t call super on those

protected boolean has super method ( type element class element , element attribute ) { if ( ! utils is epoxy model ( class element as type ( ) ) ) { return false ; } for ( element sub element : synchronization kt get enclosed elements thread safe ( class element ) ) { if ( sub element get kind ( ) = = element kind method ) { executable element method = ( executable element ) sub element ; list < variable element > parameters = synchronization kt get parameters thread safe ( method ) ; if ( ! method get modifiers ( ) contains ( modifier private ) & & method get simple name ( ) to string ( ) equals ( attribute get simple name ( ) to string ( ) ) & & parameters size ( ) = = 1 & & parameters get ( 0 ) as type ( ) equals ( attribute as type ( ) ) ) { return true ; } } } element super class = kotlin utils kt super class element ( class element , type utils ) ; return ( super class instanceof type element ) & & has super method ( ( type element ) super class , attribute ) ; }


public stored fields context stored fields ( ) { return stored fields context ; }


public big decimal get number item ( ) { return number item ; }


protected void create generate service ticket action ( final flow flow ) { val handler = create action state ( flow , cas webflow constants state id generate service ticket , create evaluate action ( cas webflow constants action id generate service ticket ) ) ; create transition for state ( handler , cas webflow constants transition id success , cas webflow constants state id redirect ) ; create transition for state ( handler , cas webflow constants transition id warn , cas webflow constants state id warn ) ; create transition for state ( handler , cas webflow constants transition id authentication failure , cas webflow constants state id handle authn failure ) ; create transition for state ( handler , cas webflow constants transition id error , cas webflow constants state id init login form ) ; create transition for state ( handler , cas webflow constants transition id gateway , cas webflow constants state id gateway services mgmt check ) ; }


returns the collected list of input files ( directory , jar , aar , etc , represented as object , string , file , etc )

public list get in jar files ( ) { return in jar files ; }


returns datatype to hold a 1 byte undefined value

public data type get undefined 1 type ( ) { return base data type undefined 1 ; }


applies { @ link json path expectations helper # assert value ( string , object ) }

public web test client body content spec is equal to ( object expected value ) { this path helper assert value ( this content , expected value ) ; return this body spec ; }


a shortcut for { @ code bind to ( async rest template ) build ( ) }

public static mock rest service server create server ( org springframework web client async rest template async rest template ) { return bind to ( async rest template ) build ( ) ; }


get the local position of the center of mass note that the same vector 2 instance is returned each time this method is called

public vector 2 get local center ( ) { jni get local center ( addr , tmp ) ; local center x = tmp [ 0 ] ; local center y = tmp [ 1 ] ; return local center ; }


means finish of { @ link # exit ( context , resource wrapper , int , object ) }

void fire exit ( context context , resource wrapper resource wrapper , int count , object args ) ;


encodes a byte array into base 6 4 format no blanks or line breaks are inserted in the output

public static char [ ] encode ( byte [ ] in , int i off , int i len , char [ ] char map ) { int o data len = ( i len * 4 + 2 ) / 3 ; / / output length without padding int o len = ( ( i len + 2 ) / 3 ) * 4 ; / / output length including padding char [ ] out = new char [ o len ] ; int ip = i off ; int i end = i off + i len ; int op = 0 ; while ( ip < i end ) { int i 0 = in [ ip + + ] & 0xff ; int i 1 = ip < i end ? in [ ip + + ] & 0xff : 0 ; int i 2 = ip < i end ? in [ ip + + ] & 0xff : 0 ; int o 0 = i 0 > > > 2 ; int o 1 = ( ( i 0 & 3 ) < < 4 ) | ( i 1 > > > 4 ) ; int o 2 = ( ( i 1 & 0xf ) < < 2 ) | ( i 2 > > > 6 ) ; int o 3 = i 2 & 0x 3 f ; out [ op + + ] = char map [ o 0 ] ; out [ op + + ] = char map [ o 1 ] ; out [ op ] = op < o data len ? char map [ o 2 ] : ' = ' ; op + + ; out [ op ] = op < o data len ? char map [ o 3 ] : ' = ' ; op + + ; } return out ; }


sets the c + + runtime library inputs for the action

public cpp link action builder set runtime inputs ( artifact category runtime type , artifact middleman , nested set < artifact > inputs ) { this toolchain libraries type = runtime type ; this runtime middleman = middleman ; this toolchain libraries inputs = inputs ; return this ; }


obtains the { @ link template file type } for an input string

public static template file type for template type ( string template type ) { for ( template file type value : values ( ) ) { if ( value template type equals ( template type ) ) { return value ; } } throw new illegal argument exception ( " template type not found in the available values " ) ; }


ensures that the job master gateway is available

private completable future < job master gateway > get job master gateway ( job i d job id ) { dispatcher job job = running jobs get ( job id ) ; if ( job = = null ) { return future utils completed exceptionally ( new flink job not found exception ( job id ) ) ; } if ( ! job is initialized ( ) ) { return future utils completed exceptionally ( new unavailable dispatcher operation exception ( " unable to get job master gateway for initializing job " + " the requested operation is not available while the job manager is initializing " ) ) ; } return job get job master gateway ( ) ; }


creates a common information entry ( cie ) at < code > cie address < code > < br > note : this method must get called before any of the " get " methods

public void create ( address cie address ) throws memory access exception , exception handler frame exception { if ( cie address = = null | | monitor is cancelled ( ) ) { return ; } base address = cie address ; monitor set message ( " creating common information entries " ) ; address current address = cie address ; / / see if processing should stop due to the current length field = = 0 if ( program get memory ( ) get int ( current address ) = = 0 ) { mark end of frame ( current address ) ; end of frame = true ; return ; } / / note : the process method calls that follow are order dependent / / each one is passed the address of the field it will process and / / returns the next address after that field , which will then be / / used by the next field ' s process method / / create the cie length field current address = process cie length ( current address ) ; current address = process extended length ( current address ) ; / * create the cie fields & update the current address as you go * / current address = process cie id ( current address ) ; current address = process version ( current address ) ; current address = process augmentation string ( current address ) ; if ( version > = ( byte ) 4 ) { current address = process pointer size ( current address ) ; current address = process segment size ( current address ) ; } current address = process code align ( current address ) ; current address = process data align ( current address ) ; current address = process return addr register ( current address ) ; if ( is in debug frame ) { fde encoding = 0x 0 ; } else { current address = process augmentation info ( current address ) ; } / * * add initial instructions section and possible padding from remaining bytes * / if ( ! has ext length ) { if ( cur size < int length ) { current address = process initial instructions ( current address ) ; } } else { throw new exception handler frame exception ( " ext length is not completely implemented " ) ; } next address = current address ; }


public void put diagnostic info ( string msg ) { diagnostic info = msg ; }


utility function for mapping { @ link file system # get path handle } to a fixed set of handle options

public static function < file status , path handle > resolve ( file system fs , handle opt opt ) { return resolve ( fs : : get path handle , opt ) ; }


injects the metadata of a file this can be used to save filesystem operations when the metadata is already known { @ linkplain artifact # is tree artifact tree artifacts } and their { @ linkplain artifact # is child of declared directory children } must not be passed here instead , they should be passed to { @ link # inject tree }

void inject file ( artifact output , file artifact value metadata ) ;


used by the mobile emulators that refuse to access localhost or 127 0 0 1 the ip4ip6 requirements of this method are as - of - yet unspecified , but we return the string that is associated with the ip4 interface

public string get non loopback address of this machine ( ) { inet address ip 4 non loopback address of this machine = get ip 4 non loopback address of this machine ( ) ; if ( ! objects equals ( cached ip 4 non loopback address of this machine , ip 4 non loopback address of this machine ) ) { cached ip 4 non loopback address of this machine = ip 4 non loopback address of this machine ; cached ip 4 non loopback address host name = ip 4 non loopback address of this machine get host address ( ) ; } return cached ip 4 non loopback address host name ; }


fetch the corresponding database symbol if it exists

public symbol get symbol ( ) { if ( id ! = 0 ) { return get program ( ) get symbol table ( ) get symbol ( id ) ; } return null ; }


returns an unmodifiable iterable over the nodes in a tree structure , using breadth - first traversal that is , all the nodes of depth 0 are returned , then depth 1 , then 2 , and so on no guarantees are made about the behavior of the traversal when nodes change while iteration is in progress or when the iterators generated by { @ link # children } are advanced

public final fluent iterable < t > breadth first traversal ( final t root ) { check not null ( root ) ; return new fluent iterable < t > ( ) { @ override public unmodifiable iterator < t > iterator ( ) { return new breadth first iterator ( root ) ; } } ; }


set the optional parameters when initiating the request ( encryption , headers , storage , etc )

protected void set optional multipart upload request parameters ( initiate multipart upload request request ) { generate s s e aws key params ( ) if present ( request : : set s s e aws key management params ) ; generate s s e customer key ( ) if present ( request : : set s s e customer key ) ; }


public boolean process ( set < ? extends type element > annotations , round environment round env ) { if ( collection utils is not empty ( annotations ) ) { set < ? extends element > elements = round env get elements annotated with ( interceptor class ) ; try { parse interceptors ( elements ) ; } catch ( exception e ) { logger error ( e ) ; } return true ; } return false ; }


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

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


sets the name of the conflict type that is displayed as part of the text for the checkbox

void set conflict type ( string conflict type ) { use for all c b set text ( get use all string ( conflict type ) ) ; }


verify that multiple readers can get the read lock concurrently

public void test read ( ) throws exception { var execute service = executors new fixed thread pool ( 2 ) ; var lock = new reader writer lock ( ) ; var reader 1 = spy ( new reader ( " reader 1 " , lock read lock ( ) ) ) ; var reader 2 = spy ( new reader ( " reader 2 " , lock read lock ( ) ) ) ; execute service submit ( reader 1 ) ; thread sleep ( 150 ) ; execute service submit ( reader 2 ) ; execute service shutdown ( ) ; try { execute service await termination ( 10 , time unit seconds ) ; } catch ( interrupted exception e ) { logger error ( " error waiting for executor service shutdown " , e ) ; } / / read operation will hold the read lock 250 milliseconds , so here we prove that multiple reads / / can be performed in the same time assert true ( appender log contains ( " reader 1 begin " ) ) ; assert true ( appender log contains ( " reader 2 begin " ) ) ; assert true ( appender log contains ( " reader 1 finish " ) ) ; assert true ( appender log contains ( " reader 2 finish " ) ) ; }


returns true if this graph allows self - loops ( edges that connect a node to itself ) attempting to add a self - loop to a graph that does not allow them will throw an { @ link illegal argument exception }


public map < string , string > configs ( ) { return configs ; }


{ @ inherit doc } the default implementation does nothing

@ override public void enter timestamp escaped literal ( sql base parser timestamp escaped literal context ctx ) { }


return whether proxies created by this configuration should be prevented from being cast to { @ link advised }

public boolean is opaque ( ) { return this opaque ; }


public static error validate username ( string username , boolean allow reserved , settings settings ) { if ( ! is valid user or role name ( username ) ) { return new error ( string format ( locale root , invalid name message , " user " ) ) ; } if ( allow reserved = = false & & client reserved realm is reserved ( username , settings ) ) { return new error ( " username [ " + username + " ] is reserved and may not be used " ) ; } return null ; }


list of sort orders in the same order as the list of variables returned from ` get order by variables ( ) ` this means for index i , variable ` get order by variables ( ) get ( i ) ` has order ` get ordering list ( ) get ( i ) `

private static list < sort order > get ordering list ( ordering scheme ordering scheme ) { return ordering scheme get order by variables ( ) stream ( ) map ( ordering scheme get orderings map ( ) : : get ) collect ( to immutable list ( ) ) ; }


returns a css selector that selects all elements with { @ code class = class name } and all their descendants

public static string css all class descendants selector ( string class name ) { return " " + class name + " , " + class name + " * " ; }


get the scheme for this specific fetcher

protected string get scheme ( ) { return file system uri schemes abfs secure scheme ; }


configure the codecs for the { @ code web client } in the { @ link # exchange strategies ( exchange strategies ) underlying } { @ code exchange strategies }

builder codecs ( consumer < client codec configurer > configurer ) ;


set the plus - or - minus variance percentage of the network round trip delay

public void set variance percent ( int variance percent ) { check percentage validity ( variance percent , " variance percentage must be between 0 and 100 " ) ; this variance percent = variance percent ; }


reads the current stored history id from the iw commit data

private string load history u u i d ( map < string , string > commit data ) { final string uuid = commit data get ( history uuid key ) ; if ( uuid = = null ) { throw new illegal state exception ( " commit doesn ' t contain history uuid " ) ; } return uuid ; }


establishes a new connection to the given node the connection is not maintained by this service , it ' s the callers responsibility to close the connection once it goes out of scope the action listener will be called on the calling thread or the generic thread pool

public void open connection ( final discovery node node , connection profile connection profile , action listener < transport connection > listener ) { if ( is local node ( node ) ) { listener on response ( local node connection ) ; } else { connection manager open connection ( node , connection profile , listener ) ; } }


public void dump tree recursively ( print writer out , string builder prefix , int snapshot id ) { out print ( prefix ) ; out print ( " " ) ; final string name = get local name ( ) ; out print ( name is empty ( ) ? " / " : name ) ; out print ( " ( " ) ; out print ( get object string ( ) ) ; out print ( " ) , " ) ; out print ( get parent string ( ) ) ; out print ( " , " + get permission status ( snapshot id ) ) ; }


long bit size ( ) { return ( long ) data length ( ) * long size ; }


sets the encapsulated value to another value


projects a { @ link tuple } { @ link data stream } to the previously selected fields


public list < integer > get prefix ns wrapped array ( ) { return prefix ns wrapped array ; }


always clears the current animation on the view using { @ link android view view # clear animation ( ) } , then starts the { @ link android view animation animation } given in the constructor using { @ link android view view # start animation ( android view animation animation ) } and then returns { @ code false } because the animation does not actually put the current resource on the view

public boolean transition ( r current , view adapter adapter ) { view view = adapter get view ( ) ; if ( view ! = null ) { view clear animation ( ) ; animation animation = view transition animation factory build ( view get context ( ) ) ; view start animation ( animation ) ; } return false ; }


public void just number test ( ) { / / todo : test just number }


fix issue # 171 : java lang assertion error : register too many broadcast receivers at android app loaded apk check recevier registered leak locked ( loaded apk java : 772 ) at android app loaded apk get receiver dispatcher ( loaded apk java : 800 ) at android app context impl register receiver internal ( context impl java : 1329 ) at android app context impl register receiver ( context impl java : 1309 ) at com lody virtual server am broadcast system start app ( broadcast system java : 54 ) at com lody virtual server pm v app manager service install ( v app manager service java : 193 ) at com lody virtual server pm v app manager service preload all apps ( v app manager service java : 98 ) at com lody virtual server pm v app manager service system ready ( v app manager service java : 70 ) at com lody virtual server binder provider on create ( binder provider java : 42 )

private void fuck hua wei verifier ( ) { if ( loaded apk hua wei m receiver resource ! = null ) { object package info = context impl m package info get ( m context ) ; if ( package info ! = null ) { object receiver resource = loaded apk hua wei m receiver resource get ( package info ) ; if ( receiver resource ! = null ) { if ( build version sdk int > = 26 ) { map < integer , list < string > > white list map = reflect on ( receiver resource ) get ( " m white list map " ) ; list < string > white list = white list map get ( 0 ) ; if ( white list = = null ) { white list = new array list < > ( ) ; white list map put ( 0 , white list ) ; } white list add ( m context get package name ( ) ) ; } else if ( build version sdk int > = build version codes n ) { if ( receiver resource n m white list ! = null ) { list < string > white list = receiver resource n m white list get ( receiver resource ) ; list < string > new white list = new array list < > ( ) ; / / add our package name to the white list new white list add ( m context get package name ( ) ) ; if ( white list ! = null ) { new white list add all ( white list ) ; } receiver resource n m white list set ( receiver resource , new white list ) ; } } else { if ( receiver resource m m white list ! = null ) { string [ ] white list = receiver resource m m white list get ( receiver resource ) ; list < string > new white list = new linked list < > ( ) ; collections add all ( new white list , white list ) ; / / add our package name to the white list new white list add ( m context get package name ( ) ) ; receiver resource m m white list set ( receiver resource , new white list to array ( new string [ new white list size ( ) ] ) ) ; } else if ( receiver resource l p m resource config ! = null ) { / / just clear the resource config receiver resource l p m resource config set ( receiver resource , null ) ; } } } } } }


alias to < code > times ( 0 ) < code > , see { @ link mockito # times ( int ) } verifies that interaction did not happen e g : < pre class = " code " > < code class = " java " > verify ( mock , never ( ) ) some method ( ) ; < code > if you want to verify there were no interactions with the mock check out { @ link mockito # verify zero interactions ( object ) } or { @ link mockito # verify no more interactions ( object ) } see examples in javadoc for { @ link mockito } class

public static verification mode never ( ) { return times ( 0 ) ; }


this parsing method assumes that the leading " suggest " field name has already been parsed by the caller

public static suggest from x content ( x content parser parser ) throws i o exception { ensure expected token ( x content parser token start object , parser current token ( ) , parser ) ; list < suggestion < ? extends entry < ? extends option > > > suggestions = new array list < > ( ) ; while ( ( parser next token ( ) ) ! = x content parser token end object ) { ensure expected token ( x content parser token field name , parser current token ( ) , parser ) ; string current field = parser current name ( ) ; ensure expected token ( x content parser token start array , parser next token ( ) , parser ) ; suggestion < ? extends entry < ? extends option > > suggestion = suggestion from x content ( parser ) ; if ( suggestion ! = null ) { suggestions add ( suggestion ) ; } else { throw new parsing exception ( parser get token location ( ) , string format ( locale root , " could not parse suggestion keyed as [ % s ] " , current field ) ) ; } } return new suggest ( suggestions ) ; } @ suppress warnings ( { " unchecked " , " rawtypes " }


sets { @ link cue # window color set } to false

public builder clear window color ( ) { this window color set = false ; return this ; }


aggregate the values of records in this stream by the grouped key and defined windows records with { @ code null } key or value are ignored the result is written into a local { @ link window store } ( which is basically an ever - updating materialized view ) furthermore , updates to the store are sent downstream into a { @ link k table } changelog stream the specified { @ link initializer } is applied directly before the first input record ( per key ) in each window is processed to provide an initial intermediate aggregation result that is used to process the first record for the window ( per key ) the specified { @ link aggregator } ( as specified in { @ link k grouped stream # cogroup ( aggregator ) } or { @ link cogrouped k stream # cogroup ( k grouped stream , aggregator ) } ) is applied for each input record and computes a new aggregate using the current aggregate ( or for the very first record using the intermediate aggregation result provided via the { @ link initializer } ) and the record ' s value thus , { @ code aggregate ( ) } can be used to compute aggregate functions like count or sum etc the default key and value serde from the config will be used for serializing the result if a different serde is required then you should use { @ link # aggregate ( initializer , named , materialized ) } not all updates might get sent downstream , as an internal cache is used to deduplicate consecutive updates to the same window and key the rate of propagated updates depends on your input data rate , the number of distinct keys , the number of parallel running kafka streams instances , and the { @ link streams config configuration } parameters for { @ link streams config # cache max bytes buffering config cache size } , and { @ link streams config # commit interval ms config commit interval } for failure and recovery the store ( which always will be of type { @ link timestamped window store } ) will be backed by an internal changelog topic that will be created in kafka the changelog topic will be named " $ { application id } - $ { internal store name } - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " internal store name " is an internal name and " - changelog " is a fixed suffix note that the internal store name may not be queryable through interactive queries you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

k table < windowed < k > , v > aggregate ( final initializer < v > initializer , final named named ) ;


dumps the fields of the object using the { @ code dumper }


validates that the interval between snapshots is not smaller than the minimum interval ( see { @ link lifecycle settings # slm minimum interval setting } )

public static void validate minimum interval ( final snapshot lifecycle policy lifecycle , final cluster state state ) { time value minimum = lifecycle settings slm minimum interval setting get ( state metadata ( ) settings ( ) ) ; time value next = lifecycle calculate next interval ( ) ; if ( next duration ( ) > 0 & & minimum duration ( ) > 0 & & next millis ( ) < minimum millis ( ) ) { throw new illegal argument exception ( " invalid schedule [ " + lifecycle get schedule ( ) + " ] : " + " schedule would be too frequent , executing more than every [ " + minimum get string rep ( ) + " ] " ) ; } }


csi ps x erase ps character ( s ) ( default = 1 ) ( ech )

public void test csi x ( ) { / / see https : / / code google com / p / chromium / issues / detail ? id = 212712 where test was extraced from with terminal sized ( 13 , 2 ) enter string ( " abcdefghijkl \ b \ b \ b \ b \ b \ 033 [ x " ) assert lines are ( " abcdefg ijkl " , " " ) ; with terminal sized ( 13 , 2 ) enter string ( " abcdefghijkl \ b \ b \ b \ b \ b \ 033 [ 1x " ) assert lines are ( " abcdefg ijkl " , " " ) ; with terminal sized ( 13 , 2 ) enter string ( " abcdefghijkl \ b \ b \ b \ b \ b \ 033 [ 2x " ) assert lines are ( " abcdefg jkl " , " " ) ; with terminal sized ( 13 , 2 ) enter string ( " abcdefghijkl \ b \ b \ b \ b \ b \ 033 [ 20x " ) assert lines are ( " abcdefg " , " " ) ; }


tests the python version selectable target , which is the canonical way of determining the python version from within a select ( )

public void select on python version target ( ) throws exception { / / get rule context ( ) doesn ' t populate the information needed to resolve select ( ) s , and / / configured target doesn ' t allow us to test an end - to - end view of the behavior of a select ( ) / / so this test has the select ( ) control srcs and asserts on which one ' s in the files to build artifact py 2 = get source artifact ( " pkg / py 2 " ) ; artifact py 3 = get source artifact ( " pkg / py 3 " ) ; scratch file ( " pkg / build " , " sh binary ( " , " name = ' foo ' , " , " srcs = select ( { " , " ' " + test constants tools repository + " / / tools / python : py2 ' : [ ' py 2 ' ] , " , " ' " + test constants tools repository + " / / tools / python : py3 ' : [ ' py 3 ' ] , " , " } ) , " , " ) " ) ; / / no - - python version , use default value do test select on python version target ( py 2 , " - - incompatible py 3 is default = false " ) ; do test select on python version target ( py 3 , " - - incompatible py 3 is default = true " ) ; / / - - python version is given , use it do test select on python version target ( py 2 , " - - python version = py2 " ) ; do test select on python version target ( py 3 , " - - python version = py3 " ) ; }


enable or disable the use of a guest account if disabled , the existing guest account will be wiped

public void set guest enabled ( boolean enable ) { try { m service set guest enabled ( enable ) ; } catch ( remote exception re ) { log w ( tag , " could not change guest account availability to " + enable ) ; } }


build a composite input split from the child input formats by assigning the ith split from each child to the ith composite split

public list < input split > get splits ( job context job ) throws i o exception , interrupted exception { set format ( job get configuration ( ) ) ; job get configuration ( ) set long ( " mapreduce input fileinputformat split minsize " , long max value ) ; return root get splits ( job ) ; }


exercises dex file merger with two input archives

public void test merge dex archive multiple inputs ( ) throws exception { path dex archive = build dex archive ( ) ; path dex archive 2 = build dex archive ( input jar2 , " libtestdata jar dex zip " ) ; path output archive = run dex file merger ( 256 * 256 , / * force jumbo = * / false , " multiple inputs dex zip " , multidex strategy minimal , / * main dex list = * / null , / * minimal main dex = * / false , dex prefix , dex archive , dex archive 2 ) ; int expected class count = matching file count ( dex archive , " * \ \ class dex $ " ) ; expected class count + = matching file count ( dex archive 2 , " * \ \ class dex $ " ) ; assert single dex output ( expected class count , output archive , " classes dex " ) ; }


matcher that succeeds if a { @ link inspectable component } has a text content that exactly matches the provided string

public static condition < inspectable component > text equals ( final char sequence text ) { return text ( is ( text to string ( ) ) ) ; }


public static tree scan results create subdirs ( file system fs , path current , int depth , int width , int files , int filesize , string dir prefix , string file prefix , string marker ) throws i o exception { fs mkdirs ( current ) ; tree scan results results = new tree scan results ( current ) ; if ( depth > 0 ) { byte [ ] data = dataset ( filesize , ' a ' , ' z ' ) ; for ( int i = 0 ; i < files ; i + + ) { string name = string format ( " % s - % s - % 0 4d txt " , file prefix , marker , i ) ; path path = new path ( current , name ) ; create file ( fs , path , true , data ) ; results add ( fs , path ) ; } for ( int w = 0 ; w < width ; w + + ) { string marker 2 = string format ( " % s - % 0 4d " , marker , w ) ; path child = new path ( current , dir prefix + marker 2 ) ; results add ( create subdirs ( fs , child , depth - 1 , width , files , filesize , dir prefix , file prefix , marker 2 ) ) ; results add ( fs , child ) ; } } return results ; }


sets the maximum parallelism of this operator the maximum parallelism specifies the upper bound for dynamic scaling it also defines the number of key groups used for partitioned state

public single output stream operator < t > set max parallelism ( int max parallelism ) { operator validation utils validate max parallelism ( max parallelism , can be parallel ( ) ) ; transformation set max parallelism ( max parallelism ) ; return this ; }


sets the format schema with field names and the types required if schema is not derived

public csv schema ( type information < row > schema type ) { preconditions check not null ( schema type ) ; internal properties put string ( format schema , type string utils write type info ( schema type ) ) ; return this ; }


execute a query based on the given example entity object

< t > list < t > find by example ( t example entity ) throws data access exception ;


the response resources wrapped in the common mcp resource message these are typed resources that match the type url in the request resources message when ` incremental ` is true , this contains an array of resources to addupdate for the specified collection this modifies the existing collection at the sink when ` incremental ` is false , this contains the full set of resources for the specified collection this replaces any previously delivered resources < code > repeated istio mcp v 1alpha 1 resource resources = 3 ; < code >

public java util list < ? extends com alibaba nacos istio model mcp resource or builder > get resources or builder list ( ) { return resources ; }


public void pop args ( frame frame , prototype prototype ) { std type list types = prototype get parameter types ( ) ; int size = types size ( ) ; / / use the above method to do the actual popping pop args ( frame , size ) ; / / and then verify the popped types for ( int i = 0 ; i < size ; i + + ) { if ( ! merger is possibly assignable from ( types get type ( i ) , args [ i ] ) ) { throw new sim exception ( " at stack depth " + ( size - 1 - i ) + " , expected type " + types get type ( i ) to human ( ) + " but found " + args [ i ] get type ( ) to human ( ) ) ; } } }


returns the service dependencies of this service the service will be instantiated only if all the service dependencies are already initialized this method returns an empty array ( size 0 )

public class [ ] get service dependencies ( ) { return new class [ 0 ] ; }


public boolean is pool lifo ( ) { return default pool lifo ; }


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


fetch data from which a resource can be decoded this will always be called on background thread so it is safe to perform long running tasks here any third party libraries called must be thread safe ( or move the work to another thread ) since this method will be called from a thread in a { @ link java util concurrent executor service } that may have more than one background thread you < b > must < b > use the { @ link data callback } once the request is complete you are free to move the fetch work to another thread and call the callback from there this method will only be called when the corresponding resource is not in the cache note - this method will be run on a background thread so blocking io is safe

void load data ( @ non null priority priority , @ non null data callback < ? super t > callback ) ;


computes and caches any information needed for drawing and , if this actor has children , positions and sizes each child , calls { @ link # invalidate ( ) } on any each child whose width or height has changed , and calls { @ link # validate ( ) } on each child this method should almost never be called directly , instead { @ link # validate ( ) } should be used


aggregate the current statistics with the source reference passed in the operation is synchronized

public synchronized boolean aggregate ( @ nullable i o statistics source ) { if ( source = = null ) { return false ; } aggregate maps ( counters , source counters ( ) , i o statistics binding : : aggregate counters , i o statistics binding : : passthrough fn ) ; aggregate maps ( gauges , source gauges ( ) , i o statistics binding : : aggregate gauges , i o statistics binding : : passthrough fn ) ; aggregate maps ( minimums , source minimums ( ) , i o statistics binding : : aggregate minimums , i o statistics binding : : passthrough fn ) ; aggregate maps ( maximums , source maximums ( ) , i o statistics binding : : aggregate maximums , i o statistics binding : : passthrough fn ) ; aggregate maps ( mean statistics , source mean statistics ( ) , i o statistics binding : : aggregate mean statistics , mean statistic : : copy ) ; return true ; }


return the signature of the proxied method

public signature get signature ( ) { return sig 1 ; }


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


public void set incrementer name ( string incrementer name ) { this incrementer name = incrementer name ; }


checks whether the given annotation type is a recognized qualifier type

protected boolean is qualifier ( class < ? extends annotation > annotation type ) { for ( class < ? extends annotation > qualifier type : this qualifier types ) { if ( annotation type equals ( qualifier type ) | | annotation type is annotation present ( qualifier type ) ) { return true ; } } return false ; }


performs markup on the control flow guard dispatch function , if it exists

private static void markup cfg dispatch function ( load config directory lcd , boolean is 6 4bit , address space space , memory mem , symbol table symbol table ) { if ( lcd get cfg dispatch function pointer ( ) = = 0 ) { return ; } try { address function pointer addr = space get address ( lcd get cfg dispatch function pointer ( ) ) ; address function addr = space get address ( is 6 4bit ? mem get long ( function pointer addr ) : mem get int ( function pointer addr ) ) ; symbol table create label ( function addr , " guard dispatch icall " , source type imported ) ; } catch ( memory access exception | address out of bounds exception | invalid input exception e ) { msg warn ( control flow guard class , " unable to label control flow guard dispatch function " , e ) ; } }


following aspect j semantics , if a returning clause was specified , then the advice is only invoked if the returned value is an instance of the given returning type and generic type parameters , if any , match the assignment rules if the returning type is object , the advice is always invoked

private boolean should invoke on return value of ( method method , @ nullable object return value ) { class < ? > type = get discovered returning type ( ) ; type generic type = get discovered returning generic type ( ) ; / / if we aren ' t dealing with a raw type , check if generic parameters are assignable return ( matches return value ( type , method , return value ) & & ( generic type = = null | | generic type = = type | | type utils is assignable ( generic type , method get generic return type ( ) ) ) ) ; }


public void set expected locations ( block block , datanode storage info [ ] targets , block type block type ) { if ( targets = = null ) { return ; } int num locations = 0 ; for ( datanode storage info target : targets ) { if ( target ! = null ) { num locations + + ; } } this replicas = new replica under construction [ num locations ] ; int offset = 0 ; for ( int i = 0 ; i < targets length ; i + + ) { if ( targets [ i ] ! = null ) { / / when creating a new striped block we simply sequentially assign block / / index to each storage block replica block = block type = = block type striped ? new block ( block get block id ( ) + i , 0 , block get generation stamp ( ) ) : block ; replicas [ offset + + ] = new replica under construction ( replica block , targets [ i ] , replica state rbw ) ; } } }


returns the given string if it is nonempty ; { @ code null } otherwise

public static string empty to null ( @ nullable decl string string ) { return platform empty to null ( string ) ; }


preserve register values and handle register namesize change

public boolean set language ( language translator translator , task monitor monitor ) throws cancelled exception { register new reg = translator get new register ( base register ) ; if ( new reg = = null ) { return false ; } flush write cache ( ) ; / / todo : what should we do if new register is not a base - register ? - the code below will not work ! if ( new reg is processor context ( ) | | ! new reg is base register ( ) | | ! new reg get name ( ) equals ( base register get name ( ) ) | | new reg get bit length ( ) ! = base register get bit length ( ) ) { range map set language ( translator , base register , monitor ) ; base register = new reg get base register ( ) ; } return true ; }


verify that the datanode uuid has been initialized if this is a new datanode then we generate a new datanode uuid and persist it to disk

synchronized void check datanode uuid ( ) throws i o exception { if ( storage get datanode uuid ( ) = = null ) { storage set datanode uuid ( generate uuid ( ) ) ; storage write all ( ) ; log info ( " generated and persisted new datanode uuid { } " , storage get datanode uuid ( ) ) ; } }


public boolean set replication ( final path f , final short replication ) throws access control exception , file not found exception , i o exception { final path abs f = fix relative part ( f ) ; return new f s link resolver < boolean > ( ) { @ override public boolean next ( final abstract file system fs , final path p ) throws i o exception , unresolved link exception { return fs set replication ( p , replication ) ; } } resolve ( this , abs f ) ; }


public static string date format ( timestamp data ts , string format , zone id zone id ) { date time formatter formatter = datetime formatter cache get ( format ) ; instant instant = ts to instant ( ) ; return local date time of instant ( instant , zone id ) format ( formatter ) ; }


do the actual work to construct an assembler from a sleigh language

protected void generate assembler ( ) throws sleigh exception { if ( generated ) { return ; } generated = true ; try { build grammar ( ) ; grammar verify ( ) ; build context ( ) ; build context graph ( ) ; build parser ( ) ; } catch ( sleigh exception e ) { / / not sure this can actually happen here throw e ; } catch ( exception e ) { throw new runtime exception ( e ) ; } }


loads { @ link download request download requests } from the file

public download request [ ] load ( ) throws i o exception { if ( ! exists ( ) ) { return new download request [ 0 ] ; } @ nullable input stream input stream = null ; try { input stream = atomic file open read ( ) ; data input stream data input stream = new data input stream ( input stream ) ; int version = data input stream read int ( ) ; if ( version > version ) { throw new i o exception ( " unsupported action file version : " + version ) ; } int action count = data input stream read int ( ) ; array list < download request > actions = new array list < > ( ) ; for ( int i = 0 ; i < action count ; i + + ) { try { actions add ( read download request ( data input stream ) ) ; } catch ( unsupported request exception e ) { / / remove download request is not supported ignore and continue loading rest } } return actions to array ( new download request [ 0 ] ) ; } finally { util close quietly ( input stream ) ; } }


the specification of this method matches that of { @ link file context # rename ( path , path , options rename ) } except that path f must be for this file system and no overwrite is performed file systems that do not have a built in overwrite need implement only this method and can take advantage of the default impl of the other { @ link # rename internal ( path , path , boolean ) }

public abstract void rename internal ( final path src , final path dst ) throws access control exception , file already exists exception , file not found exception , parent not directory exception , unresolved link exception , i o exception ;


put user { username } : updated user this can only be done by the logged in user

response entity < void > update user ( @ api param ( value = " name that need to be deleted " , required = true ) @ path variable ( " username " ) string username , @ api param ( value = " updated user object " , required = true ) @ valid @ request body user body ) ;


returns everything above the endpoint relative to the specified comparator , with the specified endpoint behavior

static < t > general range < t > down to ( comparator < ? super t > comparator , @ nullable decl t endpoint , bound type bound type ) { return new general range < t > ( comparator , true , endpoint , bound type , false , null , open ) ; }


replace the rolling averages windows for a { @ link mutable rolling averages } metric

public static void replace rolling averages scheduler ( mutable rolling averages mutable rolling averages , int num windows , long interval , time unit time unit ) { mutable rolling averages replace scheduled task ( num windows , interval , time unit ) ; }


gets the number of streams that are actively in use ( i e { @ code open } or { @ code half closed } )


public void set key stroke ( key stroke ks ) { process entry ( ks ) ; set text ( parse key stroke ( ks ) ) ; }


tests that when - - experimental extra action top level only , blaze reports extra - actions for actions registered by aspects injected by a top - level rule because we can ' t know whether an aspect was injected by a top - level target or one of its children , we approximate it by only reporting extra - actions from aspects that the top - level target could have injected here , injector 1 ( ) and injector 2 ( ) inject aspects into their children null rule ( ) just passes the aspects to its children the test makes sure that actions registered by aspect 1 ( injected by injector 1 ( ) ) are reported to the extra - action mechanism actions registered by aspect 2 ( from injector 2 ) are not reported , because the target under test ( x : a ) doesn ' t inject aspect 2

public void extra actions are emitted top level ( ) throws exception { use configuration ( " - - experimental action listener = / / pkg 1 : listener " , " - - experimental extra action top level only " ) ; scratch file ( " x / build " , " load ( ' : extension bzl ' , ' injector 1 ' , ' injector 2 ' , ' null rule ' ) " , " injector 1 ( name = ' a ' , deps = [ ' : b ' ] ) " , " null rule ( name = ' b ' , deps = [ ' : c ' ] ) " , " null rule ( name = ' c ' , deps = [ ' : d ' ] ) " , " injector 2 ( name = ' d ' , extra deps = [ ' : e ' ] ) " , " null rule ( name = ' e ' ) " ) ; scratch file ( " x / extension bzl " , " def aspect impl ( target , ctx ) : " , " ctx actions do nothing ( mnemonic = ' mnemonic ' ) " , " return [ ] " , " aspect 1 = aspect ( aspect impl , attr aspects = [ ' deps ' ] ) " , " aspect 2 = aspect ( aspect impl , attr aspects = [ ' extra deps ' ] ) " , " def rule impl ( ctx ) : " , " return [ ] " , " injector 1 = rule ( rule impl , attrs = { ' deps ' : attr label list ( aspects = [ aspect 1 ] ) } ) " , " null rule = rule ( rule impl , attrs = { ' deps ' : attr label list ( ) } ) " , " injector 2 = rule ( " , " rule impl , attrs = { ' extra deps ' : attr label list ( aspects = [ aspect 2 ] ) } ) " ) ; scratch file ( " pkg 1 / build " , " extra action ( name = ' xa ' , cmd = ' echo dont - care ' ) " , " action listener ( name = ' listener ' , mnemonics = [ ' mnemonic ' ] , extra actions = [ ' : xa ' ] ) " ) ; / / check : / / x : d injects an aspect which produces some extra - action { analysis result analysis result = update ( " / / x : d " ) ; / / get owners of all extra - action artifacts list < label > extra artifact owners = new array list < > ( ) ; for ( artifact artifact : analysis result get top level artifacts to owner labels ( ) get artifacts ( ) ) { if ( artifact get root relative path string ( ) ends with ( " xa " ) ) { extra artifact owners add ( artifact get owner label ( ) ) ; } } assert that ( extra artifact owners ) contains exactly ( label create ( " @ / / x " , " e " ) ) ; } / / actual test : / / x : a reports actions registered by the aspect it injects { analysis result analysis result = update ( " / / x : a " ) ; / / get owners of all extra - action artifacts list < label > extra artifact owners = new array list < > ( ) ; for ( artifact artifact : analysis result get top level artifacts to owner labels ( ) get artifacts ( ) ) { if ( artifact get root relative path string ( ) ends with ( " xa " ) ) { extra artifact owners add ( artifact get owner label ( ) ) ; } } assert that ( extra artifact owners ) contains exactly ( label create ( " @ / / x " , " b " ) , label create ( " @ / / x " , " c " ) , label create ( " @ / / x " , " d " ) ) ; } }


set the service to export typically populated via a bean reference

public void set service ( object service ) { this service = service ; }


get the number of vftable elements in this vftable

public int get element count ( ) { return element count ; }


indicates whether the total hits in the response should be serialized as number ( < code > true < code > ) or as an object ( < code > false < code > ) defaults to false

public void set rest total hits as int ( boolean value ) { this rest total hits as int = value ; }


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


public static < value , context > object parser < value , context > from builder ( string name , function < context , value > value builder ) { require non null ( value builder , " use the single argument ctor instead " ) ; return new object parser < value , context > ( name , error on unknown ( ) , value builder ) ; }


tgs must have the server principal of the form " krbtgt f o o @ foo "

private static boolean is ticket granting server principal ( kerberos principal principal ) { if ( principal = = null ) { return false ; } if ( principal get name ( ) equals ( " krbtgt / " + principal get realm ( ) + " @ " + principal get realm ( ) ) ) { return true ; } return false ; }


mark the recovery with the given id as done ( if found )

public void mark recovery as done ( long id ) { recovery target removed = on going recoveries remove ( id ) ; if ( removed ! = null ) { logger trace ( " { } marking recovery from { } as done , id [ { } ] " , removed shard id ( ) , removed source node ( ) , removed recovery id ( ) ) ; removed mark as done ( ) ; } }


specifies an { @ link assigner with punctuated watermarks } to emit watermarks in a punctuated manner the watermark extractor will run per kafka partition , watermarks will be merged across partitions in the same way as in the flink runtime , when streams are merged when a subtask of a flink kafka consumer source reads multiple kafka partitions , the streams from the partitions are unioned in a " first come first serve " fashion per - partition characteristics are usually lost that way for example , if the timestamps are strictly ascending per kafka partition , they will not be strictly ascending in the resulting flink data stream , if the parallel source subtask reads more than one partition running timestamp extractors watermark generators directly inside the kafka source , per kafka partition , allows users to let them exploit the per - partition characteristics note : one can use either an { @ link assigner with punctuated watermarks } or an { @ link assigner with periodic watermarks } , not both at the same time this method uses the deprecated watermark generator interfaces please switch to { @ link # assign timestamps and watermarks ( watermark strategy ) } to use the new interfaces instead the new interfaces support watermark idleness and no longer need to differentiate between " periodic " and " punctuated " watermarks

public flink kafka consumer base < t > assign timestamps and watermarks ( assigner with punctuated watermarks < t > assigner ) { check not null ( assigner ) ; if ( this watermark strategy ! = null ) { throw new illegal state exception ( " some watermark strategy has already been set " ) ; } try { closure cleaner clean ( assigner , execution config closure cleaner level recursive , true ) ; final watermark strategy < t > wms = new assigner with punctuated watermarks adapter strategy < > ( assigner ) ; return assign timestamps and watermarks ( wms ) ; } catch ( exception e ) { throw new illegal argument exception ( " the given assigner is not serializable " , e ) ; } }


if this storage corresponds to parameter which was forced by the associated calling convention to be passed as a pointer instead of its raw type

public boolean is forced indirect ( ) { return false ; }


checks whether a provided range is within this one

public boolean contains ( @ nullable bytes range compare ) { if ( compare = = null ) { return false ; } return from < = compare from & & to > = compare to ; }


combines multiple iterables into a single iterable the returned iterable has an iterator that traverses the elements of each iterable in { @ code inputs } the input iterators are not polled until necessary the returned iterable ' s iterator supports { @ code remove ( ) } when the corresponding input iterator supports it < b > java 8 users : < b > the { @ code stream } equivalent of this method is { @ code streams concat ( ) }

public static < t > iterable < t > concat ( iterable < ? extends t > inputs ) { return fluent iterable concat ( inputs ) ; }


public void incr ( int delta ) { value add and get ( delta ) ; set changed ( ) ; }


is this empty : does it contain any credentials at all ? this test returns true if either the access key or secret key is empty

public boolean is empty ( ) { return ! ( is not empty ( access key ) & & is not empty ( secret key ) ) ; }


retrieve the started service by component name

public service get service ( component name component ) { return this m services get ( component ) ; }


builder response ( server http response response ) ;


public static void main ( string [ ] args ) { mongo connection properties loader load ( ) ; var injector = guice create injector ( new lottery module ( ) ) ; var administration = injector get instance ( lottery administration class ) ; var service = injector get instance ( lottery service class ) ; sample data submit tickets ( service , 20 ) ; var console administration = new console administration srv impl ( administration , logger ) ; try ( var scanner = new scanner ( system in ) ) { var exit = false ; while ( ! exit ) { print main menu ( ) ; var cmd = read string ( scanner ) ; if ( " 1 " equals ( cmd ) ) { console administration get all submitted tickets ( ) ; } else if ( " 2 " equals ( cmd ) ) { console administration perform lottery ( ) ; } else if ( " 3 " equals ( cmd ) ) { console administration reset lottery ( ) ; } else if ( " 4 " equals ( cmd ) ) { exit = true ; } else { logger info ( " unknown command : { } " , cmd ) ; } } } }


check for a pause ( e g gc ) since the last time { @ link # restart quorum stop watch ( ) } was called if detected , return the length of the pause ; else , - 1

private long get quorum timeout increase millis ( long offset , int millis ) { long elapsed = quorum stop watch now ( time unit milliseconds ) ; long pause time = elapsed + offset ; if ( pause time > ( millis * wait progress info threshold ) ) { quorum journal manager log info ( " pause detected while waiting for " + " quorum call response ; increasing timeout threshold by pause time " + " of " + pause time + " ms " ) ; return pause time ; } else { return - 1 ; } }


obtains all the instances of { @ link node monitor } s that are alive

public static list < node monitor > get all ( ) { return computer set get monitors ( ) to list ( ) ; }


generates a test case verifying that calling any wait for xxx method when not occupying the monitor produces an illegal monitor state exception

private static test case generate wait for when not occupying test case ( final method method , final boolean fair ) { final boolean timed = is timed ( method ) ; / / not going to bother with all timeouts , just 0ms string test name = method get name ( ) + ( fair ? " ( fair ) " : " ( nonfair ) " ) + ( timed ? " ( 0ms ) " : " ( ) " ) + " / not occupying - > imse " ; return new test case ( test name ) { @ override protected void run test ( ) throws throwable { monitor monitor = new monitor ( fair ) ; flag guard guard = new flag guard ( monitor ) ; list < object > arguments = new array list < > ( ) ; arguments add ( guard ) ; if ( is duration based ( method ) ) { arguments add ( duration zero ) ; } if ( is long time unit based ( method ) ) { arguments add ( 0l ) ; arguments add ( time unit milliseconds ) ; } try { method invoke ( monitor , arguments to array ( ) ) ; fail ( " expected illegal monitor state exception " ) ; } catch ( invocation target exception e ) { assert equals ( illegal monitor state exception class , e get target exception ( ) get class ( ) ) ; } } } ; }


public synchronized void add ( string name , long value ) { mutable metric m = metrics map get ( name ) ; if ( m ! = null ) { if ( m instanceof mutable stat ) { ( ( mutable stat ) m ) add ( value ) ; } else { throw new metrics exception ( " unsupported add ( value ) for metric " + name ) ; } } else { metrics map put ( name , new rate ( name ) ) ; / / default is a rate metric add ( name , value ) ; } }


public double get double ( ) { return double ; }


if set , this node is a chunk of text < code > optional string text = 2 ; < code >

private void clear text ( ) { bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 2 ) ; text = get default instance ( ) get text ( ) ; }


log the current user out who previously logged in using keytab this method assumes that the user logged in by calling { @ link # login user from keytab ( string , string ) }

public void logout user from keytab ( ) throws i o exception { if ( ! has kerberos credentials ( ) ) { return ; } / / shutdown the background task performing login renewal if ( get kerberos login renewal executor ( ) is present ( ) ) { get kerberos login renewal executor ( ) get ( ) shutdown now ( ) ; } hadoop login context login = get login ( ) ; string keytab file = get keytab ( ) ; if ( login = = null | | keytab file = = null ) { throw new kerberos auth exception ( must first login from keytab ) ; } try { log debug ( " initiating logout for { } " , get user name ( ) ) ; / / hadoop login context internally locks credentials login logout ( ) ; } catch ( login exception le ) { kerberos auth exception kae = new kerberos auth exception ( logout failure , le ) ; kae set user ( user to string ( ) ) ; kae set keytab file ( keytab file ) ; throw kae ; } log info ( " logout successful for user " + get user name ( ) + " using keytab file " + keytab file ) ; }


private void destroy all invokers ( ) { map < url , invoker < t > > local url invoker map = this url invoker map ; / / local reference if ( local url invoker map ! = null ) { for ( invoker < t > invoker : new array list < > ( local url invoker map values ( ) ) ) { try { invoker destroy ( ) ; } catch ( throwable t ) { logger warn ( " failed to destroy service " + service key + " to provider " + invoker get url ( ) , t ) ; } } local url invoker map clear ( ) ; } invokers = null ; }


return the associated spring { @ link application context }

public final application context get application context ( ) { return this application context ; }


converts a string - & gt ; string mapping into a " key : value " multi - line string

public static string info map to string ( map < string , string > info ) { string builder sb = new string builder ( ) ; for ( entry < string , string > entry : info entry set ( ) ) { sb append ( entry get key ( ) ) append ( " : " ) append ( entry get value ( ) ) append ( " \ n " ) ; } return sb to string ( ) ; }


gets the stack depth change value that has been set at the indicated address

public static integer get stack depth change ( program program , address address ) { property map manager pmm = program get usr property manager ( ) ; int property map ipm = pmm get int property map ( stack depth change name ) ; if ( ipm = = null | | ! ipm has property ( address ) ) { return null ; } try { return ipm get int ( address ) ; } catch ( no value exception e ) { throw new assert exception ( " already checked that it has a property " ) ; } }


creates a config option without a default value

public config option < list < e > > no default value ( ) { return new config option < > ( key , clazz , config option empty description , null , true ) ; }


public builder color res ( yoga edge edge , @ color res int color res ) { check not built ( ) ; return color ( edge , m resource resolver resolve color res ( color res ) ) ; }


returns the { @ code rd } ( recursion desired } field of this dns message


the children of this element < code > repeated aapt pb xml node child = 5 ; < code >

private void remove child ( int index ) { ensure child is mutable ( ) ; child remove ( index ) ; }


get the number of container for this spec

public int get num containers ( ) { return num containers ; }


public static boolean enable epoll ( ) { return netty base config server channel clazz equals ( epoll server socket channel class ) & & epoll is available ( ) ; }


rudimentary parser for class signatures as specified by < a href = " https : docs oracle comjavasespecsjvmsse 1 2htmljvms - 4 html # jvms - class signature " > $ 4 7 9 1 it returns an object containing the generic parameters , super class and any other generic interface parameters the number of generic interface parameters is equal to the { @ code expected num interfaces } for example , the signature { @ code < k : ljavalang object ; v : ljavalang object ; > ljavalang object ; ljavautil map < tk ; tv ; > ; } will result in : { @ code { type parameters : " < k : ljavalang object ; v : ljavalang object ; > " , super class signature : { identifier : " ljavalang object ; " , type parameters : " " } , interface type parameters : [ " tk ; tv ; " ] } }

static class signature read type parameters for interfaces ( string name , string signature , string super name , string [ ] interfaces ) { int expected num interfaces = interfaces length ; try { class signature parser class signature parser = new class signature parser ( signature , expected num interfaces ) ; class signature parser read from signature ( ) ; verify ( class signature parser num interfaces = = expected num interfaces , " incorrect number of generic parameters parsed got % s interfaces , but expected % s " , class signature parser num interfaces , expected num interfaces ) ; return class signature create ( class signature parser ) ; } catch ( runtime exception e ) { throw new illegal argument exception ( string format ( " failed to parse signature % s of class % s with superclass % s and interfaces % s " , signature , name , super name , arrays to string ( interfaces ) ) , e ) ; } }


public void fire component registered ( component definition component definition ) { this event listener component registered ( component definition ) ; }


get an assembler for the given program provides an assembler suitable for the program ' s language , and bound to the program calls to its assembler # assemble ( ) function will cause modifications to the bound program if this is the first time an assembler for the program ' s language has been requested , this function may take some time to build the assembler

public static assembler get assembler ( program program , assembly selector selector ) { assembler builder b = get builder for lang ( program get language ( ) ) ; return b get assembler ( selector , program ) ; }


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


writes the authentication to the { @ link thread context } and then calls the listener if successful

void write auth to context ( authentication authentication ) { runnable action = ( ) - > { logger trace ( " established authentication [ { } ] for request [ { } ] " , authentication , request ) ; listener on response ( authentication ) ; } ; try { authentication serializer write to context ( authentication , thread context ) ; request authentication success ( authentication ) ; / / header for operator privileges will only be written if authentication actually happens , / / i e not read from either header or transient header operator privileges service maybe mark operator user ( authentication , thread context ) ; } catch ( exception e ) { action = ( ) - > { logger debug ( new parameterized message ( " failed to store authentication [ { } ] for request [ { } ] " , authentication , request ) , e ) ; listener on failure ( request exception processing request ( e , authentication token ) ) ; } ; } / / we assign the listener call to an action to avoid calling the listener within a try block and auditing the wrong thing / / when an exception bubbles up even after successful authentication action run ( ) ; }


returns the generalization of this long value and the given other specific long value

public long value generalize ( specific long value other ) { return this ; }


public abstract void set request ( scheduling request request ) ;


set the end delimiter that identifies block comments within the sql scripts defaults to < code > " & # 47 ; " < code >

public void set block comment end delimiter ( string block comment end delimiter ) { assert has text ( block comment end delimiter , " ' block comment end delimiter ' must not be null or empty " ) ; this block comment end delimiter = block comment end delimiter ; }


returns the topic that the presented element should be sent to this is not used for setting the topic ( this is done via the { @ link org apache kafka clients producer producer record } that is returned from { @ link kafka serialization schema # serialize ( object , long ) } , it is only used for getting the available partitions that are presented to { @ link # set partitions ( int [ ] ) }


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


this interface will be removed in a future release

public json node get cluster states ( ) { return jackson utils transfer to json node ( service manager get my self cluster state ( ) ) ; }


returns true if the start addresses of the memory blocks differ

public boolean is start address different ( ) { return ( diff flags & start address ) ! = 0 ; }


gets a path filter which would match job history file names

public static path filter get history file filter ( ) { return job history file filter ; }


whether or not to enable layout tree diffing this will reduce the cost of updates at the expense of using extra memory true by default we will remove this option soon , please consider turning it on ( which is on by default )

public builder layout diffing ( boolean enabled ) { is layout diffing enabled = enabled ; return this ; }


reflects over the generated protobuf class and ensures that no new fields have been added since we wrote this if we didn ' t , newly added fields would not be detected by { @ link group change reconstruct # reconstruct group change }

public void ensure group change reconstruct knows about all fields of decrypted group ( ) { int max field found = get max declared field number ( decrypted group class ) ; assert equals ( " group change reconstruct and its tests need updating to account for new fields on " + decrypted group class get name ( ) , 10 , max field found ) ; }


finish a multipart upload process , which will merge all parts uploaded

public complete multipart upload result complete multipart upload ( string key , string upload id , list < part e tag > part e tag list ) { collections sort ( part e tag list , new comparator < part e tag > ( ) { @ override public int compare ( part e tag o 1 , part e tag o 2 ) { return o 1 get part number ( ) - o 2 get part number ( ) ; } } ) ; log info ( " complete the multipart upload bucket : [ { } ] , cos key : [ { } ] , " + " upload id : [ { } ] " , bucket name , key , upload id ) ; complete multipart upload request complete multipart upload request = new complete multipart upload request ( bucket name , key , upload id , part e tag list ) ; return cos client complete multipart upload ( complete multipart upload request ) ; }


load the param information only when needed

public object lookup variable ( string name ) { if ( this unavailable variables contains ( name ) ) { throw new variable not available exception ( name ) ; } return super lookup variable ( name ) ; }


actions called during the inited to started transition this method will only ever be called once during the lifecycle of a specific service instance implementations do not need to be synchronized as the logic in { @ link # start ( ) } prevents re - entrancy

protected void service start ( ) throws exception { }


find next legal line separator to return next offset ( first byte offset of next line ) note : because of the particularity of utf - 8 encoding , we can determine the number of bytes of this character only by comparing the first byte , so we do not need to traverse mn in comparison

private long find next line start offset ( ) throws i o exception { boolean uses escape char = csv schema uses escape char ( ) ; byte [ ] escape bytes = character to string ( ( char ) csv schema get escape char ( ) ) get bytes ( standard charsets utf 8 ) ; long start pos = stream get pos ( ) ; byte b ; while ( ( b = ( byte ) stream read ( ) ) ! = - 1 ) { if ( b = = ' \ r ' | | b = = ' \ n ' ) { / / if there may be escape tags ahead if ( uses escape char & & stream get pos ( ) - start pos < = escape bytes length ) { long front = stream get pos ( ) - escape bytes length - 1 ; if ( front > 0 ) { stream seek ( front ) ; byte [ ] read bytes = new byte [ escape bytes length ] ; stream read ( read bytes ) ; / / we have judge front must bigger than zero stream read ( ) ; / / back to current next one if ( arrays equals ( escape bytes , read bytes ) ) { / / equal , we should skip this one line separator continue ; } } } long pos = stream get pos ( ) ; / / deal with " \ r \ n " , next one maybe ' \ n ' , so we need skip it if ( b = = ' \ r ' & & ( byte ) stream read ( ) = = ' \ n ' ) { return stream get pos ( ) ; } else { return pos ; } } else if ( uses escape char & & b = = escape bytes [ 0 ] ) { boolean equal = true ; for ( int i = 1 ; i < escape bytes length ; i + + ) { if ( ( byte ) stream read ( ) ! = escape bytes [ i ] ) { equal = false ; break ; } } if ( equal ) { / / equal , we should skip next one stream skip ( 1 ) ; } } } return stream get pos ( ) ; }


deserializes the access control list object

public void read fields ( data input in ) throws i o exception { string acl string = text read string ( in ) ; build a c l ( acl string split ( " " , 2 ) ) ; }


test group reduce on neighbors ( ) - neighbors function with vertex value - with an edge having a src id that does not exist in the vertex data set

public void test group reduce on neighbors with v v invalid edge src id ( ) throws exception { final execution environment env = execution environment get execution environment ( ) ; env set parallelism ( parallelism ) ; graph < long , long , long > graph = graph from data set ( test graph utils get long long vertex data ( env ) , test graph utils get long long edge invalid src data ( env ) , env ) ; try { data set < tuple 2 < long , long > > vertices with sum of out neighbor values = graph group reduce on neighbors ( new sum all neighbors ( ) , edge direction all ) ; vertices with sum of out neighbor values output ( new discarding output format < > ( ) ) ; env execute ( ) ; fail ( " expected an exception " ) ; } catch ( exception e ) { / / we expect the job to fail with an exception } }


tests that the checkpoint coordinator is shut down if the execution graph is failed

public void test shutdown checkpoint coordinator on failure ( ) throws exception { final completable future < job status > counter shutdown future = new completable future < > ( ) ; checkpoint i d counter counter = new testing checkpoint i d counter ( counter shutdown future ) ; final completable future < job status > store shutdown future = new completable future < > ( ) ; completed checkpoint store store = new testing completed checkpoint store ( store shutdown future ) ; final scheduler base scheduler = create scheduler and enable checkpointing ( counter , store ) ; final execution graph graph = scheduler get execution graph ( ) ; final checkpoint coordinator checkpoint coordinator = graph get checkpoint coordinator ( ) ; assert that ( checkpoint coordinator , matchers not null value ( ) ) ; assert that ( checkpoint coordinator is shutdown ( ) , is ( false ) ) ; graph fail global ( new exception ( " test exception " ) ) ; assert that ( checkpoint coordinator is shutdown ( ) , is ( true ) ) ; assert that ( counter shutdown future get ( ) , is ( job status failed ) ) ; assert that ( store shutdown future get ( ) , is ( job status failed ) ) ; }


public void println ( ) { println ( " " ) ; }


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

public affine 2 set to rotation rad ( float radians ) { float cos = math utils cos ( radians ) ; float sin = math utils sin ( radians ) ; m 0 0 = cos ; m 0 1 = - sin ; m 0 2 = 0 ; m 1 0 = sin ; m 1 1 = cos ; m 1 2 = 0 ; return this ; }


public void test handles duplicate files ( ) throws exception { path file 1 = mockito mock ( path class ) ; when ( file 1 get base name ( ) ) then return ( " foo " ) ; build event event 1 = new with local files event ( immutable list of ( file 1 , file 1 ) ) ; build event artifact uploader uploader = mockito spy ( new build event artifact uploader with ref counting ( ) { @ override public listenable future < path converter > upload ( map < path , local file > files ) { return futures immediate future ( new file uri path converter ( ) ) ; } @ override public boolean may be slow ( ) { return false ; } } ) ; file output = tmp new file ( ) ; buffered output stream output stream = new buffered output stream ( files new output stream ( paths get ( output get absolute path ( ) ) ) ) ; binary format file transport transport = new binary format file transport ( output stream , default opts , uploader , artifact group namer ) ; transport send build event ( event 1 ) ; transport close ( ) get ( ) ; try ( input stream in = new file input stream ( output ) ) { assert that ( build event stream protos build event parse delimited from ( in ) ) is equal to ( event 1 as stream proto ( null ) ) ; assert that ( in available ( ) ) is equal to ( 0 ) ; } }


size the columns such that the interesting ones are wider than the uninteresting columns

private void adjust table columns ( ) { bookmark table size columns to fit ( - 1 ) ; table column column = bookmark table get column ( bookmark table get column name ( bookmark table model comment col ) ) ; column set preferred width ( 200 ) ; column = bookmark table get column ( bookmark table get column name ( bookmark table model preview col ) ) ; column set preferred width ( 150 ) ; column = bookmark table get column ( bookmark table get column name ( bookmark table model category col ) ) ; column set preferred width ( 90 ) ; column = bookmark table get column ( bookmark table get column name ( bookmark table model location col ) ) ; column set preferred width ( 90 ) ; }


private pair < integer , integer > read web p image size ( ) { final pair < integer , integer > dimensions = webp util get size ( get input stream ( ) ) ; if ( dimensions ! = null ) { m width = dimensions first ; m height = dimensions second ; } return dimensions ; }


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


returns a { @ code collector } accumulating entries into an { @ code immutable list multimap } each input element is mapped to a key and a stream of values , each of which are put into the resulting { @ code multimap } , in the encounter order of the stream and the encounter order of the streams of values example : { @ code static final immutable list multimap < character , character > first letter multimap = stream of ( " banana " , " apple " , " carrot " , " asparagus " , " cherry " ) collect ( flattening to immutable list multimap ( str - > str char at ( 0 ) , str - > str substring ( 1 ) chars ( ) map to obj ( c - > ( char ) c ) ) ; is equivalent to static final immutable list multimap < character , character > first letter multimap = immutable list multimap < character , character > builder ( ) put all ( ' b ' , arrays as list ( ' a ' , ' n ' , ' a ' , ' n ' , ' a ' ) ) put all ( ' a ' , arrays as list ( ' p ' , ' p ' , ' l ' , ' e ' ) ) put all ( ' c ' , arrays as list ( ' a ' , ' r ' , ' r ' , ' o ' , ' t ' ) ) put all ( ' a ' , arrays as list ( ' s ' , ' p ' , ' a ' , ' r ' , ' a ' , ' g ' , ' u ' , ' s ' ) ) put all ( ' c ' , arrays as list ( ' h ' , ' e ' , ' r ' , ' r ' , ' y ' ) ) build ( ) ; } }

public static < t , k , v > collector < t , ? , immutable list multimap < k , v > > flattening to immutable list multimap ( function < ? super t , ? extends k > key function , function < ? super t , ? extends stream < ? extends v > > values function ) { return collect collectors flattening to immutable list multimap ( key function , values function ) ; }


same as { @ link application # on terminate ( ) }


public object get attribute ( string name ) { return web app context get attribute ( name ) ; }


after successful sasl negotiation , returns whether it ' s qop privacy

public boolean is negotiated qop privacy ( ) { string qop = get negotiated qop ( ) ; return qop ! = null & & " auth - conf " equals ignore case ( qop ) ; }


returns typecasted value for attribute or { @ code null } on no match

public < t > t get ( string attribute name , type < t > type ) throws eval exception { preconditions check not null ( type ) ; object value = get object ( attribute name ) ; try { return type cast ( value ) ; } catch ( class cast exception ex ) { throw new eval exception ( ex ) ; } }


shows the given dialog component provider using the given tool ' s { @ link plugin tool # show dialog ( dialog component provider ) } method

public static dialog component provider show dialog without blocking ( plugin tool tool , dialog component provider provider ) { execute on swing without blocking ( ( ) - > tool show dialog ( provider ) ) ; / / this call waits for the dialog to be shown dialog component provider dialog = wait for dialog component ( provider get class ( ) ) ; wait for swing ( ) ; return dialog ; }


return a { @ link # parse and cache previously } parsed and cached { @ code request path }

public static request path get parsed request path ( servlet request request ) { request path path = ( request path ) request get attribute ( path attribute ) ; assert not null ( path , " expected parsed request path in request attribute \ " " + path attribute + " \ " " ) ; return path ; }


public void upload file test ( ) throws exception { long pet id = cache get long ( " / upload file / pet id " ) ; string additional metadata = cache get string ( " / upload file / additional metadata " ) ; attachment file = new attachment ( " file " , media type text plain , " dummy attachment content " ) ; model api response response = api upload file ( pet id , additional metadata , file ) ; / / todo : complete test assertions validate ( response ) ; }


listens for changes to the cluster state , in order to know whether to toggle indexing and to set the cluster uuid and node id these can ' t be set in the constructor because the initial cluster state won ' t be set yet

public void cluster changed ( cluster changed event event ) { final cluster state state = event state ( ) ; final boolean new enabled = write deprecation logs to index get ( state get metadata ( ) settings ( ) ) ; if ( appender is enabled ( ) ! = new enabled ) { / / we ' ve flipped from disabled to enabled make sure we start with a clean cache of / / previously - seen keys , otherwise we won ' t index anything if ( new enabled ) { this filter reset ( ) ; } appender set enabled ( new enabled ) ; } }


public map < string , boolean > get indirect map ( ) { return indirect map ; }


protected static boolean locate matching credential type ( final authentication authentication , final string credential class type ) { return string utils is not blank ( credential class type ) & & authentication get credentials ( ) stream ( ) any match ( e - > e get credential class ( ) get name ( ) matches ( credential class type ) ) ; }


issue : add at least one assertion to this test case solution : inserted assertion to check whether the execution of the main method in { @ link app # main ( string [ ] ) } throws an exception

void should execute application without exception ( ) { assert does not throw ( ( ) - > app main ( new string [ ] { } ) ) ; }


determine whether alias overriding is allowed default is { @ code true }

protected boolean allow alias overriding ( ) { return true ; }


public list < integer > get array item ( ) { return array item ; }


tests the " convenience factories " ( string , label , etc ) for types

public void test convenience factories types ( ) throws exception { assert type ( integer , attr ( " x " , integer ) build ( ) ) ; assert type ( integer , attr ( " x " , integer ) value ( starlark int of ( 42 ) ) build ( ) ) ; assert type ( string , attr ( " x " , string ) build ( ) ) ; assert type ( string , attr ( " x " , string ) value ( " foo " ) build ( ) ) ; label label = label parse absolute ( " / / foo : bar " , immutable map of ( ) ) ; assert type ( label , attr ( " x " , label ) legacy allow any file type ( ) build ( ) ) ; assert type ( label , attr ( " x " , label ) legacy allow any file type ( ) value ( label ) build ( ) ) ; list < string > slist = arrays as list ( " foo " , " bar " ) ; assert type ( string list , attr ( " x " , string list ) build ( ) ) ; assert type ( string list , attr ( " x " , string list ) value ( slist ) build ( ) ) ; list < label > llist = arrays as list ( label parse absolute ( " / / foo : bar " , immutable map of ( ) ) , label parse absolute ( " / / foo : wiz " , immutable map of ( ) ) ) ; assert type ( label list , attr ( " x " , label list ) legacy allow any file type ( ) build ( ) ) ; assert type ( label list , attr ( " x " , label list ) legacy allow any file type ( ) value ( llist ) build ( ) ) ; }


tests that servers supporting multiple sasl mechanisms work with clients using any of the enabled mechanisms also tests successful re - authentication over multiple mechanisms

public void test multiple server mechanisms ( ) throws exception { security protocol security protocol = security protocol sasl ssl ; configure mechanisms ( " digest - md5 " , arrays as list ( " digest - md5 " , " plain " , " scram - sha - 256 " ) ) ; configure digest md 5 server callback ( security protocol ) ; server = create echo server ( security protocol ) ; update scram credential cache ( test jaas config username , test jaas config password ) ; string node 1 = " 1 " ; sasl client configs put ( sasl configs sasl mechanism , " plain " ) ; create and check client connection ( security protocol , node 1 ) ; server verify authentication metrics ( 1 , 0 ) ; selector selector 2 = null ; selector selector 3 = null ; try { string node 2 = " 2 " ; sasl client configs put ( sasl configs sasl mechanism , " digest - md5 " ) ; create selector ( security protocol , sasl client configs ) ; selector 2 = selector ; inet socket address addr = new inet socket address ( " 127 0 0 1 " , server port ( ) ) ; selector connect ( node 2 , addr , buffer size , buffer size ) ; network test utils check client connection ( selector , node 2 , 100 , 10 ) ; selector = null ; / / keeps it from being closed when next one is created server verify authentication metrics ( 2 , 0 ) ; string node 3 = " 3 " ; sasl client configs put ( sasl configs sasl mechanism , " scram - sha - 256 " ) ; create selector ( security protocol , sasl client configs ) ; selector 3 = selector ; selector connect ( node 3 , new inet socket address ( " 127 0 0 1 " , server port ( ) ) , buffer size , buffer size ) ; network test utils check client connection ( selector , node 3 , 100 , 10 ) ; server verify authentication metrics ( 3 , 0 ) ; / * * now re - authenticate the connections first we have to sleep long enough so * that the next write will cause re - authentication , which we expect to succeed * / delay ( ( long ) ( connections max reauth ms value * 1 1 ) ) ; server verify reauthentication metrics ( 0 , 0 ) ; network test utils check client connection ( selector 2 , node 2 , 100 , 10 ) ; server verify reauthentication metrics ( 1 , 0 ) ; network test utils check client connection ( selector 3 , node 3 , 100 , 10 ) ; server verify reauthentication metrics ( 2 , 0 ) ; } finally { if ( selector 2 ! = null ) selector 2 close ( ) ; if ( selector 3 ! = null ) selector 3 close ( ) ; } }


check whether the connector or any of its tasks are still in running state

protected boolean check connector and tasks are stopped ( string connector name ) { connector state info info ; try { info = connect connector status ( connector name ) ; } catch ( connect rest exception e ) { return e status code ( ) = = response status not found get status code ( ) ; } catch ( exception e ) { log error ( " could not check connector state info " , e ) ; return false ; } if ( info = = null ) { return true ; } return ! info connector ( ) state ( ) equals ( abstract status state running to string ( ) ) & & info tasks ( ) stream ( ) none match ( s - > s state ( ) equals ( abstract status state running to string ( ) ) ) ; }


test the property ' array array of integer '

public void array array of integer test ( ) { / / todo : test array array of integer }


called when the requested resource is not available

void on resource does not exist ( string resource name ) ;


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


function to run a log handler with directories failing the get file status call the function accepts the log handler , setup the mocks to fail with specific exceptions and ensures the deletion service has the correct calls

public static void run mocked failed dirs ( log handler log handler , application id app id , string user , deletion service mock del service , local dirs handler service dirs handler , configuration conf , abstract file system spylfs , file context lfs , file [ ] local log dirs ) throws exception { map < application access type , string > app acls = new hash map < application access type , string > ( ) ; if ( local log dirs length < 7 ) { throw new illegal argument exception ( " argument local log dirs must be at least of length 7 " ) ; } path [ ] local app log dir paths = new path [ local log dirs length ] ; for ( int i = 0 ; i < local app log dir paths length ; i + + ) { local app log dir paths [ i ] = new path ( local log dirs [ i ] get absolute path ( ) , app id to string ( ) ) ; } final list < string > local log dir paths = new array list < string > ( local log dirs length ) ; for ( int i = 0 ; i < local log dirs length ; i + + ) { local log dir paths add ( local log dirs [ i ] get absolute path ( ) ) ; } / / setup mocks fs permission default permission = fs permission get dir default ( ) apply u mask ( lfs get u mask ( ) ) ; final file status fs = new file status ( 0 , true , 1 , 0 , system current time millis ( ) , 0 , default permission , " " , " " , new path ( local log dirs [ 0 ] get absolute path ( ) ) ) ; do return ( fs ) when ( spylfs ) get file status ( is a ( path class ) ) ; do return ( local log dir paths ) when ( dirs handler ) get log dirs for cleanup ( ) ; log handler handle ( new log handler app started event ( app id , user , null , app acls ) ) ; / / test case where some dirs have the log dir to delete / / mock some dirs throwing various exceptions / / verify deletion happens only on the others mockito do throw ( new file not found exception ( ) ) when ( spylfs ) get file status ( eq ( local app log dir paths [ 0 ] ) ) ; do return ( fs ) when ( spylfs ) get file status ( eq ( local app log dir paths [ 1 ] ) ) ; mockito do throw ( new access control exception ( ) ) when ( spylfs ) get file status ( eq ( local app log dir paths [ 2 ] ) ) ; do return ( fs ) when ( spylfs ) get file status ( eq ( local app log dir paths [ 3 ] ) ) ; mockito do throw ( new i o exception ( ) ) when ( spylfs ) get file status ( eq ( local app log dir paths [ 4 ] ) ) ; mockito do throw ( new unsupported file system exception ( " test " ) ) when ( spylfs ) get file status ( eq ( local app log dir paths [ 5 ] ) ) ; do return ( fs ) when ( spylfs ) get file status ( eq ( local app log dir paths [ 6 ] ) ) ; log handler handle ( new log handler app finished event ( app id ) ) ; test deletion service call ( mock del service , user , 5000 , local app log dir paths [ 1 ] , local app log dir paths [ 3 ] , local app log dir paths [ 6 ] ) ; return ; }


public byte [ ] get vals ( ) { return vals ; }


creates a { @ link field accessor } for the given field position , which can be used to get and set the specified field on instances of this type

public static < t , f > field accessor < t , f > get accessor ( type information < t > type info , int pos , execution config config ) { / / in case of arrays if ( type info instanceof basic array type info | | type info instanceof primitive array type info ) { return new field accessor array field accessor < > ( pos , type info ) ; / / in case of basic types } else if ( type info instanceof basic type info ) { if ( pos ! = 0 ) { throw new composite type invalid field reference exception ( " the " + ( ( integer ) pos ) to string ( ) + " field selected on a " + " basic type ( " + type info to string ( ) + " ) a field expression on a basic type can only select " + " the 0th field ( which means selecting the entire basic type ) " ) ; } @ suppress warnings ( " unchecked " ) field accessor < t , f > result = ( field accessor < t , f > ) new field accessor simple field accessor < > ( type info ) ; return result ; / / in case of case classes } else if ( type info is tuple type ( ) & & ( ( tuple type info base ) type info ) is case class ( ) ) { tuple type info base tuple type info = ( tuple type info base ) type info ; @ suppress warnings ( " unchecked " ) type information < f > field type info = ( type information < f > ) tuple type info get type at ( pos ) ; return new field accessor recursive product field accessor < > ( pos , type info , new field accessor simple field accessor < > ( field type info ) , config ) ; / / in case of tuples } else if ( type info is tuple type ( ) ) { @ suppress warnings ( " unchecked " ) field accessor < t , f > result = new field accessor simple tuple field accessor ( pos , type info ) ; return result ; / / default case , pojo type is directed to this statement } else { throw new composite type invalid field reference exception ( " cannot reference field by position on " + type info to string ( ) + " referencing a field by position is supported on tuples , case classes , and arrays " + " additionally , you can select the 0th field of a primitive / basic type ( e g int ) " ) ; } }


removes and disposes the given { @ link disposable } if it is part of this container

public boolean remove ( @ non null disposable disposable ) { if ( delete ( disposable ) ) { disposable dispose ( ) ; return true ; } return false ; }


get the value of the static { @ linkplain field field } with the given { @ code name } from the provided { @ code target class } this method delegates to { @ link # get field ( object , class , string ) } , supplying { @ code null } for the { @ code target object } argument

public static object get field ( class < ? > target class , string name ) { return get field ( null , target class , name ) ; }


customize the response for http message not readable exception this method delegates to { @ link # handle exception internal }

protected response entity < object > handle http message not readable ( http message not readable exception ex , http headers headers , http status status , web request request ) { return handle exception internal ( ex , null , headers , status , request ) ; }


resolve the given destination name to a destination and send a message to it

void send ( string destination name , message < ? > message ) throws messaging exception ;


the set of attribute declarations < code > repeated aapt pb styleable entry entry = 1 ; < code >

public com android aapt resources styleable entry get entry ( int index ) { return entry get ( index ) ; }


public boolean get bool item ( ) { return bool item ; }


returns a substring of the given string , representing the ' length ' most - left characters

public static string left str ( string str , int length ) { return str substring ( 0 , math min ( str length ( ) , length ) ) ; }


get base backoff millis for the describe stream operation

public long get describe stream base backoff millis ( ) { return describe stream base backoff millis ; }


returns the vertices of the given graph in post - order , which is the order the vertices are last visited when performing a depth - first traversal

public static < v , e extends g edge < v > > list < v > post order ( g directed graph < v , e > g , graph navigator < v , e > navigator ) { depth first sorter < v , e > sorter = new depth first sorter < > ( g , navigator ) ; list < v > list = sorter get vertices post order ( ) ; sorter dispose ( ) ; return list ; }


query string parameters the returned map is an unmodifiable view of the map in the request so calls to { @ link # add parameter ( string , string ) } will change it

public map < string , string > get parameters ( ) { return unmodifiable map ( parameters ) ; }


whether the am container for this app is over max a m share limit

private boolean is over a m share limit ( ) { / / check the am resource usage for the leaf queue if ( ! is am running ( ) & & ! get unmanaged a m ( ) ) { / / return true if we have not ask , or queue is not be able to run app ' s am pending ask ask = app scheduling info get next pending ask ( ) ; if ( ask ! = null & & ( ask get count ( ) = = 0 | | ! get queue ( ) can run app a m ( ask get per allocation resource ( ) ) ) ) { return true ; } } return false ; }


returns all framework names to pass to the linker using { @ code - framework } flags for a framework in the directory foobar framework , the name is " bar " each framework is found without using the full path by means of the framework search paths search paths are added by { @ link # common link and compile flags for clang ( objc provider , objc configuration , apple configuration ) } ) it ' s awful that we can ' t pass the full path to the framework and avoid framework search paths , but this is imposed on us by clang clang does not support passing the full path to the framework , so bazel cannot do it either

private set < string > framework names ( objc provider provider ) { set < string > names = new linked hash set < > ( ) ; names add all ( sdk framework names ( provider get ( sdk framework ) ) ) ; names add all ( provider static framework names ( ) to list ( ) ) ; names add all ( provider dynamic framework names ( ) to list ( ) ) ; return names ; }


gets an enrich policy for the provided name if exists or otherwise returns < code > null < code >

public static enrich policy get policy ( string name , cluster state state ) { if ( strings is null or empty ( name ) ) { throw new illegal argument exception ( " name is missing or empty " ) ; } return get policies ( state ) get ( name ) ; }


returns project lock file to prevent multiple accesses to the same project at once

public file get project lock file ( ) { return new file ( location , name + lock file suffix ) ; }


removes and returns first element , or null if empty

private e unlink first ( ) { / / assert lock is held by current thread ( ) ; node < e > f = first ; if ( f = = null ) return null ; node < e > n = f next ; e item = f item ; f item = null ; f next = f ; / / help gc first = n ; if ( n = = null ) last = null ; else n prev = null ; - - count ; not full signal ( ) ; return item ; }


returns true if the query is null or it ' s a properly formatted query string

protected boolean is valid query ( string query ) { if ( query = = null ) { return true ; } return query pattern matcher ( query ) matches ( ) ; }


adds a symbol with the indicated name at the specified address and makes it primary

private void add primary symbol ( program program , string address string , string symbol name ) throws duplicate name exception , invalid input exception { address address = addr ( address string , program ) ; int tx i d = program start transaction ( " add primary symbol " ) ; boolean commit = false ; try { symbol table symbol table = program get symbol table ( ) ; symbol symbol = symbol table create label ( address , symbol name , source type user defined ) ; set label primary cmd set label primary cmd = new set label primary cmd ( address , symbol get name ( ) , symbol get parent namespace ( ) ) ; vt test env get tool ( ) execute ( set label primary cmd , program ) ; commit = true ; } finally { program end transaction ( tx i d , commit ) ; } }


public expiration policy to ticket expiration policy ( ) { val oauth = cas properties get authn ( ) get oauth ( ) get access token ( ) ; if ( cas properties get logout ( ) is remove descendant tickets ( ) ) { return new o auth 2 0 access token expiration policy ( beans new duration ( oauth get max time to live in seconds ( ) ) get seconds ( ) , beans new duration ( oauth get time to kill in seconds ( ) ) get seconds ( ) ) ; } return new o auth 2 0 access token expiration policy o auth access token sovereign expiration policy ( beans new duration ( oauth get max time to live in seconds ( ) ) get seconds ( ) , beans new duration ( oauth get time to kill in seconds ( ) ) get seconds ( ) ) ; }


adds an { @ link update request } to the list of actions to execute

public bulk request builder add ( update request request ) { super request add ( request ) ; return this ; }


set the body of the request and build it the string is assumed to be utf - 8 encoded unless the request has a " content - type " header with a charset attribute

mock server http request body ( string body ) ;


loads a { @ link fingerprint } from the storage with the given unique id

public static @ check for null fingerprint load ( @ non null string id ) throws i o exception { long start = 0 ; if ( logger is loggable ( level fine ) ) { start = system current time millis ( ) ; } fingerprint storage configured fingerprint storage = fingerprint storage get ( ) ; fingerprint storage file fingerprint storage = file fingerprint storage get file fingerprint storage ( ) ; fingerprint loaded = configured fingerprint storage load ( id ) ; if ( loaded = = null & & ! ( configured fingerprint storage instanceof file fingerprint storage ) & & file fingerprint storage is ready ( ) ) { loaded = file fingerprint storage load ( id ) ; if ( loaded ! = null ) { init facets ( loaded ) ; configured fingerprint storage save ( loaded ) ; file fingerprint storage delete ( id ) ; } } else { init facets ( loaded ) ; } if ( logger is loggable ( level fine ) ) { logger fine ( " loading fingerprint took " + ( system current time millis ( ) - start ) + " ms " ) ; } return loaded ; }