signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class Signature { /** * Append an argument ( name + type ) to the signature .
* @ param name the name of the argument
* @ param type the type of the argument
* @ return a new signature with the added arguments */
public Signature appendArg ( String name , Class < ? > type ) { } }
|
String [ ] newArgNames = new String [ argNames . length + 1 ] ; System . arraycopy ( argNames , 0 , newArgNames , 0 , argNames . length ) ; newArgNames [ argNames . length ] = name ; MethodType newMethodType = methodType . appendParameterTypes ( type ) ; return new Signature ( newMethodType , newArgNames ) ;
|
public class AjaxPageShellInterceptor { /** * Override to set the content type of the response and reset the headers .
* @ param request The request being serviced . */
@ Override public void preparePaint ( final Request request ) { } }
|
UIContext uic = UIContextHolder . getCurrent ( ) ; Headers headers = uic . getUI ( ) . getHeaders ( ) ; headers . reset ( ) ; headers . setContentType ( WebUtilities . CONTENT_TYPE_XML ) ; super . preparePaint ( request ) ;
|
public class CmsDefaultSessionStorageProvider { /** * Returns all sessions or all sessions matching the user id from the provided Map . < p >
* @ param allSessions the Map of existing sessions
* @ param userId the id of the user , if null all sessions will be returned
* @ return all sessions or all sessions matching the user id from the provided Map */
private List < CmsSessionInfo > getAllSelected ( Map < CmsUUID , CmsSessionInfo > allSessions , CmsUUID userId ) { } }
|
List < CmsSessionInfo > userSessions = new ArrayList < CmsSessionInfo > ( ) ; Iterator < Map . Entry < CmsUUID , CmsSessionInfo > > i = allSessions . entrySet ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { Map . Entry < CmsUUID , CmsSessionInfo > entry = i . next ( ) ; CmsSessionInfo sessionInfo = entry . getValue ( ) ; if ( ( sessionInfo != null ) && ( ( userId == null ) || userId . equals ( sessionInfo . getUserId ( ) ) ) ) { // sessionInfo = = null may be the case in case of concurrent modification
userSessions . add ( sessionInfo ) ; } } return userSessions ;
|
public class NetWorkCenter { /** * 发起HTTP POST同步请求
* jdk8使用函数式方式处理请求结果
* jdk6使用内部类方式处理请求结果
* @ param url 请求对应的URL地址
* @ param paramData 请求所带参数 , 目前支持JSON格式的参数
* @ param fileList 需要一起发送的文件列表
* @ param callback 请求收到响应后回调函数 , 参数有2个 , 第一个为resultCode , 即响应码 , 比如200为成功 , 404为不存在 , 500为服务器发生错误 ;
* 第二个为resultJson , 即响应回来的数据报文 */
public static void post ( String url , String paramData , List < File > fileList , ResponseCallback callback ) { } }
|
doRequest ( RequestMethod . POST , url , paramData , fileList , callback ) ;
|
public class URI { /** * Determine whether a given string contains only URI characters ( also
* called " uric " in RFC 2396 ) . uric consist of all reserved
* characters , unreserved characters and escaped characters .
* @ param p _ uric URI string
* @ return true if the string is comprised of uric , false otherwise */
private static boolean isURIString ( String p_uric ) { } }
|
if ( p_uric == null ) { return false ; } int end = p_uric . length ( ) ; char testChar = '\0' ; for ( int i = 0 ; i < end ; i ++ ) { testChar = p_uric . charAt ( i ) ; if ( testChar == '%' ) { if ( i + 2 >= end || ! isHex ( p_uric . charAt ( i + 1 ) ) || ! isHex ( p_uric . charAt ( i + 2 ) ) ) { return false ; } else { i += 2 ; continue ; } } if ( isReservedCharacter ( testChar ) || isUnreservedCharacter ( testChar ) ) { continue ; } else { return false ; } } return true ;
|
public class PropertyUtils { /** * Get a string property from the properties .
* @ param properties the provided properties
* @ return the string property */
public static String getStringProperty ( Properties properties , String key ) { } }
|
String property = properties . getProperty ( key ) ; return property != null && property . trim ( ) . isEmpty ( ) ? null : property ;
|
public class task_command_log { /** * < pre >
* Converts API response of bulk operation into object and returns the object array in case of get request .
* < / pre > */
protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
|
task_command_log_responses result = ( task_command_log_responses ) service . get_payload_formatter ( ) . string_to_resource ( task_command_log_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . message , result . errorcode , ( base_response [ ] ) result . task_command_log_response_array ) ; } task_command_log [ ] result_task_command_log = new task_command_log [ result . task_command_log_response_array . length ] ; for ( int i = 0 ; i < result . task_command_log_response_array . length ; i ++ ) { result_task_command_log [ i ] = result . task_command_log_response_array [ i ] . task_command_log [ 0 ] ; } return result_task_command_log ;
|
public class JavaParser { /** * Delegated rules */
public final boolean synpred222_Java ( ) { } }
|
state . backtracking ++ ; int start = input . mark ( ) ; try { synpred222_Java_fragment ( ) ; // can never throw exception
} catch ( RecognitionException re ) { System . err . println ( "impossible: " + re ) ; } boolean success = ! state . failed ; input . rewind ( start ) ; state . backtracking -- ; state . failed = false ; return success ;
|
public class CompoundReentrantTypeResolver { /** * / * @ Nullable */
@ Override public LightweightTypeReference getExpectedType ( XExpression expression ) { } }
|
IResolvedTypes delegate = getDelegate ( expression ) ; return delegate . getExpectedType ( expression ) ;
|
public class UTF16 { /** * Returns the UTF - 32 offset corresponding to the first UTF - 32 boundary at the given UTF - 16
* offset . Used for random access . See the { @ link UTF16 class description } for notes on
* roundtripping . < br >
* < i > Note : If the UTF - 16 offset is into the middle of a surrogate pair , then the UTF - 32 offset
* of the < strong > lead < / strong > of the pair is returned . < / i >
* To find the UTF - 32 length of a substring , use :
* < pre >
* len32 = countCodePoint ( source , start , limit ) ;
* < / pre >
* @ param source Text to analyse
* @ param start Offset of the substring
* @ param limit Offset of the substring
* @ param offset16 UTF - 16 relative to start
* @ return UTF - 32 offset relative to start
* @ exception IndexOutOfBoundsException If offset16 is not within the range of start and limit . */
public static int findCodePointOffset ( char source [ ] , int start , int limit , int offset16 ) { } }
|
offset16 += start ; if ( offset16 > limit ) { throw new StringIndexOutOfBoundsException ( offset16 ) ; } int result = 0 ; char ch ; boolean hadLeadSurrogate = false ; for ( int i = start ; i < offset16 ; ++ i ) { ch = source [ i ] ; if ( hadLeadSurrogate && isTrailSurrogate ( ch ) ) { hadLeadSurrogate = false ; // count valid trail as zero
} else { hadLeadSurrogate = isLeadSurrogate ( ch ) ; ++ result ; // count others as 1
} } if ( offset16 == limit ) { return result ; } // end of source being the less significant surrogate character
// shift result back to the start of the supplementary character
if ( hadLeadSurrogate && ( isTrailSurrogate ( source [ offset16 ] ) ) ) { result -- ; } return result ;
|
public class Config { /** * 获取某个方法或者某个接口的判定为出现异常的次数
* 提供在配置中心和dubbo . properties两种途径配置
* 如果两个地方均有配置 , 配置中心的为准
* @ param interfaceConfig
* @ param methodConfig
* @ return */
public static int getBreakLimit ( StringBuffer interfaceConfig , StringBuffer methodConfig ) { } }
|
methodConfig . append ( ".break.limit" ) ; interfaceConfig . append ( ".break.limit" ) ; String breakLimitConf = ConfigUtils . getProperty ( methodConfig . toString ( ) , ConfigUtils . getProperty ( interfaceConfig . toString ( ) , ConfigUtils . getProperty ( "dubbo.reference.default.break.limit" , DEFAULT_BREAK_LIMIT ) ) ) ; return Integer . parseInt ( breakLimitConf ) ;
|
public class StreamUtils { /** * Attempts to fill the buffer by reading as many bytes as available . The
* returned number indicates how many bytes were read , which may be smaller
* than the buffer size if EOF was reached .
* @ param in
* input stream
* @ param buffer
* buffer to fill
* @ return the number of bytes read
* @ throws IOException */
static int readAllBytes ( InputStream in , byte [ ] buffer ) throws IOException { } }
|
int index = 0 ; while ( index < buffer . length ) { int read = in . read ( buffer , index , buffer . length - index ) ; if ( read == - 1 ) { return index ; } index += read ; } return index ;
|
public class CdnClient { /** * Set HTTPS with certain configuration .
* @ param request The request containing all of the options related to the update request .
* @ return Result of the setHTTPSAcceleration operation returned by the service . */
public SetHttpsConfigResponse setHttpsConfig ( SetHttpsConfigRequest request ) { } }
|
checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( request , HttpMethodName . PUT , DOMAIN , request . getDomain ( ) , "config" ) ; internalRequest . addParameter ( "https" , "" ) ; this . attachRequestToBody ( request , internalRequest ) ; return invokeHttpClient ( internalRequest , SetHttpsConfigResponse . class ) ;
|
public class MessageDetailGridScreen { /** * Make a sub - screen .
* @ return the new sub - screen . */
public BasePanel makeSubScreen ( ) { } }
|
Record recHeader = this . getHeaderRecord ( ) ; Record recMessageDetail = this . getMainRecord ( ) ; if ( recHeader instanceof Company ) // Profile
( ( ReferenceField ) recMessageDetail . getField ( MessageDetail . PERSON_ID ) ) . setReferenceRecord ( recHeader ) ; // Make sure this is hooked up
return new MessageDetailHeaderScreen ( null , this , null , ScreenConstants . DONT_DISPLAY_FIELD_DESC , null ) ;
|
public class PrcRefreshItemsInList { /** * < p > Update ItemInList with outdated item specifics list .
* It does it with [ N ] - records per transaction method . < / p >
* @ param < I > item type
* @ param < T > item specifics type
* @ param pReqVars additional param
* @ param pOutdGdSpList outdated GoodsSpecifics list
* @ param pSettingsAdd settings Add
* @ param pGoodsInListLuv goodsInListLuv
* @ param pTradingSettings trading settings
* @ param pI18nItemClass I18nItem Class
* @ param pItemType EShopItemType
* @ throws Exception - an exception */
public final < I extends AI18nName < ? , ? > , T extends AItemSpecifics < ? , ? > > void updateForItemSpecificsList ( final Map < String , Object > pReqVars , final List < T > pOutdGdSpList , final SettingsAdd pSettingsAdd , final GoodsInListLuv pGoodsInListLuv , final TradingSettings pTradingSettings , final Class < I > pI18nItemClass , final EShopItemType pItemType ) throws Exception { } }
|
if ( pOutdGdSpList . size ( ) == 0 ) { // Beige ORM may return empty list
return ; } @ SuppressWarnings ( "unchecked" ) List < IHasIdLongVersionName > itemsForSpecifics = ( List < IHasIdLongVersionName > ) pReqVars . get ( "itemsForSpecifics" ) ; pReqVars . remove ( "itemsForSpecifics" ) ; @ SuppressWarnings ( "unchecked" ) Set < Long > htmlTemplatesIds = ( Set < Long > ) pReqVars . get ( "htmlTemplatesIds" ) ; pReqVars . remove ( "htmlTemplatesIds" ) ; List < HtmlTemplate > htmlTemplates = null ; List < ItemInList > itemsInList = null ; List < I18nChooseableSpecifics > i18nChooseableSpecificsLst = null ; List < I18nSpecificsOfItemGroup > i18nSpecificsOfItemGroupLst = null ; List < I18nSpecificsOfItem > i18nSpecificsOfItemLst = null ; List < I > i18nItemLst = null ; List < I18nSpecificInList > i18nSpecificInListLst = null ; List < I18nUnitOfMeasure > i18nUomLst = null ; try { this . srvDatabase . setIsAutocommit ( false ) ; this . srvDatabase . setTransactionIsolation ( ISrvDatabase . TRANSACTION_READ_UNCOMMITTED ) ; this . srvDatabase . beginTransaction ( ) ; StringBuffer itemsIdsIn = new StringBuffer ( "(" ) ; boolean isFirst = true ; for ( IHasIdLongVersionName it : itemsForSpecifics ) { if ( isFirst ) { isFirst = false ; } else { itemsIdsIn . append ( ", " ) ; } itemsIdsIn . append ( it . getItsId ( ) . toString ( ) ) ; } itemsIdsIn . append ( ")" ) ; itemsInList = getSrvOrm ( ) . retrieveListWithConditions ( pReqVars , ItemInList . class , "where ITSTYPE=" + pItemType . ordinal ( ) + " and ITEMID in " + itemsIdsIn . toString ( ) ) ; if ( htmlTemplatesIds . size ( ) > 0 ) { StringBuffer whereStr = new StringBuffer ( "where ITSID in (" ) ; isFirst = true ; for ( Long id : htmlTemplatesIds ) { if ( isFirst ) { isFirst = false ; } else { whereStr . append ( ", " ) ; } whereStr . append ( id . toString ( ) ) ; } whereStr . append ( ")" ) ; htmlTemplates = getSrvOrm ( ) . retrieveListWithConditions ( pReqVars , HtmlTemplate . class , whereStr . toString ( ) ) ; } if ( pTradingSettings . getUseAdvancedI18n ( ) ) { i18nItemLst = retrieveI18nItem ( pReqVars , pI18nItemClass , itemsIdsIn . toString ( ) ) ; if ( i18nItemLst . size ( ) > 0 ) { i18nSpecificInListLst = getSrvOrm ( ) . retrieveListWithConditions ( pReqVars , I18nSpecificInList . class , "where ITSTYPE=" + pItemType . ordinal ( ) + " and ITEMID in " + itemsIdsIn . toString ( ) ) ; StringBuffer specGrIdIn = null ; StringBuffer specChIdIn = null ; StringBuffer specIdIn = new StringBuffer ( "(" ) ; isFirst = true ; boolean isFirstGr = true ; boolean isFirstCh = true ; for ( AItemSpecifics < ? , ? > gs : pOutdGdSpList ) { if ( isFirst ) { isFirst = false ; } else { specIdIn . append ( ", " ) ; } specIdIn . append ( gs . getSpecifics ( ) . getItsId ( ) . toString ( ) ) ; if ( gs . getSpecifics ( ) . getItsGroop ( ) != null ) { if ( isFirstGr ) { specGrIdIn = new StringBuffer ( "(" ) ; isFirstGr = false ; } else { specGrIdIn . append ( ", " ) ; } specGrIdIn . append ( gs . getSpecifics ( ) . getItsGroop ( ) . getItsId ( ) . toString ( ) ) ; } if ( gs . getSpecifics ( ) . getItsType ( ) . equals ( ESpecificsItemType . CHOOSEABLE_SPECIFICS ) ) { if ( isFirstCh ) { specChIdIn = new StringBuffer ( "(" ) ; isFirstCh = false ; } else { specChIdIn . append ( ", " ) ; } specChIdIn . append ( gs . getLongValue1 ( ) . toString ( ) ) ; } } specIdIn . append ( ")" ) ; if ( specGrIdIn != null ) { specGrIdIn . append ( ")" ) ; } if ( specChIdIn != null ) { specChIdIn . append ( ")" ) ; } pReqVars . put ( "I18nSpecificsOfItemhasNamedeepLevel" , 1 ) ; pReqVars . put ( "I18nSpecificsOfItemlangdeepLevel" , 1 ) ; i18nSpecificsOfItemLst = getSrvOrm ( ) . retrieveListWithConditions ( pReqVars , I18nSpecificsOfItem . class , "where HASNAME in " + specIdIn . toString ( ) ) ; pReqVars . remove ( "I18nSpecificsOfItemhasNamedeepLevel" ) ; pReqVars . remove ( "I18nSpecificsOfItemlangdeepLevel" ) ; pReqVars . put ( "I18nUnitOfMeasurehasNamedeepLevel" , 1 ) ; pReqVars . put ( "I18nUnitOfMeasurelangdeepLevel" , 1 ) ; i18nUomLst = getSrvOrm ( ) . retrieveList ( pReqVars , I18nUnitOfMeasure . class ) ; pReqVars . remove ( "I18nUnitOfMeasurehasNamedeepLevel" ) ; pReqVars . remove ( "I18nUnitOfMeasurelangdeepLevel" ) ; if ( specGrIdIn != null ) { pReqVars . put ( "I18nSpecificsOfItemGrouphasNamedeepLevel" , 1 ) ; pReqVars . put ( "I18nSpecificsOfItemGrouplangdeepLevel" , 1 ) ; i18nSpecificsOfItemGroupLst = getSrvOrm ( ) . retrieveListWithConditions ( pReqVars , I18nSpecificsOfItemGroup . class , "where HASNAME in " + specGrIdIn . toString ( ) ) ; pReqVars . remove ( "I18nSpecificsOfItemGrouphasNamedeepLevel" ) ; pReqVars . remove ( "I18nSpecificsOfItemGrouplangdeepLevel" ) ; } if ( specChIdIn != null ) { pReqVars . put ( "I18nChooseableSpecificshasNamedeepLevel" , 1 ) ; pReqVars . put ( "I18nChooseableSpecificslangdeepLevel" , 1 ) ; i18nChooseableSpecificsLst = getSrvOrm ( ) . retrieveListWithConditions ( pReqVars , I18nChooseableSpecifics . class , "where HASNAME in " + specChIdIn . toString ( ) ) ; pReqVars . remove ( "I18nChooseableSpecificshasNamedeepLevel" ) ; pReqVars . remove ( "I18nChooseableSpecificslangdeepLevel" ) ; } } } } catch ( Exception ex ) { if ( ! this . srvDatabase . getIsAutocommit ( ) ) { this . srvDatabase . rollBackTransaction ( ) ; } throw ex ; } finally { this . srvDatabase . releaseResources ( ) ; } if ( htmlTemplates != null && htmlTemplates . size ( ) > 0 ) { for ( AItemSpecifics < ? , ? > gs : pOutdGdSpList ) { if ( gs . getSpecifics ( ) . getTempHtml ( ) != null ) { gs . getSpecifics ( ) . setTempHtml ( findTemplate ( htmlTemplates , gs . getSpecifics ( ) . getTempHtml ( ) . getItsId ( ) ) ) ; } if ( gs . getSpecifics ( ) . getItsGroop ( ) != null ) { if ( gs . getSpecifics ( ) . getItsGroop ( ) . getTemplateStart ( ) != null ) { gs . getSpecifics ( ) . getItsGroop ( ) . setTemplateStart ( findTemplate ( htmlTemplates , gs . getSpecifics ( ) . getItsGroop ( ) . getTemplateStart ( ) . getItsId ( ) ) ) ; } if ( gs . getSpecifics ( ) . getItsGroop ( ) . getTemplateEnd ( ) != null ) { gs . getSpecifics ( ) . getItsGroop ( ) . setTemplateEnd ( findTemplate ( htmlTemplates , gs . getSpecifics ( ) . getItsGroop ( ) . getTemplateEnd ( ) . getItsId ( ) ) ) ; } if ( gs . getSpecifics ( ) . getItsGroop ( ) . getTemplateStart ( ) != null ) { gs . getSpecifics ( ) . getItsGroop ( ) . setTemplateDetail ( findTemplate ( htmlTemplates , gs . getSpecifics ( ) . getItsGroop ( ) . getTemplateDetail ( ) . getItsId ( ) ) ) ; } } } } int steps = itemsForSpecifics . size ( ) / pSettingsAdd . getRecordsPerTransaction ( ) ; int currentStep = 1 ; Long lastUpdatedVersion = null ; do { try { this . srvDatabase . setIsAutocommit ( false ) ; this . srvDatabase . setTransactionIsolation ( ISrvDatabase . TRANSACTION_READ_UNCOMMITTED ) ; this . srvDatabase . beginTransaction ( ) ; int stepLen = Math . min ( itemsForSpecifics . size ( ) , currentStep * pSettingsAdd . getRecordsPerTransaction ( ) ) ; for ( int i = ( currentStep - 1 ) * pSettingsAdd . getRecordsPerTransaction ( ) ; i < stepLen ; i ++ ) { IHasIdLongVersionName item = itemsForSpecifics . get ( i ) ; ItemInList itemInList = findItemInListFor ( itemsInList , item . getItsId ( ) , pItemType ) ; if ( itemInList == null ) { itemInList = createItemInList ( pReqVars , item ) ; } int j = findFirstIdxFor ( pOutdGdSpList , item ) ; SpecificsOfItemGroup specificsOfItemGroupWas = null ; // reset any way :
itemInList . setItsName ( item . getItsName ( ) ) ; itemInList . setDetailsMethod ( null ) ; itemInList . setImageUrl ( null ) ; // i18n :
List < I18nSpecificInList > i18nSpInLsLstFg = null ; if ( i18nItemLst != null ) { for ( I i18nItem : i18nItemLst ) { if ( i18nSpInLsLstFg == null ) { i18nSpInLsLstFg = new ArrayList < I18nSpecificInList > ( ) ; } if ( i18nItem . getHasName ( ) . getItsId ( ) . equals ( item . getItsId ( ) ) ) { I18nSpecificInList i18nspInLs = findI18nSpecificInListFor ( i18nSpecificInListLst , item , pItemType , i18nItem . getLang ( ) ) ; if ( i18nspInLs == null ) { i18nspInLs = new I18nSpecificInList ( ) ; i18nspInLs . setIsNew ( true ) ; i18nspInLs . setItsType ( pItemType ) ; i18nspInLs . setItemId ( item . getItsId ( ) ) ; i18nspInLs . setLang ( i18nItem . getLang ( ) ) ; } i18nspInLs . setItsName ( i18nItem . getItsName ( ) ) ; i18nSpInLsLstFg . add ( i18nspInLs ) ; } } } if ( pSettingsAdd . getSpecHtmlStart ( ) != null ) { itemInList . setSpecificInList ( pSettingsAdd . getSpecHtmlStart ( ) ) ; if ( i18nSpInLsLstFg != null ) { for ( I18nSpecificInList i18nspInLs : i18nSpInLsLstFg ) { i18nspInLs . setSpecificInList ( pSettingsAdd . getSpecHtmlStart ( ) ) ; } } } else { itemInList . setSpecificInList ( "" ) ; if ( i18nSpInLsLstFg != null ) { for ( I18nSpecificInList i18nspInLs : i18nSpInLsLstFg ) { i18nspInLs . setSpecificInList ( "" ) ; } } } boolean wasGrStart = false ; do { if ( pOutdGdSpList . get ( j ) . getSpecifics ( ) . getIsShowInList ( ) ) { if ( pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsType ( ) . equals ( ESpecificsItemType . IMAGE ) ) { itemInList . setImageUrl ( pOutdGdSpList . get ( j ) . getStringValue1 ( ) ) ; } else { // build ItemInList . specificInList :
if ( pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) == null || specificsOfItemGroupWas == null || ! pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) . getItsId ( ) . equals ( specificsOfItemGroupWas . getItsId ( ) ) ) { if ( wasGrStart ) { if ( pSettingsAdd . getSpecGrSeparator ( ) != null && pSettingsAdd . getSpecGrHtmlEnd ( ) != null ) { itemInList . setSpecificInList ( itemInList . getSpecificInList ( ) + pSettingsAdd . getSpecGrHtmlEnd ( ) + pSettingsAdd . getSpecGrSeparator ( ) ) ; } else if ( pSettingsAdd . getSpecGrHtmlEnd ( ) != null ) { itemInList . setSpecificInList ( itemInList . getSpecificInList ( ) + pSettingsAdd . getSpecGrHtmlEnd ( ) ) ; } else if ( pSettingsAdd . getSpecGrSeparator ( ) != null ) { itemInList . setSpecificInList ( itemInList . getSpecificInList ( ) + pSettingsAdd . getSpecGrSeparator ( ) ) ; } } wasGrStart = true ; if ( pSettingsAdd . getSpecGrHtmlStart ( ) != null ) { itemInList . setSpecificInList ( itemInList . getSpecificInList ( ) + pSettingsAdd . getSpecGrHtmlStart ( ) ) ; if ( i18nSpInLsLstFg != null ) { for ( I18nSpecificInList i18nspInLs : i18nSpInLsLstFg ) { i18nspInLs . setSpecificInList ( i18nspInLs . getSpecificInList ( ) + pSettingsAdd . getSpecGrHtmlStart ( ) ) ; } } } if ( pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) != null && pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) . getTemplateStart ( ) != null ) { String grst = pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) . getTemplateStart ( ) . getHtmlTemplate ( ) . replace ( ":SPECGRNM" , pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) . getItsName ( ) ) ; itemInList . setSpecificInList ( itemInList . getSpecificInList ( ) + grst ) ; if ( i18nSpInLsLstFg != null ) { for ( I18nSpecificInList i18nspInLs : i18nSpInLsLstFg ) { String gn = findI18nSpecGrName ( i18nSpecificsOfItemGroupLst , pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) , i18nspInLs . getLang ( ) ) ; grst = pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) . getTemplateStart ( ) . getHtmlTemplate ( ) . replace ( ":SPECGRNM" , gn ) ; i18nspInLs . setSpecificInList ( i18nspInLs . getSpecificInList ( ) + grst ) ; } } } } updateGoodsSpecificsInList ( pReqVars , pSettingsAdd , pOutdGdSpList . get ( j ) , itemInList , specificsOfItemGroupWas , i18nSpInLsLstFg , i18nSpecificsOfItemLst , i18nChooseableSpecificsLst , i18nUomLst ) ; specificsOfItemGroupWas = pOutdGdSpList . get ( j ) . getSpecifics ( ) . getItsGroop ( ) ; } } else { itemInList . setDetailsMethod ( 1 ) ; } j ++ ; } while ( j < pOutdGdSpList . size ( ) && pOutdGdSpList . get ( j ) . getItem ( ) . getItsId ( ) . equals ( item . getItsId ( ) ) ) ; if ( pSettingsAdd . getSpecGrHtmlEnd ( ) != null ) { itemInList . setSpecificInList ( itemInList . getSpecificInList ( ) + pSettingsAdd . getSpecGrHtmlEnd ( ) ) ; if ( i18nSpInLsLstFg != null ) { for ( I18nSpecificInList i18nspInLs : i18nSpInLsLstFg ) { i18nspInLs . setSpecificInList ( i18nspInLs . getSpecificInList ( ) + pSettingsAdd . getSpecGrHtmlEnd ( ) ) ; } } } if ( pSettingsAdd . getSpecHtmlEnd ( ) != null ) { itemInList . setSpecificInList ( itemInList . getSpecificInList ( ) + pSettingsAdd . getSpecHtmlEnd ( ) ) ; if ( i18nSpInLsLstFg != null ) { for ( I18nSpecificInList i18nspInLs : i18nSpInLsLstFg ) { i18nspInLs . setSpecificInList ( i18nspInLs . getSpecificInList ( ) + pSettingsAdd . getSpecHtmlEnd ( ) ) ; } } } if ( itemInList . getIsNew ( ) ) { getSrvOrm ( ) . insertEntity ( pReqVars , itemInList ) ; } else { getSrvOrm ( ) . updateEntity ( pReqVars , itemInList ) ; } if ( i18nSpInLsLstFg != null ) { for ( I18nSpecificInList i18nspInLs : i18nSpInLsLstFg ) { if ( i18nspInLs . getIsNew ( ) ) { getSrvOrm ( ) . insertEntity ( pReqVars , i18nspInLs ) ; } else { getSrvOrm ( ) . updateEntity ( pReqVars , i18nspInLs ) ; } } } // item holds item - specifics version
lastUpdatedVersion = item . getItsVersion ( ) ; } if ( pItemType . equals ( EShopItemType . GOODS ) ) { pGoodsInListLuv . setGoodsSpecificLuv ( lastUpdatedVersion ) ; } else if ( pItemType . equals ( EShopItemType . SERVICE ) ) { pGoodsInListLuv . setServiceSpecificLuv ( lastUpdatedVersion ) ; } else if ( pItemType . equals ( EShopItemType . SEGOODS ) ) { pGoodsInListLuv . setSeGoodSpecificLuv ( lastUpdatedVersion ) ; } else if ( pItemType . equals ( EShopItemType . SESERVICE ) ) { pGoodsInListLuv . setSeServiceSpecificLuv ( lastUpdatedVersion ) ; } else { throw new Exception ( "NYI for " + pItemType ) ; } getSrvOrm ( ) . updateEntity ( pReqVars , pGoodsInListLuv ) ; this . srvDatabase . commitTransaction ( ) ; } catch ( Exception ex ) { if ( ! this . srvDatabase . getIsAutocommit ( ) ) { this . srvDatabase . rollBackTransaction ( ) ; } throw ex ; } finally { this . srvDatabase . releaseResources ( ) ; } } while ( currentStep ++ < steps ) ;
|
public class NumberUtil { /** * 以无符号字节数组的形式返回传入值 。
* @ param value 需要转换的值
* @ return 无符号bytes
* @ since 4.5.0 */
public static byte [ ] toUnsignedByteArray ( BigInteger value ) { } }
|
byte [ ] bytes = value . toByteArray ( ) ; if ( bytes [ 0 ] == 0 ) { byte [ ] tmp = new byte [ bytes . length - 1 ] ; System . arraycopy ( bytes , 1 , tmp , 0 , tmp . length ) ; return tmp ; } return bytes ;
|
public class ClassFile { /** * Returns a descriptor to fields at index .
* @ param index
* @ return */
public String getFieldDescription ( int index ) { } }
|
ConstantInfo constantInfo = getConstantInfo ( index ) ; if ( constantInfo instanceof Fieldref ) { Fieldref fr = ( Fieldref ) getConstantInfo ( index ) ; int nt = fr . getName_and_type_index ( ) ; NameAndType nat = ( NameAndType ) getConstantInfo ( nt ) ; int ni = nat . getName_index ( ) ; int di = nat . getDescriptor_index ( ) ; return getString ( ni ) + " " + getString ( di ) ; } return "unknown " + constantInfo ;
|
public class CmsSearch { /** * Sets the search root list . < p >
* Only resources that are sub - resources of one of the search roots
* are included in the search result . < p >
* The search roots set here are used < i > in addition to < / i > the current site root
* of the user performing the search . < p >
* By default , the search roots contain only one entry with an empty string . < p >
* @ param searchRoots the search roots to set */
public void setSearchRoots ( String [ ] searchRoots ) { } }
|
List < String > l = new ArrayList < String > ( Arrays . asList ( searchRoots ) ) ; m_parameters . setRoots ( l ) ; resetLastResult ( ) ;
|
public class Check { /** * Ensures that a passed { @ code byte } is greater than another { @ code byte } .
* @ param expected
* Expected value
* @ param check
* Comparable to be checked
* @ param message
* an error message describing why the comparable must be greater than a value ( will be passed to
* { @ code IllegalNotGreaterThanException } )
* @ return the passed { @ code Comparable } argument { @ code check }
* @ throws IllegalNotGreaterThanException
* if the argument value { @ code check } is not greater than value { @ code expected } */
@ ArgumentsChecked @ Throws ( IllegalNotGreaterThanException . class ) public static byte greaterThan ( final byte expected , final byte check , @ Nonnull final String message ) { } }
|
if ( expected >= check ) { throw new IllegalNotGreaterThanException ( message , check ) ; } return check ;
|
public class DefaultTaskRouter { /** * TaskRouter implementation */
public void enqueue ( TargetTransportPort port , Command command ) { } }
|
long lun = command . getNexus ( ) . getLogicalUnitNumber ( ) ; if ( lun < 0 ) { try { Task task = this . taskFactory . getInstance ( port , command ) ; assert task != null : "improper task factory implementation returned null task" ; this . targetTaskSet . offer ( task ) ; // non - blocking , sends any errors to transport port
if ( _logger . isDebugEnabled ( ) ) _logger . debug ( "successfully enqueued target command with TaskRouter: " + command ) ; } catch ( IllegalRequestException e ) { _logger . error ( "error when parsing command: " + e ) ; port . writeResponse ( command . getNexus ( ) , command . getCommandReferenceNumber ( ) , Status . CHECK_CONDITION , ByteBuffer . wrap ( e . encode ( ) ) ) ; } } else if ( logicalUnitMap . containsKey ( lun ) ) { logicalUnitMap . get ( lun ) . enqueue ( port , command ) ; if ( _logger . isDebugEnabled ( ) ) _logger . debug ( "successfully enqueued command to logical unit with TaskRouter: " + command ) ; } else { port . writeResponse ( command . getNexus ( ) , command . getCommandReferenceNumber ( ) , Status . CHECK_CONDITION , ByteBuffer . wrap ( ( new LogicalUnitNotSupportedException ( ) ) . encode ( ) ) ) ; }
|
public class AmazonCodeDeployClient { /** * Gets information about a deployment configuration .
* @ param getDeploymentConfigRequest
* Represents the input of a GetDeploymentConfig operation .
* @ return Result of the GetDeploymentConfig operation returned by the service .
* @ throws InvalidDeploymentConfigNameException
* The deployment configuration name was specified in an invalid format .
* @ throws DeploymentConfigNameRequiredException
* The deployment configuration name was not specified .
* @ throws DeploymentConfigDoesNotExistException
* The deployment configuration does not exist with the IAM user or AWS account .
* @ throws InvalidComputePlatformException
* The computePlatform is invalid . The computePlatform should be < code > Lambda < / code > or < code > Server < / code > .
* @ sample AmazonCodeDeploy . GetDeploymentConfig
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / codedeploy - 2014-10-06 / GetDeploymentConfig " target = " _ top " > AWS
* API Documentation < / a > */
@ Override public GetDeploymentConfigResult getDeploymentConfig ( GetDeploymentConfigRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeGetDeploymentConfig ( request ) ;
|
public class Crc64 { /** * Calculates CRC from a char buffer */
public static long generate ( long crc , byte [ ] buffer , int offset , int len ) { } }
|
final long [ ] crcTable = CRC_TABLE ; for ( int i = 0 ; i < len ; i ++ ) { final int index = ( ( int ) crc ^ buffer [ offset + i ] ) & 0xff ; crc = ( crc >>> 8 ) ^ crcTable [ index ] ; } return crc ;
|
public class AuthAPI { /** * Creates a sign up request with the given credentials and database connection .
* i . e . :
* < pre >
* { @ code
* AuthAPI auth = new AuthAPI ( " me . auth0 . com " , " B3c6RYhk1v9SbIJcRIOwu62gIUGsnze " , " 2679NfkaBn62e6w5E8zNEzjr - yWfkaBne " ) ;
* try {
* Map < String , String > fields = new HashMap < String , String > ( ) ;
* fields . put ( " age " , " 25 ) ;
* fields . put ( " city " , " Buenos Aires " ) ;
* auth . signUp ( " me @ auth0 . com " , " topsecret " , " db - connection " )
* . setCustomFields ( fields )
* . execute ( ) ;
* } catch ( Auth0Exception e ) {
* / / Something happened
* < / pre >
* @ param email the desired user ' s email .
* @ param password the desired user ' s password .
* @ param connection the database connection where the user is going to be created .
* @ return a Request to configure and execute . */
public SignUpRequest signUp ( String email , String password , String connection ) { } }
|
Asserts . assertNotNull ( email , "email" ) ; Asserts . assertNotNull ( password , "password" ) ; Asserts . assertNotNull ( connection , "connection" ) ; String url = baseUrl . newBuilder ( ) . addPathSegment ( PATH_DBCONNECTIONS ) . addPathSegment ( "signup" ) . build ( ) . toString ( ) ; CreateUserRequest request = new CreateUserRequest ( client , url ) ; request . addParameter ( KEY_CLIENT_ID , clientId ) ; request . addParameter ( KEY_EMAIL , email ) ; request . addParameter ( KEY_PASSWORD , password ) ; request . addParameter ( KEY_CONNECTION , connection ) ; return request ;
|
public class StrTokenizer { /** * Sets the field delimiter matcher .
* The delimiter is used to separate one token from another .
* @ param delim the delimiter matcher to use
* @ return this , to enable chaining */
public StrTokenizer setDelimiterMatcher ( final StrMatcher delim ) { } }
|
if ( delim == null ) { this . delimMatcher = StrMatcher . noneMatcher ( ) ; } else { this . delimMatcher = delim ; } return this ;
|
public class ContactField { /** * Get the contact type field in the same record as this contact field .
* @ return The contact type field . */
public ContactTypeField getContactTypeField ( ) { } }
|
BaseField field = this . getRecord ( ) . getField ( "ContactTypeID" ) ; if ( field instanceof ContactTypeField ) return ( ContactTypeField ) field ; return null ; // Never
|
public class CheckConsentRequiredAction { /** * Determine consent event string .
* @ param requestContext the request context
* @ return the string */
protected String determineConsentEvent ( final RequestContext requestContext ) { } }
|
val webService = WebUtils . getService ( requestContext ) ; val service = this . authenticationRequestServiceSelectionStrategies . resolveService ( webService ) ; if ( service == null ) { return null ; } val registeredService = getRegisteredServiceForConsent ( requestContext , service ) ; val authentication = WebUtils . getAuthentication ( requestContext ) ; if ( authentication == null ) { return null ; } return isConsentRequired ( service , registeredService , authentication , requestContext ) ;
|
public class Polyline { /** * Internal method used to ensure that the infowindow will have a default position in all cases ,
* so that the user can call showInfoWindow even if no tap occured before .
* Currently , set the position on the " middle " point of the polyline . */
protected void setDefaultInfoWindowLocation ( ) { } }
|
int s = mOriginalPoints . size ( ) ; if ( s > 0 ) mInfoWindowLocation = mOriginalPoints . get ( s / 2 ) ; else mInfoWindowLocation = new GeoPoint ( 0.0 , 0.0 ) ;
|
public class VariantCustom { /** * Set the current message that this Variant has to scan
* @ param msg the message object ( remember Response is not set ) */
@ Override public void setMessage ( HttpMessage msg ) { } }
|
try { if ( script != null ) { script . parseParameters ( this , msg ) ; } } catch ( Exception e ) { // Catch Exception instead of ScriptException because script engine implementations might
// throw other exceptions on script errors ( e . g . jdk . nashorn . internal . runtime . ECMAException )
extension . handleScriptException ( wrapper , e ) ; }
|
public class ToXMLStream { /** * Receive notivication of a entityReference .
* @ param name The name of the entity .
* @ throws org . xml . sax . SAXException */
public void entityReference ( String name ) throws org . xml . sax . SAXException { } }
|
if ( m_elemContext . m_startTagOpen ) { closeStartTag ( ) ; m_elemContext . m_startTagOpen = false ; } try { if ( shouldIndent ( ) ) indent ( ) ; final java . io . Writer writer = m_writer ; writer . write ( '&' ) ; writer . write ( name ) ; writer . write ( ';' ) ; } catch ( IOException e ) { throw new SAXException ( e ) ; } if ( m_tracer != null ) super . fireEntityReference ( name ) ;
|
public class UrlValidator { /** * ( non - Javadoc )
* @ see
* com . fs . commons . desktop . validation . Validator # validate ( com . fs . commons . desktop .
* validation . Problems , java . lang . String , java . lang . Object ) */
@ Override public boolean validate ( final Problems problems , final String compName , final String model ) { } }
|
try { final URL url = new URL ( model ) ; // java . net . url does not require US - ASCII host names ,
// but the spec does
final String host = url . getHost ( ) ; if ( ! "" . equals ( host ) ) { // NOI18N
return new ValidHostNameOrIPValidator ( true ) . validate ( problems , compName , host ) ; } final String protocol = url . getProtocol ( ) ; if ( "mailto" . equals ( protocol ) ) { // NOI18N
String emailAddress = url . toString ( ) . substring ( "mailto:" . length ( ) ) ; // NOI18N
emailAddress = emailAddress == null ? "" : emailAddress ; return new EmailAddressValidator ( ) . validate ( problems , compName , emailAddress ) ; } return true ; } catch ( final MalformedURLException e ) { final String problem = ValidationBundle . getMessage ( UrlValidator . class , "URL_NOT_VALID" , model ) ; // NOI18N
problems . add ( problem ) ; return false ; }
|
public class VirtualConnectionImpl { /** * @ see VirtualConnection # requestPermissionToRead ( ) */
@ Override public boolean requestPermissionToRead ( ) { } }
|
boolean rc = false ; synchronized ( this ) { if ( ( currentState & READ_NOT_ALLOWED_MASK ) == 0 ) { currentState = ( currentState | READ_PENDING ) & READ_PENDING_CLEAR_OUT ; rc = true ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "requestPermissionToRead returning " + rc ) ; } return rc ;
|
public class FSImage { /** * Check if remote image / journal storage is in allowed state . */
private void checkAllowedNonFileState ( StorageState curState , Object name ) throws IOException { } }
|
switch ( curState ) { case NON_EXISTENT : case NOT_FORMATTED : case NORMAL : break ; default : throwIOException ( "ImageManager bad state: " + curState + " for: " + name . toString ( ) ) ; }
|
public class XLogPDescriptor { /** * Gets the oxygenCount attribute of the XLogPDescriptor object .
* @ param ac Description of the Parameter
* @ param atom Description of the Parameter
* @ return The carbonsCount value */
private int getOxygenCount ( IAtomContainer ac , IAtom atom ) { } }
|
List < IAtom > neighbours = ac . getConnectedAtomsList ( atom ) ; int ocounter = 0 ; for ( IAtom neighbour : neighbours ) { if ( neighbour . getSymbol ( ) . equals ( "O" ) ) { if ( ! neighbour . getFlag ( CDKConstants . ISAROMATIC ) ) { ocounter += 1 ; } } } return ocounter ;
|
public class AbstractRenderer { /** * The main method of the renderer , that uses each of the generators
* to create a different set of { @ link IRenderingElement } s grouped
* together into a tree .
* @ param object the object of type T to draw
* @ return the diagram as a tree of { @ link IRenderingElement } s */
public IRenderingElement generateDiagram ( T object ) { } }
|
ElementGroup diagram = new ElementGroup ( ) ; for ( IGenerator < T > generator : this . generators ) { diagram . add ( generator . generate ( object , this . rendererModel ) ) ; } return diagram ;
|
public class PathCorridor { /** * Attempts to optimize the path using a local area search . ( Partial replanning . )
* Inaccurate locomotion or dynamic obstacle avoidance can force the agent position significantly outside the
* original corridor . Over time this can result in the formation of a non - optimal corridor . This function will use a
* local area path search to try to re - optimize the corridor .
* The more inaccurate the agent movement , the more beneficial this function becomes . Simply adjust the frequency of
* the call to match the needs to the agent .
* @ param navquery
* The query object used to build the corridor .
* @ param filter
* The filter to apply to the operation . */
boolean optimizePathTopology ( NavMeshQuery navquery , QueryFilter filter ) { } }
|
if ( m_path . size ( ) < 3 ) { return false ; } final int MAX_ITER = 32 ; navquery . initSlicedFindPath ( m_path . get ( 0 ) , m_path . get ( m_path . size ( ) - 1 ) , m_pos , m_target , filter , 0 ) ; navquery . updateSlicedFindPath ( MAX_ITER ) ; Result < List < Long > > fpr = navquery . finalizeSlicedFindPathPartial ( m_path ) ; if ( fpr . succeeded ( ) && fpr . result . size ( ) > 0 ) { m_path = mergeCorridorStartShortcut ( m_path , fpr . result ) ; return true ; } return false ;
|
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getGSPS ( ) { } }
|
if ( gspsEClass == null ) { gspsEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 483 ) ; } return gspsEClass ;
|
public class HpelSystemStream { /** * Terminate the current line by writing the line separator string . The line
* separator string is defined by the system property
* < code > line . separator < / code > , and is not necessarily a single newline
* character ( < code > ' \ n ' < / code > ) . */
public void println ( ) { } }
|
if ( ivSuppress == true ) return ; String writeData = null ; LogRecord sse = null ; // Add data to cache , then forward on to logging subsystem . Must not
// hold the object synchronizer on the dispatch .
{ sse = getTraceData ( writeData ) ; dispatchEvent ( sse ) ; } // / / Write the data to the PrintStream this stream is wrapping .
// if ( ivFormatted = = false )
// ivStream . println ( ) ;
// else {
// / / Write data in formatted form . If a write is pending a header has
// / / already been written .
// / / Otherwise new up an event and write it , which also writes the
// / / header .
// synchronized ( this ) {
// if ( ivWritePending )
// ivStream . println ( ) ;
// else {
// sse = createEvent ( writeData ) ;
// sse . writeSelfToStream ( ivStream , ivFormatType , true , ivBuffer ,
// ivFormatter , ivDate , ivFieldPos ) ;
// ivWritePending = false ;
|
public class BTCTradeAccountService { /** * { @ inheritDoc } */
@ Override public String requestDepositAddress ( Currency currency , String ... args ) throws IOException { } }
|
return BTCTradeAdapters . adaptDepositAddress ( getBTCTradeWallet ( ) ) ;
|
public class ExecutionResult { /** * Creates a new ExecutionResult by adding the defined ' event ' to the ones on the current instance .
* @ param eventType event to add
* @ return new { @ link ExecutionResult } with event added */
public ExecutionResult addEvent ( HystrixEventType eventType ) { } }
|
return new ExecutionResult ( eventCounts . plus ( eventType ) , startTimestamp , executionLatency , userThreadLatency , failedExecutionException , executionException , executionOccurred , isExecutedInThread , collapserKey ) ;
|
public class BigFloat { /** * Returns the { @ link BigFloat } that is < code > cosh ( x ) < / code > .
* @ param x the value
* @ return the resulting { @ link BigFloat }
* @ see BigDecimalMath # cosh ( BigDecimal , MathContext ) */
public static BigFloat cosh ( BigFloat x ) { } }
|
if ( x . isNaN ( ) ) return NaN ; if ( x . isInfinity ( ) ) return POSITIVE_INFINITY ; if ( x . isZero ( ) ) return x . context . ONE ; return x . context . valueOf ( BigDecimalMath . cosh ( x . value , x . context . mathContext ) ) ;
|
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getRenderingIntentReserved2 ( ) { } }
|
if ( renderingIntentReserved2EEnum == null ) { renderingIntentReserved2EEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 185 ) ; } return renderingIntentReserved2EEnum ;
|
public class CmsXMLSearchConfigurationParser { /** * Parses a single query facet item with query and label .
* @ param prefix path to the query facet item ( with trailing ' / ' ) .
* @ return the query facet item . */
private I_CmsFacetQueryItem parseFacetQueryItem ( final String prefix ) { } }
|
I_CmsXmlContentValue query = m_xml . getValue ( prefix + XML_ELEMENT_QUERY_FACET_QUERY_QUERY , m_locale ) ; if ( null != query ) { String queryString = query . getStringValue ( null ) ; I_CmsXmlContentValue label = m_xml . getValue ( prefix + XML_ELEMENT_QUERY_FACET_QUERY_LABEL , m_locale ) ; String labelString = null != label ? label . getStringValue ( null ) : null ; return new CmsFacetQueryItem ( queryString , labelString ) ; } else { return null ; }
|
public class RsPrint { /** * Print it into a writer .
* @ param writer Writer to print into
* @ throws IOException If fails
* @ since 2.0 */
public void printHead ( final Writer writer ) throws IOException { } }
|
final String eol = "\r\n" ; int pos = 0 ; try { for ( final String line : this . head ( ) ) { if ( pos == 0 && ! RsPrint . FIRST . matcher ( line ) . matches ( ) ) { throw new IllegalArgumentException ( String . format ( // @ checkstyle LineLength ( 1 line )
"first line of HTTP response \"%s\" doesn't match \"%s\" regular expression, but it should, according to RFC 7230" , line , RsPrint . FIRST ) ) ; } if ( pos > 0 && ! RsPrint . OTHERS . matcher ( line ) . matches ( ) ) { throw new IllegalArgumentException ( String . format ( // @ checkstyle LineLength ( 1 line )
"header line #%d of HTTP response \"%s\" doesn't match \"%s\" regular expression, but it should, according to RFC 7230" , pos + 1 , line , RsPrint . OTHERS ) ) ; } writer . append ( line ) ; writer . append ( eol ) ; ++ pos ; } writer . append ( eol ) ; } finally { writer . flush ( ) ; }
|
public class DataProviderContext { /** * Adds the first data providers to the validator .
* @ param dataProviders Data providers to be added .
* @ param < D > Type of data to be validated . < br > It can be , for instance ,
* the type of data handled by a component , or the
* type of the component itself .
* @ return Rule context allowing to add data providers and rules , but not triggers . */
public < D > RuleContext < D > read ( final DataProvider < D > ... dataProviders ) { } }
|
final List < DataProvider < D > > registeredDataProviders = new ArrayList < DataProvider < D > > ( ) ; if ( dataProviders != null ) { Collections . addAll ( registeredDataProviders , dataProviders ) ; } return new RuleContext < D > ( registeredTriggers , registeredDataProviders ) ;
|
public class CPDefinitionOptionValueRelLocalServiceBaseImpl { /** * Returns a range of cp definition option value rels matching the UUID and company .
* @ param uuid the UUID of the cp definition option value rels
* @ param companyId the primary key of the company
* @ param start the lower bound of the range of cp definition option value rels
* @ param end the upper bound of the range of cp definition option value rels ( not inclusive )
* @ param orderByComparator the comparator to order the results by ( optionally < code > null < / code > )
* @ return the range of matching cp definition option value rels , or an empty list if no matches were found */
@ Override public List < CPDefinitionOptionValueRel > getCPDefinitionOptionValueRelsByUuidAndCompanyId ( String uuid , long companyId , int start , int end , OrderByComparator < CPDefinitionOptionValueRel > orderByComparator ) { } }
|
return cpDefinitionOptionValueRelPersistence . findByUuid_C ( uuid , companyId , start , end , orderByComparator ) ;
|
public class AvroUtils { /** * Copies the input { @ link org . apache . avro . Schema } but changes the schema namespace .
* @ param schema { @ link org . apache . avro . Schema } to copy .
* @ param namespaceOverride namespace for the copied { @ link org . apache . avro . Schema } .
* @ return A { @ link org . apache . avro . Schema } that is a copy of schema , but has the new namespace . */
public static Schema switchNamespace ( Schema schema , Map < String , String > namespaceOverride ) { } }
|
Schema newSchema ; String newNamespace = StringUtils . EMPTY ; // Process all Schema Types
// ( Primitives are simply cloned )
switch ( schema . getType ( ) ) { case ENUM : newNamespace = namespaceOverride . containsKey ( schema . getNamespace ( ) ) ? namespaceOverride . get ( schema . getNamespace ( ) ) : schema . getNamespace ( ) ; newSchema = Schema . createEnum ( schema . getName ( ) , schema . getDoc ( ) , newNamespace , schema . getEnumSymbols ( ) ) ; break ; case FIXED : newNamespace = namespaceOverride . containsKey ( schema . getNamespace ( ) ) ? namespaceOverride . get ( schema . getNamespace ( ) ) : schema . getNamespace ( ) ; newSchema = Schema . createFixed ( schema . getName ( ) , schema . getDoc ( ) , newNamespace , schema . getFixedSize ( ) ) ; break ; case MAP : newSchema = Schema . createMap ( switchNamespace ( schema . getValueType ( ) , namespaceOverride ) ) ; break ; case RECORD : newNamespace = namespaceOverride . containsKey ( schema . getNamespace ( ) ) ? namespaceOverride . get ( schema . getNamespace ( ) ) : schema . getNamespace ( ) ; List < Schema . Field > newFields = new ArrayList < > ( ) ; if ( schema . getFields ( ) . size ( ) > 0 ) { for ( Schema . Field oldField : schema . getFields ( ) ) { Field newField = new Field ( oldField . name ( ) , switchNamespace ( oldField . schema ( ) , namespaceOverride ) , oldField . doc ( ) , oldField . defaultValue ( ) , oldField . order ( ) ) ; newFields . add ( newField ) ; } } newSchema = Schema . createRecord ( schema . getName ( ) , schema . getDoc ( ) , newNamespace , schema . isError ( ) ) ; newSchema . setFields ( newFields ) ; break ; case UNION : List < Schema > newUnionMembers = new ArrayList < > ( ) ; if ( null != schema . getTypes ( ) && schema . getTypes ( ) . size ( ) > 0 ) { for ( Schema oldUnionMember : schema . getTypes ( ) ) { newUnionMembers . add ( switchNamespace ( oldUnionMember , namespaceOverride ) ) ; } } newSchema = Schema . createUnion ( newUnionMembers ) ; break ; case ARRAY : newSchema = Schema . createArray ( switchNamespace ( schema . getElementType ( ) , namespaceOverride ) ) ; break ; case BOOLEAN : case BYTES : case DOUBLE : case FLOAT : case INT : case LONG : case NULL : case STRING : newSchema = Schema . create ( schema . getType ( ) ) ; break ; default : String exceptionMessage = String . format ( "Schema namespace replacement failed for \"%s\" " , schema ) ; LOG . error ( exceptionMessage ) ; throw new AvroRuntimeException ( exceptionMessage ) ; } // Copy schema metadata
copyProperties ( schema , newSchema ) ; return newSchema ;
|
public class NumberExpression { /** * Create a { @ code mod ( this , num ) } expression
* @ param num
* @ return mod ( this , num ) */
public NumberExpression < T > mod ( T num ) { } }
|
return Expressions . numberOperation ( getType ( ) , Ops . MOD , mixin , ConstantImpl . create ( num ) ) ;
|
public class LogManager { public static void d ( String tag , Object msg ) { } }
|
log ( tag , msg , Log . DEBUG ) ;
|
public class SAMLPeerEntityContextLookup { /** * { @ inheritDoc } */
@ Override public SAMLPeerEntityContext apply ( MessageContext input ) { } }
|
return input != null ? input . getSubcontext ( SAMLPeerEntityContext . class , false ) : null ;
|
public class HashFunctions { /** * Fowler - Noll - Vo 64 bit hash ( FNV - 1a ) for long key . This is big - endian version ( native endianess of JVM ) . < br / > < p / >
* < h3 > Algorithm < / h3 > < p / >
* < pre >
* hash = offset _ basis
* for each octet _ of _ data to be hashed
* hash = hash xor octet _ of _ data
* hash = hash * FNV _ prime
* return hash < / pre >
* < h3 > Links < / h3 > < a href = " http : / / www . isthe . com / chongo / tech / comp / fnv / " > http : / / www . isthe . com / chongo / tech / comp / fnv / < / a > < br / >
* < a href = " http : / / en . wikipedia . org / wiki / Fowler % E2%80%93Noll % E2%80%93Vo _ hash _ function " > http : / / en . wikipedia . org / wiki / Fowler % E2%80%93Noll % E2%80%93Vo _ hash _ function < / a > < br / >
* @ param c long key to be hashed
* @ return hash 64 bit hash */
public static long FVN64hash ( long c ) { } }
|
long hash = FNV_BASIS ; hash ^= c >>> 56 ; hash *= FNV_PRIME_64 ; hash ^= 0xFFL & ( c >>> 48 ) ; hash *= FNV_PRIME_64 ; hash ^= 0xFFL & ( c >>> 40 ) ; hash *= FNV_PRIME_64 ; hash ^= 0xFFL & ( c >>> 32 ) ; hash *= FNV_PRIME_64 ; hash ^= 0xFFL & ( c >>> 24 ) ; hash *= FNV_PRIME_64 ; hash ^= 0xFFL & ( c >>> 16 ) ; hash *= FNV_PRIME_64 ; hash ^= 0xFFL & ( c >>> 8 ) ; hash *= FNV_PRIME_64 ; hash ^= 0xFFL & c ; hash *= FNV_PRIME_64 ; return hash ;
|
public class ImportInstanceRequest { /** * The disk image .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setDiskImages ( java . util . Collection ) } or { @ link # withDiskImages ( java . util . Collection ) } if you want to
* override the existing values .
* @ param diskImages
* The disk image .
* @ return Returns a reference to this object so that method calls can be chained together . */
public ImportInstanceRequest withDiskImages ( DiskImage ... diskImages ) { } }
|
if ( this . diskImages == null ) { setDiskImages ( new com . amazonaws . internal . SdkInternalList < DiskImage > ( diskImages . length ) ) ; } for ( DiskImage ele : diskImages ) { this . diskImages . add ( ele ) ; } return this ;
|
public class GeneralDataset { /** * Get the total count ( over all data instances ) of each feature
* @ return an array containing the counts ( indexed by index ) */
public float [ ] getFeatureCounts ( ) { } }
|
float [ ] counts = new float [ featureIndex . size ( ) ] ; for ( int i = 0 , m = size ; i < m ; i ++ ) { for ( int j = 0 , n = data [ i ] . length ; j < n ; j ++ ) { counts [ data [ i ] [ j ] ] += 1.0 ; } } return counts ;
|
public class DuckExpectation { /** * { @ inheritDoc } */
public boolean meets ( Object result ) { } }
|
Object expectedValue = canCoerceTo ( result ) ? coerceTo ( result ) : expected ; return ShouldBe . equal ( expectedValue ) . meets ( result ) ;
|
public class ClassUtils { /** * 获取一个类的所有字段
* @ param entityClass
* @ return */
public static Set < Field > getAllFiled ( Class < ? > entityClass ) { } }
|
// 获取本类的所有字段
Set < Field > fs = new HashSet < Field > ( ) ; for ( Field f : entityClass . getFields ( ) ) { fs . add ( f ) ; } for ( Field f : entityClass . getDeclaredFields ( ) ) { fs . add ( f ) ; } // 递归获取父类的所有字段
Class < ? > superClass = entityClass . getSuperclass ( ) ; if ( ! superClass . equals ( Object . class ) ) { Set < Field > superFileds = getAllFiled ( superClass ) ; fs . addAll ( superFileds ) ; } return fs ;
|
public class Futures { /** * Waits for the provided future to be complete , and returns true if it was successful , false if it failed
* or did not complete .
* @ param timeout The maximum number of milliseconds to block
* @ param f The future to wait for .
* @ param < T > The Type of the future ' s result .
* @ return True if the given CompletableFuture is completed and successful within the given timeout . */
public static < T > boolean await ( CompletableFuture < T > f , long timeout ) { } }
|
Exceptions . handleInterrupted ( ( ) -> { try { f . get ( timeout , TimeUnit . MILLISECONDS ) ; } catch ( TimeoutException | ExecutionException e ) { // Not handled here .
} } ) ; return isSuccessful ( f ) ;
|
public class CmsSecurityManager { /** * Returns all resources subscribed by the given user or group . < p >
* @ param context the request context
* @ param poolName the name of the database pool to use
* @ param principal the principal to read the subscribed resources
* @ return all resources subscribed by the given user or group
* @ throws CmsException if something goes wrong */
public List < CmsResource > readAllSubscribedResources ( CmsRequestContext context , String poolName , CmsPrincipal principal ) throws CmsException { } }
|
List < CmsResource > result = null ; CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; try { result = m_driverManager . readAllSubscribedResources ( dbc , poolName , principal ) ; } catch ( Exception e ) { if ( principal instanceof CmsUser ) { dbc . report ( null , Messages . get ( ) . container ( Messages . ERR_READ_SUBSCRIBED_RESOURCES_ALL_USER_1 , principal . getName ( ) ) , e ) ; } else { dbc . report ( null , Messages . get ( ) . container ( Messages . ERR_READ_SUBSCRIBED_RESOURCES_ALL_GROUP_1 , principal . getName ( ) ) , e ) ; } } finally { dbc . clear ( ) ; } return result ;
|
public class ServiceGraphModule { /** * Removes the dependency
* @ param key key for removing dependency
* @ param keyDependency key of dependency
* @ return ServiceGraphModule with change */
public ServiceGraphModule removeDependency ( Key < ? > key , Key < ? > keyDependency ) { } }
|
removedDependencies . computeIfAbsent ( key , key1 -> new HashSet < > ( ) ) . add ( keyDependency ) ; return this ;
|
public class Searcher { /** * Returns the number of unique views .
* @ param uniqueViews the set of unique views
* @ param views the list of all views
* @ return number of unique views */
public < T extends View > int getNumberOfUniqueViews ( Set < T > uniqueViews , ArrayList < T > views ) { } }
|
for ( int i = 0 ; i < views . size ( ) ; i ++ ) { uniqueViews . add ( views . get ( i ) ) ; } numberOfUniqueViews = uniqueViews . size ( ) ; return numberOfUniqueViews ;
|
public class HBaseRequestAdapter { /** * < p > adapt . < / p >
* @ param put a { @ link org . apache . hadoop . hbase . client . Put } object .
* @ return a { @ link RowMutation } object . */
public RowMutation adapt ( Put put ) { } }
|
RowMutation rowMutation = newRowMutationModel ( put . getRow ( ) ) ; adapt ( put , rowMutation ) ; return rowMutation ;
|
public class HttpRequestMessageImpl { /** * Set the method to the given byte [ ] input if it is valid .
* @ param method
* @ throws UnsupportedMethodException */
@ Override public void setMethod ( byte [ ] method ) throws UnsupportedMethodException { } }
|
MethodValues val = MethodValues . match ( method , 0 , method . length ) ; if ( null == val ) { throw new UnsupportedMethodException ( "Illegal method " + GenericUtils . getEnglishString ( method ) ) ; } setMethod ( val ) ;
|
public class RuntimeResourceDefinition { /** * Will not return null */
public List < RuntimeSearchParam > getSearchParamsForCompartmentName ( String theCompartmentName ) { } }
|
validateSealed ( ) ; List < RuntimeSearchParam > retVal = myCompartmentNameToSearchParams . get ( theCompartmentName ) ; if ( retVal == null ) { return Collections . emptyList ( ) ; } return retVal ;
|
public class Prefs { /** * Removes a preference value .
* @ param key The name of the preference to remove .
* @ see android . content . SharedPreferences . Editor # remove ( String ) */
public static void remove ( final String key ) { } }
|
SharedPreferences prefs = getPreferences ( ) ; final Editor editor = prefs . edit ( ) ; if ( prefs . contains ( key + LENGTH ) ) { // Workaround for pre - HC ' s lack of StringSets
int stringSetLength = prefs . getInt ( key + LENGTH , - 1 ) ; if ( stringSetLength >= 0 ) { editor . remove ( key + LENGTH ) ; for ( int i = 0 ; i < stringSetLength ; i ++ ) { editor . remove ( key + "[" + i + "]" ) ; } } } editor . remove ( key ) ; editor . apply ( ) ;
|
public class UnknownAttributesAttribute { /** * Returns the length ( in bytes ) of this attribute ' s body .
* If the number of unknown attributes is an odd number , one of the
* attributes MUST be repeated in the list , so that the total length of the
* list is a multiple of 4 bytes .
* @ return the length of this attribute ' s value ( a multiple of 4 ) . */
@ Override public char getDataLength ( ) { } }
|
if ( this . unknownAttributes == null ) { return 0 ; } char length = ( char ) unknownAttributes . size ( ) ; if ( ( length % 2 ) != 0 ) { length ++ ; } return ( char ) ( length * 2 ) ;
|
public class FilesImpl { /** * Deletes the specified task file from the compute node where the task ran .
* @ param jobId The ID of the job that contains the task .
* @ param taskId The ID of the task whose file you want to delete .
* @ param filePath The path to the task file or directory that you want to delete .
* @ param recursive Whether to delete children of a directory . If the filePath parameter represents a directory instead of a file , you can set recursive to true to delete the directory and all of the files and subdirectories in it . If recursive is false then the directory must be empty or deletion will fail .
* @ param fileDeleteFromTaskOptions Additional parameters for the operation
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the { @ link ServiceResponseWithHeaders } object if successful . */
public Observable < ServiceResponseWithHeaders < Void , FileDeleteFromTaskHeaders > > deleteFromTaskWithServiceResponseAsync ( String jobId , String taskId , String filePath , Boolean recursive , FileDeleteFromTaskOptions fileDeleteFromTaskOptions ) { } }
|
if ( this . client . batchUrl ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.batchUrl() is required and cannot be null." ) ; } if ( jobId == null ) { throw new IllegalArgumentException ( "Parameter jobId is required and cannot be null." ) ; } if ( taskId == null ) { throw new IllegalArgumentException ( "Parameter taskId is required and cannot be null." ) ; } if ( filePath == null ) { throw new IllegalArgumentException ( "Parameter filePath is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } Validator . validate ( fileDeleteFromTaskOptions ) ; Integer timeout = null ; if ( fileDeleteFromTaskOptions != null ) { timeout = fileDeleteFromTaskOptions . timeout ( ) ; } UUID clientRequestId = null ; if ( fileDeleteFromTaskOptions != null ) { clientRequestId = fileDeleteFromTaskOptions . clientRequestId ( ) ; } Boolean returnClientRequestId = null ; if ( fileDeleteFromTaskOptions != null ) { returnClientRequestId = fileDeleteFromTaskOptions . returnClientRequestId ( ) ; } DateTime ocpDate = null ; if ( fileDeleteFromTaskOptions != null ) { ocpDate = fileDeleteFromTaskOptions . ocpDate ( ) ; } String parameterizedHost = Joiner . on ( ", " ) . join ( "{batchUrl}" , this . client . batchUrl ( ) ) ; DateTimeRfc1123 ocpDateConverted = null ; if ( ocpDate != null ) { ocpDateConverted = new DateTimeRfc1123 ( ocpDate ) ; } return service . deleteFromTask ( jobId , taskId , filePath , recursive , this . client . apiVersion ( ) , this . client . acceptLanguage ( ) , timeout , clientRequestId , returnClientRequestId , ocpDateConverted , parameterizedHost , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponseWithHeaders < Void , FileDeleteFromTaskHeaders > > > ( ) { @ Override public Observable < ServiceResponseWithHeaders < Void , FileDeleteFromTaskHeaders > > call ( Response < ResponseBody > response ) { try { ServiceResponseWithHeaders < Void , FileDeleteFromTaskHeaders > clientResponse = deleteFromTaskDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
|
public class EquirectangularTools_F64 { /** * Converts equirectangular into normalized pointing vector
* @ param x pixel coordinate in equirectangular image
* @ param y pixel coordinate in equirectangular image
* @ param norm Normalized pointing vector */
public void equiToNorm ( double x , double y , Point3D_F64 norm ) { } }
|
equiToLatLon ( x , y , temp ) ; ConvertCoordinates3D_F64 . latlonToUnitVector ( temp . lat , temp . lon , norm ) ;
|
public class NetworkVehicleInterface { /** * Return true if the address and port are valid .
* @ return true if the address and port are valid . */
public static boolean validateResource ( String uriString ) { } }
|
try { URI uri = UriBasedVehicleInterfaceMixin . createUri ( massageUri ( uriString ) ) ; return UriBasedVehicleInterfaceMixin . validateResource ( uri ) && uri . getPort ( ) < 65536 ; } catch ( DataSourceException e ) { return false ; }
|
public class ContinueUpdateRollbackRequest { /** * A list of the logical IDs of the resources that AWS CloudFormation skips during the continue update rollback
* operation . You can specify only resources that are in the < code > UPDATE _ FAILED < / code > state because a rollback
* failed . You can ' t specify resources that are in the < code > UPDATE _ FAILED < / code > state for other reasons , for
* example , because an update was cancelled . To check why a resource update failed , use the
* < a > DescribeStackResources < / a > action , and view the resource status reason .
* < important >
* Specify this property to skip rolling back resources that AWS CloudFormation can ' t successfully roll back . We
* recommend that you < a href =
* " https : / / docs . aws . amazon . com / AWSCloudFormation / latest / UserGuide / troubleshooting . html # troubleshooting - errors - update - rollback - failed "
* > troubleshoot < / a > resources before skipping them . AWS CloudFormation sets the status of the specified resources
* to < code > UPDATE _ COMPLETE < / code > and continues to roll back the stack . After the rollback is complete , the state
* of the skipped resources will be inconsistent with the state of the resources in the stack template . Before
* performing another stack update , you must update the stack or resources to be consistent with each other . If you
* don ' t , subsequent stack updates might fail , and the stack will become unrecoverable .
* < / important >
* Specify the minimum number of resources required to successfully roll back your stack . For example , a failed
* resource update might cause dependent resources to fail . In this case , it might not be necessary to skip the
* dependent resources .
* To skip resources that are part of nested stacks , use the following format :
* < code > NestedStackName . ResourceLogicalID < / code > . If you want to specify the logical ID of a stack resource (
* < code > Type : AWS : : CloudFormation : : Stack < / code > ) in the < code > ResourcesToSkip < / code > list , then its corresponding
* embedded stack must be in one of the following states : < code > DELETE _ IN _ PROGRESS < / code > ,
* < code > DELETE _ COMPLETE < / code > , or < code > DELETE _ FAILED < / code > .
* < note >
* Don ' t confuse a child stack ' s name with its corresponding logical ID defined in the parent stack . For an example
* of a continue update rollback operation with nested stacks , see < a href =
* " https : / / docs . aws . amazon . com / AWSCloudFormation / latest / UserGuide / using - cfn - updating - stacks - continueupdaterollback . html # nested - stacks "
* > Using ResourcesToSkip to recover a nested stacks hierarchy < / a > .
* < / note >
* @ param resourcesToSkip
* A list of the logical IDs of the resources that AWS CloudFormation skips during the continue update
* rollback operation . You can specify only resources that are in the < code > UPDATE _ FAILED < / code > state
* because a rollback failed . You can ' t specify resources that are in the < code > UPDATE _ FAILED < / code > state
* for other reasons , for example , because an update was cancelled . To check why a resource update failed ,
* use the < a > DescribeStackResources < / a > action , and view the resource status reason . < / p > < important >
* Specify this property to skip rolling back resources that AWS CloudFormation can ' t successfully roll back .
* We recommend that you < a href =
* " https : / / docs . aws . amazon . com / AWSCloudFormation / latest / UserGuide / troubleshooting . html # troubleshooting - errors - update - rollback - failed "
* > troubleshoot < / a > resources before skipping them . AWS CloudFormation sets the status of the specified
* resources to < code > UPDATE _ COMPLETE < / code > and continues to roll back the stack . After the rollback is
* complete , the state of the skipped resources will be inconsistent with the state of the resources in the
* stack template . Before performing another stack update , you must update the stack or resources to be
* consistent with each other . If you don ' t , subsequent stack updates might fail , and the stack will become
* unrecoverable .
* < / important >
* Specify the minimum number of resources required to successfully roll back your stack . For example , a
* failed resource update might cause dependent resources to fail . In this case , it might not be necessary to
* skip the dependent resources .
* To skip resources that are part of nested stacks , use the following format :
* < code > NestedStackName . ResourceLogicalID < / code > . If you want to specify the logical ID of a stack resource
* ( < code > Type : AWS : : CloudFormation : : Stack < / code > ) in the < code > ResourcesToSkip < / code > list , then its
* corresponding embedded stack must be in one of the following states : < code > DELETE _ IN _ PROGRESS < / code > ,
* < code > DELETE _ COMPLETE < / code > , or < code > DELETE _ FAILED < / code > .
* < note >
* Don ' t confuse a child stack ' s name with its corresponding logical ID defined in the parent stack . For an
* example of a continue update rollback operation with nested stacks , see < a href =
* " https : / / docs . aws . amazon . com / AWSCloudFormation / latest / UserGuide / using - cfn - updating - stacks - continueupdaterollback . html # nested - stacks "
* > Using ResourcesToSkip to recover a nested stacks hierarchy < / a > . */
public void setResourcesToSkip ( java . util . Collection < String > resourcesToSkip ) { } }
|
if ( resourcesToSkip == null ) { this . resourcesToSkip = null ; return ; } this . resourcesToSkip = new com . amazonaws . internal . SdkInternalList < String > ( resourcesToSkip ) ;
|
public class GobblinHelixDistributeJobExecutionLauncher { /** * Submit a planning job to helix so that it can launched from a remote node .
* @ param jobName A planning job name which has prefix { @ link GobblinClusterConfigurationKeys # PLANNING _ JOB _ NAME _ PREFIX } .
* @ param jobId A planning job id created by { @ link GobblinHelixDistributeJobExecutionLauncher # getPlanningJobId } .
* @ param jobConfigBuilder A job config builder which contains a single task . */
private void submitJobToHelix ( String jobName , String jobId , JobConfig . Builder jobConfigBuilder ) throws Exception { } }
|
TaskDriver taskDriver = new TaskDriver ( this . planningJobHelixManager ) ; HelixUtils . submitJobToWorkFlow ( jobConfigBuilder , jobName , jobId , taskDriver , this . planningJobHelixManager , this . workFlowExpiryTimeSeconds ) ; this . jobSubmitted = true ;
|
public class ChannelSuppliers { /** * Transforms this { @ code ChannelSupplier } data of < T > type with provided { @ code fn } ,
* which returns an { @ link Iterator } of a < V > type . Then provides this value to ChannelSupplier of < V > . */
public static < T , V > ChannelSupplier < V > remap ( ChannelSupplier < T > supplier , Function < ? super T , ? extends Iterator < ? extends V > > fn ) { } }
|
return new AbstractChannelSupplier < V > ( supplier ) { Iterator < ? extends V > iterator = CollectionUtils . emptyIterator ( ) ; boolean endOfStream ; @ Override protected Promise < V > doGet ( ) { if ( iterator . hasNext ( ) ) return Promise . of ( iterator . next ( ) ) ; return Promise . ofCallback ( this :: next ) ; } private void next ( SettableCallback < V > cb ) { if ( ! endOfStream ) { supplier . get ( ) . whenComplete ( ( item , e ) -> { if ( e == null ) { if ( item == null ) endOfStream = true ; iterator = fn . apply ( item ) ; if ( iterator . hasNext ( ) ) { cb . set ( iterator . next ( ) ) ; } else { next ( cb ) ; } } else { cb . setException ( e ) ; } } ) ; } else { cb . set ( null ) ; } } } ;
|
public class RolloutStatusCache { /** * Put { @ link TotalTargetCountActionStatus } for one { @ link Rollout } s into
* cache .
* @ param rolloutId
* the cache entries belong to
* @ param status
* list to cache */
public void putRolloutStatus ( final Long rolloutId , final List < TotalTargetCountActionStatus > status ) { } }
|
final Cache cache = cacheManager . getCache ( CACHE_RO_NAME ) ; putIntoCache ( rolloutId , status , cache ) ;
|
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getIfcTimeSeriesScheduleTypeEnum ( ) { } }
|
if ( ifcTimeSeriesScheduleTypeEnumEEnum == null ) { ifcTimeSeriesScheduleTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 917 ) ; } return ifcTimeSeriesScheduleTypeEnumEEnum ;
|
public class RoundedMoney { /** * ( non - Javadoc )
* @ see javax . money . MonetaryAmount # subtract ( javax . money . MonetaryAmount ) */
@ Override public RoundedMoney subtract ( MonetaryAmount subtrahend ) { } }
|
MoneyUtils . checkAmountParameter ( subtrahend , currency ) ; if ( subtrahend . isZero ( ) ) { return this ; } MathContext mc = monetaryContext . get ( MathContext . class ) ; if ( mc == null ) { mc = MathContext . DECIMAL64 ; } return new RoundedMoney ( number . subtract ( subtrahend . getNumber ( ) . numberValue ( BigDecimal . class ) , mc ) , currency , rounding ) ;
|
public class MarvinImage { /** * Sets a new image
* @ param BufferedImage imagem */
public void setBufferedImage ( BufferedImage img ) { } }
|
image = img ; width = img . getWidth ( ) ; height = img . getHeight ( ) ; updateColorArray ( ) ;
|
public class StartCrawlerScheduleRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( StartCrawlerScheduleRequest startCrawlerScheduleRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( startCrawlerScheduleRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( startCrawlerScheduleRequest . getCrawlerName ( ) , CRAWLERNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class Caster { /** * cast a Object to a boolean value ( refrence type ) , Exception Less
* @ param o Object to cast
* @ param defaultValue default value
* @ return casted boolean reference */
public static Boolean toBoolean ( Object o , Boolean defaultValue ) { } }
|
if ( o instanceof Boolean ) return ( ( Boolean ) o ) ; else if ( o instanceof Number ) return ( ( Number ) o ) . intValue ( ) == 0 ? Boolean . FALSE : Boolean . TRUE ; else if ( o instanceof String ) { int rtn = stringToBooleanValueEL ( o . toString ( ) ) ; if ( rtn == 1 ) return Boolean . TRUE ; else if ( rtn == 0 ) return Boolean . FALSE ; else { double dbl = toDoubleValue ( o . toString ( ) , Double . NaN ) ; if ( ! Double . isNaN ( dbl ) ) return toBooleanValue ( dbl ) ? Boolean . TRUE : Boolean . FALSE ; } } // else if ( o instanceof Clob ) return toBooleanValueEL ( toStringEL ( o ) ) ;
else if ( o instanceof Castable ) { return ( ( Castable ) o ) . castToBoolean ( defaultValue ) ; } else if ( o instanceof ObjectWrap ) return toBoolean ( ( ( ObjectWrap ) o ) . getEmbededObject ( defaultValue ) , defaultValue ) ; else if ( o == null ) return toBoolean ( "" , defaultValue ) ; return defaultValue ;
|
public class RadioGroup { /** * < p > Sets the selection to the radio button whose identifier is passed in
* parameter . Using - 1 as the selection identifier clears the selection ; such an operation is
* equivalent to invoking { @ link # clearCheck ( ) } . < / p >
* @ param id the unique id of the radio button to select in this group
* @ see # getCheckedRadioButtonId ( )
* @ see # clearCheck ( ) */
public void check ( int id ) { } }
|
// don ' t even bother
if ( id != - 1 && ( id == mCheckedId ) ) { return ; } if ( mCheckedId != - 1 ) { setCheckedStateForView ( mCheckedId , false ) ; } if ( id != - 1 ) { setCheckedStateForView ( id , true ) ; } setCheckedId ( id ) ;
|
public class CSVMultiTokExporter { /** * Takes a match and stores annotation names to construct the header in
* { @ link # outputText ( de . hu _ berlin . german . korpling . saltnpepper . salt . saltCommon . sDocumentStructure . SDocumentGraph , boolean , int , java . io . Writer ) }
* @ param graph
* @ param args
* @ param matchNumber
* @ param nodeCount
* @ throws java . io . IOException */
@ Override public void createAdjacencyMatrix ( SDocumentGraph graph , Map < String , String > args , int matchNumber , int nodeCount ) throws IOException , IllegalArgumentException { } }
|
// first match
if ( matchNumber == 0 ) { // get list of metakeys to export
metakeys = new HashSet < > ( ) ; if ( args . containsKey ( "metakeys" ) ) { metakeys . addAll ( Arrays . asList ( args . get ( "metakeys" ) . split ( "," ) ) ) ; } // initialize list of annotations for the matched nodes
annotationsForMatchedNodes = new TreeMap < > ( ) ; } for ( SNode node : this . getMatchedNodes ( graph ) ) { int node_id = node . getFeature ( AnnisConstants . ANNIS_NS , AnnisConstants . FEAT_MATCHEDNODE ) . getValue_SNUMERIC ( ) . intValue ( ) ; if ( ! annotationsForMatchedNodes . containsKey ( node_id ) ) annotationsForMatchedNodes . put ( node_id , new TreeSet < String > ( ) ) ; List < SAnnotation > annots = new ArrayList < > ( node . getAnnotations ( ) ) ; Set < String > annoNames = annotationsForMatchedNodes . get ( node_id ) ; for ( SAnnotation annot : annots ) { annoNames . add ( annot . getNamespace ( ) + "::" + annot . getName ( ) ) ; } }
|
public class Interpreter { /** * Execute an if statement at a given point in the function or method body .
* This will proceed done either the true or false branch .
* @ param stmt
* - - - The if statement to execute
* @ param frame
* - - - The current stack frame
* @ return */
private Status executeIf ( Stmt . IfElse stmt , CallStack frame , EnclosingScope scope ) { } }
|
RValue . Bool operand = executeExpression ( BOOL_T , stmt . getCondition ( ) , frame ) ; if ( operand == RValue . True ) { // branch taken , so execute true branch
return executeBlock ( stmt . getTrueBranch ( ) , frame , scope ) ; } else if ( stmt . hasFalseBranch ( ) ) { // branch not taken , so execute false branch
return executeBlock ( stmt . getFalseBranch ( ) , frame , scope ) ; } else { return Status . NEXT ; }
|
public class DocumentRootImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setUserDistribution ( UserDistributionType newUserDistribution ) { } }
|
( ( FeatureMap . Internal ) getMixed ( ) ) . set ( BpsimPackage . Literals . DOCUMENT_ROOT__USER_DISTRIBUTION , newUserDistribution ) ;
|
public class MessageLogGridScreen { /** * Add all the screen listeners . */
public void addListeners ( ) { } }
|
super . addListeners ( ) ; if ( this . isContactDisplay ( ) ) { ReferenceField field = ( ReferenceField ) this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_INFO_TYPE_ID ) ; field . setValue ( field . getReferenceRecord ( this ) . getIDFromCode ( MessageInfoType . REQUEST ) ) ; field = ( ReferenceField ) this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_TYPE_ID ) ; field . setValue ( field . getReferenceRecord ( this ) . getIDFromCode ( MessageType . MESSAGE_OUT ) ) ; field = ( ReferenceField ) this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_STATUS_ID ) ; field . setValue ( field . getReferenceRecord ( this ) . getIDFromCode ( MessageStatus . SENT ) ) ; } this . getMainRecord ( ) . getKeyArea ( ) . setKeyOrder ( DBConstants . DESCENDING ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . REFERENCE_ID ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . REFERENCE_ID ) , DBConstants . EQUALS , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . REFERENCE_ID ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . REFERENCE_TYPE ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . REFERENCE_TYPE ) , DBConstants . EQUALS , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . REFERENCE_TYPE ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . CONTACT_ID ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . MESSAGE_INFO_TYPE_ID ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_INFO_TYPE_ID ) , DBConstants . EQUALS , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_INFO_TYPE_ID ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . MESSAGE_TYPE_ID ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_TYPE_ID ) , DBConstants . EQUALS , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_TYPE_ID ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . MESSAGE_STATUS_ID ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_STATUS_ID ) , DBConstants . EQUALS , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_STATUS_ID ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . MESSAGE_TRANSPORT_ID ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_TRANSPORT_ID ) , DBConstants . EQUALS , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . MESSAGE_TRANSPORT_ID ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . USER_ID ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . USER_ID ) , DBConstants . EQUALS , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . USER_ID ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . MESSAGE_TIME ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . START_DATE ) , CompareFileFilter . GREATER_THAN_EQUAL , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . START_DATE ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . getMainRecord ( ) . addListener ( new CompareFileFilter ( this . getMainRecord ( ) . getField ( MessageLog . MESSAGE_TIME ) , this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . END_DATE ) , CompareFileFilter . LESS_THAN_EQUAL , null , true ) ) ; this . getScreenRecord ( ) . getField ( MessageLogScreenRecord . END_DATE ) . addListener ( new FieldReSelectHandler ( this ) ) ; this . setEditing ( false ) ;
|
public class ESFilterBuilder { /** * Gets the and filter builder .
* @ param logicalExp
* the logical exp
* @ param m
* the m
* @ param entity
* the entity
* @ return the and filter builder */
private AndQueryBuilder getAndFilterBuilder ( Expression logicalExp , EntityMetadata m ) { } }
|
AndExpression andExp = ( AndExpression ) logicalExp ; Expression leftExpression = andExp . getLeftExpression ( ) ; Expression rightExpression = andExp . getRightExpression ( ) ; return new AndQueryBuilder ( populateFilterBuilder ( leftExpression , m ) , populateFilterBuilder ( rightExpression , m ) ) ;
|
public class DispatchRule { /** * Returns a new instance of DispatchRule .
* @ param name the dispatch name
* @ param dispatcherName the id or class name of the view dispatcher bean
* @ param contentType the content type
* @ param encoding the character encoding
* @ param defaultResponse whether it is the default response
* @ return an instance of DispatchRule */
public static DispatchRule newInstance ( String name , String dispatcherName , String contentType , String encoding , Boolean defaultResponse ) { } }
|
DispatchRule dr = new DispatchRule ( ) ; dr . setName ( name ) ; dr . setDispatcherName ( dispatcherName ) ; dr . setContentType ( contentType ) ; dr . setEncoding ( encoding ) ; dr . setDefaultResponse ( defaultResponse ) ; return dr ;
|
public class UTF16 { /** * Extract a single UTF - 32 value from a string . Used when iterating forwards or backwards ( with
* < code > UTF16 . getCharCount ( ) < / code > , as well as random access . If a validity check is
* required , use < code > < a href = " . . / lang / UCharacter . html # isLegal ( char ) " >
* UCharacter . isLegal ( ) < / a > < / code >
* on the return value . If the char retrieved is part of a surrogate pair , its supplementary
* character will be returned . If a complete supplementary character is not found the incomplete
* character will be returned
* @ param source Array of UTF - 16 chars
* @ param offset16 UTF - 16 offset to the start of the character .
* @ return UTF - 32 value for the UTF - 32 value that contains the char at offset16 . The boundaries
* of that codepoint are the same as in < code > bounds32 ( ) < / code > .
* @ exception IndexOutOfBoundsException Thrown if offset16 is out of bounds . */
public static int charAt ( String source , int offset16 ) { } }
|
char single = source . charAt ( offset16 ) ; if ( single < LEAD_SURROGATE_MIN_VALUE ) { return single ; } return _charAt ( source , offset16 , single ) ;
|
public class BoxLegalHoldPolicy { /** * Returns iterable containing assignments for this single legal hold policy .
* Parameters can be used to filter retrieved assignments .
* @ param type filter assignments of this type only .
* Can be " file _ version " , " file " , " folder " , " user " or null if no type filter is necessary .
* @ param id filter assignments to this ID only . Can be null if no id filter is necessary .
* @ param limit the limit of entries per page . Default limit is 100.
* @ param fields the fields to retrieve .
* @ return an iterable containing assignments for this single legal hold policy . */
public Iterable < BoxLegalHoldAssignment . Info > getAssignments ( String type , String id , int limit , String ... fields ) { } }
|
QueryStringBuilder builder = new QueryStringBuilder ( ) ; if ( type != null ) { builder . appendParam ( "assign_to_type" , type ) ; } if ( id != null ) { builder . appendParam ( "assign_to_id" , id ) ; } if ( fields . length > 0 ) { builder . appendParam ( "fields" , fields ) ; } return new BoxResourceIterable < BoxLegalHoldAssignment . Info > ( this . getAPI ( ) , LEGAL_HOLD_ASSIGNMENTS_URL_TEMPLATE . buildWithQuery ( this . getAPI ( ) . getBaseURL ( ) , builder . toString ( ) , this . getID ( ) ) , limit ) { @ Override protected BoxLegalHoldAssignment . Info factory ( JsonObject jsonObject ) { BoxLegalHoldAssignment assignment = new BoxLegalHoldAssignment ( BoxLegalHoldPolicy . this . getAPI ( ) , jsonObject . get ( "id" ) . asString ( ) ) ; return assignment . new Info ( jsonObject ) ; } } ;
|
public class AbstractKQueueStreamChannel { /** * Write bytes form the given { @ link ByteBuf } to the underlying { @ link java . nio . channels . Channel } .
* @ param in the collection which contains objects to write .
* @ param buf the { @ link ByteBuf } from which the bytes should be written
* @ return The value that should be decremented from the write quantum which starts at
* { @ link ChannelConfig # getWriteSpinCount ( ) } . The typical use cases are as follows :
* < ul >
* < li > 0 - if no write was attempted . This is appropriate if an empty { @ link ByteBuf } ( or other empty content )
* is encountered < / li >
* < li > 1 - if a single call to write data was made to the OS < / li >
* < li > { @ link ChannelUtils # WRITE _ STATUS _ SNDBUF _ FULL } - if an attempt to write data was made to the OS , but no
* data was accepted < / li >
* < / ul > */
private int writeBytes ( ChannelOutboundBuffer in , ByteBuf buf ) throws Exception { } }
|
int readableBytes = buf . readableBytes ( ) ; if ( readableBytes == 0 ) { in . remove ( ) ; return 0 ; } if ( buf . hasMemoryAddress ( ) || buf . nioBufferCount ( ) == 1 ) { return doWriteBytes ( in , buf ) ; } else { ByteBuffer [ ] nioBuffers = buf . nioBuffers ( ) ; return writeBytesMultiple ( in , nioBuffers , nioBuffers . length , readableBytes , config ( ) . getMaxBytesPerGatheringWrite ( ) ) ; }
|
public class BeanId { /** * 89554 */
protected static int computeHashValue ( J2EEName j2eeName , Serializable pkey , boolean isHome ) { } }
|
return j2eeName . hashCode ( ) + ( ( pkey == null ) ? 0 : pkey . hashCode ( ) ) + ( ( isHome ) ? 1 : 0 ) ;
|
public class OutSegment { /** * Callback after the index has been flushed . */
private void afterIndexFsync ( Result < Boolean > result , FsyncType fsyncType , ArrayList < SegmentFsyncCallback > fsyncListeners ) { } }
|
try { // completePendingEntries ( _ position ) ;
if ( fsyncType . isClose ( ) ) { _isClosed = true ; _segment . finishWriting ( ) ; if ( _pendingFlushEntries . size ( ) > 0 || _pendingFsyncEntries . size ( ) > 0 ) { System . out . println ( "BROKEN_PEND: flush=" + _pendingFlushEntries . size ( ) + " fsync=" + _pendingFsyncEntries . size ( ) + " " + _pendingFlushEntries ) ; } _readWrite . afterSequenceClose ( _segment . getSequence ( ) ) ; } for ( SegmentFsyncCallback listener : _fsyncListeners ) { listener . onFsync ( ) ; } result . ok ( true ) ; } catch ( Throwable exn ) { result . fail ( exn ) ; }
|
public class PersistentState { /** * Gets the last zxid of transaction which is guaranteed in snapshot .
* @ return the last zxid of transaction which is guarantted to be applied . */
Zxid getSnapshotZxid ( ) { } }
|
File snapshot = getSnapshotFile ( ) ; if ( snapshot == null ) { return Zxid . ZXID_NOT_EXIST ; } String fileName = snapshot . getName ( ) ; String strZxid = fileName . substring ( fileName . indexOf ( '.' ) + 1 ) ; return Zxid . fromSimpleString ( strZxid ) ;
|
public class RslNode { /** * Produces a RSL representation of node .
* @ param buf buffer to add the RSL representation to .
* @ param explicitConcat if true explicit concatination will
* be used in RSL strings . */
public void toRSL ( StringBuffer buf , boolean explicitConcat ) { } }
|
Iterator iter ; buf . append ( getOperatorAsString ( ) ) ; if ( _bindings != null && _bindings . size ( ) > 0 ) { iter = _bindings . keySet ( ) . iterator ( ) ; Bindings binds ; while ( iter . hasNext ( ) ) { binds = getBindings ( ( String ) iter . next ( ) ) ; binds . toRSL ( buf , explicitConcat ) ; } } if ( _relations != null && _relations . size ( ) > 0 ) { iter = _relations . keySet ( ) . iterator ( ) ; NameOpValue nov ; while ( iter . hasNext ( ) ) { nov = getParam ( ( String ) iter . next ( ) ) ; nov . toRSL ( buf , explicitConcat ) ; } } if ( _specifications != null && _specifications . size ( ) > 0 ) { iter = _specifications . iterator ( ) ; AbstractRslNode node ; while ( iter . hasNext ( ) ) { node = ( AbstractRslNode ) iter . next ( ) ; buf . append ( " (" ) ; node . toRSL ( buf , explicitConcat ) ; buf . append ( " )" ) ; } }
|
public class ErrorList { /** * Returns the Axis serializer for this object . */
public static Serializer getSerializer ( @ SuppressWarnings ( "unused" ) java . lang . String mechType , java . lang . Class < ? extends Operation > javaType , javax . xml . namespace . QName xmlType ) { } }
|
return new org . apache . axis . encoding . ser . BeanSerializer ( javaType , xmlType , TYPE_DESC ) ;
|
public class ClassToExternalizerMap { /** * Put a value into the map . Any previous mapping is discarded silently .
* @ param key the key
* @ param value the value to store */
public void put ( Class key , AdvancedExternalizer value ) { } }
|
final Class [ ] keys = this . keys ; final int mask = keys . length - 1 ; final AdvancedExternalizer [ ] values = this . values ; Class k ; int hc = System . identityHashCode ( key ) & mask ; for ( int idx = hc ; ; idx = hc ++ & mask ) { k = keys [ idx ] ; if ( k == null ) { keys [ idx ] = key ; values [ idx ] = value ; if ( ++ count > resizeCount ) { resize ( ) ; } return ; } if ( k == key ) { values [ idx ] = value ; return ; } }
|
public class AmazonCodeDeployClient { /** * Gets information about one or more applications .
* @ param batchGetApplicationsRequest
* Represents the input of a BatchGetApplications operation .
* @ return Result of the BatchGetApplications operation returned by the service .
* @ throws ApplicationNameRequiredException
* The minimum number of required application names was not specified .
* @ throws InvalidApplicationNameException
* The application name was specified in an invalid format .
* @ throws ApplicationDoesNotExistException
* The application does not exist with the IAM user or AWS account .
* @ throws BatchLimitExceededException
* The maximum number of names or IDs allowed for this request ( 100 ) was exceeded .
* @ sample AmazonCodeDeploy . BatchGetApplications
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / codedeploy - 2014-10-06 / BatchGetApplications "
* target = " _ top " > AWS API Documentation < / a > */
@ Override public BatchGetApplicationsResult batchGetApplications ( BatchGetApplicationsRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeBatchGetApplications ( request ) ;
|
public class Calc { /** * Test if two amino acids are connected , i . e . if the distance from C to N <
* 2.5 Angstrom .
* If one of the AminoAcids has an atom missing , returns false .
* @ param a
* an AminoAcid object
* @ param b
* an AminoAcid object
* @ return true if . . . */
public static final boolean isConnected ( AminoAcid a , AminoAcid b ) { } }
|
Atom C = null ; Atom N = null ; C = a . getC ( ) ; N = b . getN ( ) ; if ( C == null || N == null ) return false ; // one could also check if the CA atoms are < 4 A . . .
double distance = getDistance ( C , N ) ; return distance < 2.5 ;
|
public class ProxyCertInfo { /** * Returns an instance of < code > ProxyCertInfo < / code > from given object .
* @ param obj the object to create the instance from .
* @ return < code > ProxyCertInfo < / code > instance .
* @ throws IllegalArgumentException if unable to convert the object to < code > ProxyCertInfo < / code > instance . */
public static ProxyCertInfo getInstance ( Object obj ) { } }
|
// String err = obj . getClass ( ) . getName ( ) ;
if ( obj instanceof ProxyCertInfo ) { return ( ProxyCertInfo ) obj ; } else if ( obj instanceof ASN1Sequence ) { return new ProxyCertInfo ( ( ASN1Sequence ) obj ) ; } else if ( obj instanceof byte [ ] ) { ASN1Primitive derObj ; try { derObj = CertificateUtil . toASN1Primitive ( ( byte [ ] ) obj ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( e . getMessage ( ) , e ) ; } if ( derObj instanceof ASN1Sequence ) { return new ProxyCertInfo ( ( ASN1Sequence ) derObj ) ; } } throw new IllegalArgumentException ( ) ;
|
public class UicStats { /** * Finds all instances that make up the tree ( static and dynamic ) and gathers stats .
* @ param root the root component to start from .
* @ return the statistics for components in the given subtree . */
private Map < WComponent , Stat > createWCTreeStats ( final WComponent root ) { } }
|
Map < WComponent , Stat > statsMap = new HashMap < > ( ) ; UIContextHolder . pushContext ( uic ) ; try { addStats ( statsMap , root ) ; } finally { UIContextHolder . popContext ( ) ; } return statsMap ;
|
public class DatabaseAccountsInner { /** * Changes the failover priority for the Azure Cosmos DB database account . A failover priority of 0 indicates a write region . The maximum value for a failover priority = ( total number of regions - 1 ) . Failover priority values must be unique for each of the regions in which the database account exists .
* @ param resourceGroupName Name of an Azure resource group .
* @ param accountName Cosmos DB database account name .
* @ param failoverPolicies List of failover policies .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void failoverPriorityChange ( String resourceGroupName , String accountName , List < FailoverPolicy > failoverPolicies ) { } }
|
failoverPriorityChangeWithServiceResponseAsync ( resourceGroupName , accountName , failoverPolicies ) . toBlocking ( ) . last ( ) . body ( ) ;
|
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link CiType } { @ code > } } */
@ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "ci" ) public JAXBElement < CiType > createCi ( CiType value ) { } }
|
return new JAXBElement < CiType > ( _Ci_QNAME , CiType . class , null , value ) ;
|
public class ListDeploymentInstancesRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( ListDeploymentInstancesRequest listDeploymentInstancesRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( listDeploymentInstancesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listDeploymentInstancesRequest . getDeploymentId ( ) , DEPLOYMENTID_BINDING ) ; protocolMarshaller . marshall ( listDeploymentInstancesRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listDeploymentInstancesRequest . getInstanceStatusFilter ( ) , INSTANCESTATUSFILTER_BINDING ) ; protocolMarshaller . marshall ( listDeploymentInstancesRequest . getInstanceTypeFilter ( ) , INSTANCETYPEFILTER_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class ExtensionRegistry { /** * Find an extension by containing type and field number .
* @ return Information about the extension if found , or { @ code null }
* otherwise . */
public ExtensionInfo findExtensionByNumber ( final Descriptor containingType , final int fieldNumber ) { } }
|
return extensionsByNumber . get ( new DescriptorIntPair ( containingType , fieldNumber ) ) ;
|
public class WriterFactoryImpl { /** * { @ inheritDoc } */
public MemberSummaryWriter getMemberSummaryWriter ( ClassWriter classWriter , int memberType ) throws Exception { } }
|
switch ( memberType ) { case VisibleMemberMap . CONSTRUCTORS : return getConstructorWriter ( classWriter ) ; case VisibleMemberMap . ENUM_CONSTANTS : return getEnumConstantWriter ( classWriter ) ; case VisibleMemberMap . FIELDS : return getFieldWriter ( classWriter ) ; case VisibleMemberMap . PROPERTIES : return getPropertyWriter ( classWriter ) ; case VisibleMemberMap . INNERCLASSES : return new NestedClassWriterImpl ( ( SubWriterHolderWriter ) classWriter , classWriter . getClassDoc ( ) ) ; case VisibleMemberMap . METHODS : return getMethodWriter ( classWriter ) ; default : return null ; }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.