signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AuthorizationEndpoint { /** * We can grant a token and return it with implicit approval . */ private ModelAndView getImplicitGrantResponse ( AuthorizationRequest authorizationRequest ) { } }
try { TokenRequest tokenRequest = getOAuth2RequestFactory ( ) . createTokenRequest ( authorizationRequest , "implicit" ) ; OAuth2Request storedOAuth2Request = getOAuth2RequestFactory ( ) . createOAuth2Request ( authorizationRequest ) ; OAuth2AccessToken accessToken = getAccessTokenForImplicitGrant ( tokenRequest , stor...
public class ClassFile { /** * Returns all the methods defined in this class , not including * constructors and static initializers . */ public MethodInfo [ ] getMethods ( ) { } }
int size = mMethods . size ( ) ; List < MethodInfo > methodsOnly = new ArrayList < MethodInfo > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { MethodInfo method = mMethods . get ( i ) ; String name = method . getName ( ) ; if ( ! "<init>" . equals ( name ) && ! "<clinit>" . equals ( name ) ) { methodsOnly . add ( met...
public class CPOptionCategoryPersistenceImpl { /** * Returns the cp option category with the primary key or returns < code > null < / code > if it could not be found . * @ param primaryKey the primary key of the cp option category * @ return the cp option category , or < code > null < / code > if a cp option catego...
Serializable serializable = entityCache . getResult ( CPOptionCategoryModelImpl . ENTITY_CACHE_ENABLED , CPOptionCategoryImpl . class , primaryKey ) ; if ( serializable == nullModel ) { return null ; } CPOptionCategory cpOptionCategory = ( CPOptionCategory ) serializable ; if ( cpOptionCategory == null ) { Session sess...
public class IdentityChecker { /** * Method that sets the identity of the certificate path . Also checks if * limited proxy is acceptable . * @ throws CertPathValidatorException If limited proxies are not accepted * and the chain has a limited proxy . */ public void invoke ( X509Certificate cert , GSIConstants . ...
if ( proxyCertValidator . getIdentityCertificate ( ) == null ) { // check if limited if ( ProxyCertificateUtil . isLimitedProxy ( certType ) ) { proxyCertValidator . setLimited ( true ) ; if ( proxyCertValidator . isRejectLimitedProxy ( ) ) { throw new CertPathValidatorException ( "Limited proxy not accepted" ) ; } } /...
public class AsyncFileLogger { /** * - - - ADD TO QUEUE - - - */ @ Override public void publish ( LogRecord record ) { } }
if ( ! isLoggable ( record ) ) { return ; } synchronized ( messages ) { messages . addLast ( record ) ; messages . notifyAll ( ) ; }
public class JsonByteBufferReader { /** * 读取一个int值 * @ return int值 */ @ Override public final int readInt ( ) { } }
char firstchar = nextGoodChar ( ) ; boolean quote = false ; if ( firstchar == '"' || firstchar == '\'' ) { quote = true ; firstchar = nextGoodChar ( ) ; if ( firstchar == '"' || firstchar == '\'' ) return 0 ; } int value = 0 ; final boolean negative = firstchar == '-' ; if ( ! negative ) { if ( firstchar < '0' || first...
public class OrmLiteConfigUtil { /** * Write a configuration file to an output stream with the configuration for classes . * @ param sortClasses * Set to true to sort the classes and fields by name before the file is generated . */ public static void writeConfigFile ( OutputStream outputStream , Class < ? > [ ] cla...
if ( sortClasses ) { // sort our class list to make the output more deterministic Class < ? > [ ] sortedClasses = new Class < ? > [ classes . length ] ; System . arraycopy ( classes , 0 , sortedClasses , 0 , classes . length ) ; Arrays . sort ( sortedClasses , classComparator ) ; classes = sortedClasses ; } BufferedWri...
public class GetRegexMatchSetRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetRegexMatchSetRequest getRegexMatchSetRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getRegexMatchSetRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getRegexMatchSetRequest . getRegexMatchSetId ( ) , REGEXMATCHSETID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall reque...
public class ProblemSummaryService { /** * Gets lists of { @ link ProblemSummary } objects organized by { @ link IssueCategoryModel } . */ public static Map < IssueCategoryModel , List < ProblemSummary > > getProblemSummaries ( GraphContext graphContext , Set < ProjectModel > projectModels , Set < String > includeTags ...
// The key is the severity as a String Map < IssueCategoryModel , List < ProblemSummary > > results = new TreeMap < > ( new IssueCategoryModel . IssueSummaryPriorityComparator ( ) ) ; Map < RuleSummaryKey , ProblemSummary > ruleToSummary = new HashMap < > ( ) ; InlineHintService hintService = new InlineHintService ( gr...
public class RasterData { /** * Load raster data from node . * @ param root The raster node . * @ param color The raster color name . * @ return The raster data . */ public static RasterData load ( Xml root , String color ) { } }
final Xml node = root . getChild ( color ) ; final double force = node . readDouble ( ATT_FORCE ) ; final int amplitude = node . readInteger ( ATT_AMPLITUDE ) ; final int offset = node . readInteger ( ATT_OFFSET ) ; final int type = node . readInteger ( ATT_TYPE ) ; return new RasterData ( force , amplitude , offset , ...
public class ElementsExceptionsFactory { /** * Constructs and initializes a new { @ link AssertionException } with the given { @ link Throwable cause } * and { @ link String message } formatted with the given { @ link Object [ ] arguments } . * @ param cause { @ link Throwable } identified as the reason this { @ li...
return new AssertionException ( format ( message , args ) , cause ) ;
public class JDBCStateRepository { /** * Method for creating / migrating the database schema */ protected void migrateSchema ( ) { } }
try { Connection connection = dataSource . getConnection ( ) ; try { beforeSchemaMigration ( connection ) ; SchemaUpdater updater = new SchemaUpdater ( connection , tableName , serializer ) ; if ( ! updater . doesTableExist ( ) ) { updater . migrateToVersion1 ( ) ; } if ( updater . isSchemaVersion1 ( ) ) { updater . mi...
public class Environment { /** * Map to Environment * @ param map config map * @ return return Environment instance */ public static Environment of ( @ NonNull Map < String , String > map ) { } }
var environment = new Environment ( ) ; map . forEach ( ( key , value ) -> environment . props . setProperty ( key , value ) ) ; return environment ;
public class dnspolicylabel_stats { /** * Use this API to fetch the statistics of all dnspolicylabel _ stats resources that are configured on netscaler . */ public static dnspolicylabel_stats [ ] get ( nitro_service service , options option ) throws Exception { } }
dnspolicylabel_stats obj = new dnspolicylabel_stats ( ) ; dnspolicylabel_stats [ ] response = ( dnspolicylabel_stats [ ] ) obj . stat_resources ( service , option ) ; return response ;
public class ProvidersInner { /** * Get available application frameworks and their versions . * Get available application frameworks and their versions . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the vali...
return getAvailableStacksNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ApplicationStackInner > > , Page < ApplicationStackInner > > ( ) { @ Override public Page < ApplicationStackInner > call ( ServiceResponse < Page < ApplicationStackInner > > response ) { return response ....
public class AdminunitSecondlineBuilder { /** * { @ inheritDoc } */ @ Override public AdminunitSecondline buildObject ( String namespaceURI , String localName , String namespacePrefix ) { } }
return new AdminunitSecondlineImpl ( namespaceURI , localName , namespacePrefix ) ;
public class Counters { /** * PriorityQueue */ public static < E > String toBiggestValuesFirstString ( Counter < E > c , int k ) { } }
PriorityQueue < E > pq = toPriorityQueue ( c ) ; PriorityQueue < E > largestK = new BinaryHeapPriorityQueue < E > ( ) ; // TODO : Is there any reason the original ( commented out ) line is better // than the one replacing it ? // while ( largestK . size ( ) < k & & ( ( Iterator < E > ) pq ) . hasNext ( ) ) { while ( la...
public class NodeOutput { /** * < code > optional . tensorflow . TensorDescription tensor _ description = 3 ; < / code > */ public org . tensorflow . framework . TensorDescription getTensorDescription ( ) { } }
return tensorDescription_ == null ? org . tensorflow . framework . TensorDescription . getDefaultInstance ( ) : tensorDescription_ ;
public class Binder { /** * Apply the chain of transforms and bind them to an object field retrieval specified * using the end signature plus the given class and name . The field must * match the end signature ' s return value and the end signature must take * the target class or a subclass as its only argument ....
try { return getField ( lookup , name ) ; } catch ( IllegalAccessException | NoSuchFieldException e ) { throw new InvalidTransformException ( e ) ; }
public class Table { /** * Returns a table with n by m + 1 cells . The first column contains labels , the other cells contains the proportion * for a unique combination of values from the two specified columns in this table */ public Table xTabTablePercents ( String column1Name , String column2Name ) { } }
return CrossTab . tablePercents ( this , column1Name , column2Name ) ;
public class Token { /** * Determines if this token was triggered by one of the given triggers . * @ param triggers a list of possible triggers to compare to * @ return < tt > true < / tt > if this token was triggered by one of the given triggers , < tt > false < / tt > otherwise */ @ SuppressWarnings ( "squid:S169...
if ( triggers . length == 0 ) { return false ; } for ( String aTrigger : triggers ) { if ( aTrigger != null && aTrigger . intern ( ) == getTrigger ( ) ) { return true ; } } return false ;
public class PackageManagerUtils { /** * Checks if the device has a NFC that can emulate host card . * @ param context the context . * @ return { @ code true } if the device has a NFC that can emulate host card . */ @ TargetApi ( Build . VERSION_CODES . KITKAT ) public static boolean hasHostCardEmulationNfcFeature ...
return hasHostCardEmulationNfcFeature ( context . getPackageManager ( ) ) ;
public class Paginator { /** * Search for objects with a partial response . * A convenience method that allows the client code to specify the value of * { @ link GenomicsRequest # setFields } using a { @ link GenomicsRequestInitializer } . * @ param request The search request . * @ param fields The fields to se...
return search ( request , setFieldsInitializer ( fields ) , RetryPolicy . defaultPolicy ( ) ) ;
public class SummernotePasteEvent { /** * Fires a summernote paste event on all registered handlers in the handler * manager . If no such handlers exist , this method will do nothing . * @ param source the source of the handlers */ public static void fire ( final HasSummernotePasteHandlers source ) { } }
if ( TYPE != null ) { SummernotePasteEvent event = new SummernotePasteEvent ( ) ; source . fireEvent ( event ) ; }
public class XStreamConverters { /** * Method used to register all the XStream converters scanned to a XStream instance * @ param xstream */ public void registerComponents ( XStream xstream ) { } }
for ( Converter converter : converters ) { xstream . registerConverter ( converter ) ; logger . debug ( "registered Xstream converter for {}" , converter . getClass ( ) . getName ( ) ) ; } for ( SingleValueConverter converter : singleValueConverters ) { xstream . registerConverter ( converter ) ; logger . debug ( "regi...
public class AnnotationModel { /** * Initializes the type */ protected void initType ( EnhancedAnnotation < T > annotatedAnnotation ) { } }
if ( ! Annotation . class . isAssignableFrom ( getRawType ( ) ) ) { throw MetadataLogger . LOG . metaAnnotationOnWrongType ( getMetaAnnotationTypes ( ) , getRawType ( ) ) ; }
public class ArithmeticUtils { /** * Compare two numbers */ public static Boolean greaterThan ( Number n1 , Number n2 ) { } }
Class < ? > type = getComputationType ( n1 , n2 ) ; Number val1 = convertTo ( n1 , type ) ; Number val2 = convertTo ( n2 , type ) ; if ( type == Long . class ) return val1 . longValue ( ) > val2 . longValue ( ) ? Boolean . TRUE : Boolean . FALSE ; return val1 . doubleValue ( ) > val2 . doubleValue ( ) ? Boolean . TRUE ...
public class CatalogSizing { /** * Produce a sizing of all significant database objects . * @ param dbCatalog database catalog * @ param isXDCR Is XDCR enabled * @ return database size result object tree */ public static DatabaseSizes getCatalogSizes ( Database dbCatalog , boolean isXDCR ) { } }
DatabaseSizes dbSizes = new DatabaseSizes ( ) ; for ( Table table : dbCatalog . getTables ( ) ) { dbSizes . addTable ( getTableSize ( table , isXDCR ) ) ; } return dbSizes ;
public class WXBizMsgCrypt { /** * 对明文进行加密 . * @ param text 需要加密的明文 * @ return 加密后base64编码的字符串 * @ throws AesException aes加密失败 */ String encrypt ( String randomStr , String text ) throws AesException { } }
ByteGroup byteCollector = new ByteGroup ( ) ; byte [ ] randomStrBytes = randomStr . getBytes ( CHARSET ) ; byte [ ] textBytes = text . getBytes ( CHARSET ) ; byte [ ] networkBytesOrder = getNetworkBytesOrder ( textBytes . length ) ; byte [ ] appidBytes = appId . getBytes ( CHARSET ) ; // randomStr + networkBytesOrder +...
public class ColumnText { /** * Replaces the current text array with this < CODE > Phrase < / CODE > . * Anything added previously with addElement ( ) is lost . * @ param phrase the text */ public void setText ( Phrase phrase ) { } }
bidiLine = null ; composite = false ; compositeColumn = null ; compositeElements = null ; listIdx = 0 ; splittedRow = false ; waitPhrase = phrase ;
public class PreferencesFxModel { /** * Unregisters a previously registered event handler . One handler might have been registered for * different event types , so the caller needs to specify the particular event type from which to * unregister the handler . * @ param eventType the event type from which to unregi...
if ( eventType == null ) { throw new NullPointerException ( "Argument eventType must not be null" ) ; } if ( eventHandler == null ) { throw new NullPointerException ( "Argument eventHandler must not be null" ) ; } List < EventHandler < ? super PreferencesFxEvent > > list = this . eventHandlers . get ( eventType ) ; if ...
public class GZIPOutputStream { /** * Writes array of bytes to the compressed output stream . This method * will block until all the bytes are written . * @ param buf the data to be written * @ param off the start offset of the data * @ param len the length of the data * @ exception IOException If an I / O er...
super . write ( buf , off , len ) ; crc . update ( buf , off , len ) ;
public class JmxUtils { /** * Returns the object name for the Jawr MBean * @ param contextPath * the context path * @ param objectType * the type of the MBean object * @ param mBeanPrefix * the MBean prefix * @ param resourceType * the resource type * @ return the object name for the Jawr MBean * @ ...
String curCtxPath = contextPath ; if ( StringUtils . isEmpty ( curCtxPath ) ) { curCtxPath = ServletContextUtils . getContextPath ( null ) ; } if ( curCtxPath . charAt ( 0 ) == ( '/' ) ) { curCtxPath = curCtxPath . substring ( 1 ) ; } String prefix = mBeanPrefix ; if ( prefix == null ) { prefix = DEFAULT_PREFIX ; } Str...
public class CPDefinitionInventoryPersistenceImpl { /** * Clears the cache for the cp definition inventory . * The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */ @ Override public void clearCache ( CPDefinitionInventory cpDefinitionInventory ) { } }
entityCache . removeResult ( CPDefinitionInventoryModelImpl . ENTITY_CACHE_ENABLED , CPDefinitionInventoryImpl . class , cpDefinitionInventory . getPrimaryKey ( ) ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ; clearUniqu...
public class PackageServlet { /** * setup of the servlet operation set for this servlet instance */ @ Override public void init ( ) throws ServletException { } }
super . init ( ) ; // GET operations . setOperation ( ServletOperationSet . Method . GET , Extension . json , Operation . list , new ListOperation ( ) ) ; operations . setOperation ( ServletOperationSet . Method . GET , Extension . json , Operation . tree , new TreeOperation ( ) ) ; operations . setOperation ( ServletO...
public class Resolver { /** * Resolve edge based on a subject { @ link KamNode } , * { @ link RelationshipType } , and an object { @ link KamNode } . * @ param kam { @ link Kam } , the kam to resolve into * @ param subjectKamNode { @ link KamNode } , the subject kam node * @ param rtype { @ link RelationshipTyp...
final KamEdge resolvedEdge = kam . findEdge ( subjectKamNode , rtype , objectKamNode ) ; return resolvedEdge ;
public class CommonOps_ZDRM { /** * Performs the following operation : < br > * < br > * c = & alpha ; * a * b < sup > H < / sup > < br > * c < sub > ij < / sub > = & alpha ; & sum ; < sub > k = 1 : n < / sub > { a < sub > ik < / sub > * b < sub > jk < / sub > } * @ param realAlpha Real component of scaling fac...
// TODO add a matrix vectory multiply here MatrixMatrixMult_ZDRM . multTransB ( realAlpha , imagAlpha , a , b , c ) ;
public class BeanDefinitionUtils { /** * Creates a bean definition for the specified bean name . If the parent context of the current context contains a * bean definition with the same name , the definition is created as a bean copy of the parent definition . This * method is useful for config parsers that want to ...
ApplicationContext parentContext = applicationContext . getParent ( ) ; BeanDefinition parentDefinition = null ; if ( parentContext != null && parentContext . getAutowireCapableBeanFactory ( ) instanceof ConfigurableListableBeanFactory ) { ConfigurableListableBeanFactory parentBeanFactory = ( ConfigurableListableBeanFa...
public class AbstractTagger { /** * 序列标注方法 , 输入输出为文件 * @ param input 输入文件 UTF8编码 * @ param output 输出文件 UTF8编码 */ public void tagFile ( String input , String output , String sep ) { } }
String s = tagFile ( input , "\n" ) ; try { OutputStreamWriter writer = new OutputStreamWriter ( new FileOutputStream ( output ) , "utf-8" ) ; BufferedWriter bw = new BufferedWriter ( writer ) ; bw . write ( s ) ; bw . close ( ) ; } catch ( Exception e ) { System . out . println ( "写输出文件错误" ) ; e . printStackTrace ( ) ...
public class FineUploader5Blobs { /** * The default name to be used for nameless Blobs . * @ param sDefaultName * New value . May neither be < code > null < / code > nor empty . * @ return this for chaining */ @ Nonnull public FineUploader5Blobs setDefaultName ( @ Nonnull @ Nonempty final String sDefaultName ) { ...
ValueEnforcer . notEmpty ( sDefaultName , "DefaultName" ) ; m_sBlobsDefaultName = sDefaultName ; return this ;
public class JKXmlHandler { public < T > T parse ( InputStream in , Class < ? > ... clas ) { } }
try { JAXBContext jaxbContext = JAXBContext . newInstance ( clas ) ; Unmarshaller jaxbUnmarshaller = jaxbContext . createUnmarshaller ( ) ; T t = ( T ) jaxbUnmarshaller . unmarshal ( in ) ; return t ; } catch ( JAXBException e ) { throw new JKException ( e ) ; }
public class JSONWriter { /** * Append a number value * @ param number * @ return */ public JSONWriter value ( Number number ) { } }
return number != null ? append ( number . toString ( ) ) : valueNull ( ) ;
public class CmsUgcSession { /** * Loads the existing edit resource . < p > * @ param fileName the resource file name * @ return the edit resource * @ throws CmsUgcException if reading the resource fails */ public CmsResource loadXmlContent ( String fileName ) throws CmsUgcException { } }
checkNotFinished ( ) ; checkEditResourceNotSet ( ) ; if ( fileName . contains ( "/" ) ) { String message = Messages . get ( ) . container ( Messages . ERR_INVALID_FILE_NAME_TO_LOAD_1 , fileName ) . key ( getCmsObject ( ) . getRequestContext ( ) . getLocale ( ) ) ; throw new CmsUgcException ( CmsUgcConstants . ErrorCode...
public class CPOptionCategoryUtil { /** * Returns the last cp option category in the ordered set where uuid = & # 63 ; . * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching cp option category , or < code > null...
return getPersistence ( ) . fetchByUuid_Last ( uuid , orderByComparator ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link ElementaryFunctionsType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "arccosh" ) public JAXBElement < ElementaryFunctionsType > createArccosh ( ElementaryFunctionsTyp...
return new JAXBElement < ElementaryFunctionsType > ( _Arccosh_QNAME , ElementaryFunctionsType . class , null , value ) ;
public class AttributeValue { /** * A set of strings . * Returns a reference to this object so that method calls can be chained together . * @ param sS A set of strings . * @ return A reference to this updated object so that method calls can be chained * together . */ public AttributeValue withSS ( java . util ...
if ( sS == null ) { this . sS = null ; } else { java . util . List < String > sSCopy = new java . util . ArrayList < String > ( sS . size ( ) ) ; sSCopy . addAll ( sS ) ; this . sS = sSCopy ; } return this ;
public class FileSystemView { /** * Creates a new directory at the given path . The given attributes will be set on the new file if * possible . */ public Directory createDirectory ( JimfsPath path , FileAttribute < ? > ... attrs ) throws IOException { } }
return ( Directory ) createFile ( path , store . directoryCreator ( ) , true , attrs ) ;
public class Projection { /** * Initialize base coordinates on Java2D screen . */ private void initBaseCoordsProjection ( ) { } }
baseScreenCoords = new int [ canvas . base . baseCoords . length ] [ 2 ] ; for ( int i = 0 ; i < canvas . base . dimension + 1 ; i ++ ) { double [ ] ratio = baseCoordsScreenProjectionRatio ( canvas . base . baseCoords [ i ] ) ; baseScreenCoords [ i ] [ 0 ] = ( int ) ( canvas . getWidth ( ) * ( canvas . margin + ( 1 - 2...
public class TextUtil { /** * Join the elements of the given array with the given join text . * @ param < T > is the type of the elements * @ param joinText the text to use for joining . * @ param elements the parts of text to join . * @ return the joining text */ @ Pure @ Inline ( value = "TextUtil.join($1, nu...
TextUtil . class , Arrays . class } ) public static < T > String join ( String joinText , @ SuppressWarnings ( "unchecked" ) T ... elements ) { return join ( joinText , null , null , elements ) ;
public class LabelService { /** * Returns the set of labels . * @ param queryParams The query parameters * @ return The set of labels */ public Collection < Label > list ( List < String > queryParams ) { } }
return HTTP . GET ( "/v2/labels.json" , null , queryParams , LABELS ) . get ( ) ;
public class IndexedCache { /** * Invalidate all entries which ( may ) overlap with the given geometry . * @ param envelope envelope to test */ public void invalidate ( Envelope envelope ) { } }
List < String > keys = index . getOverlappingKeys ( envelope ) ; if ( CacheIndexService . ALL_KEYS == keys ) { log . debug ( "clear all keys from cache" ) ; clear ( ) ; } else { log . debug ( "invalidate keys {}" , keys ) ; for ( String key : keys ) { remove ( key ) ; } }
public class LastaJobStarter { protected LaJobScheduler findAppScheduler ( ) { } }
final List < LaJobScheduler > schedulerList = new ArrayList < LaJobScheduler > ( ) ; // to check not found final List < String > derivedNameList = new ArrayList < String > ( ) ; // for exception message final NamingConvention convention = getNamingConvention ( ) ; for ( String root : convention . getRootPackageNames ( ...
public class CompiledTemplates { /** * Adds all transitively called templates to { @ code visited } */ private void collectTransitiveCallees ( TemplateData templateData , Set < TemplateData > visited ) { } }
if ( ! visited . add ( templateData ) ) { return ; // avoids chasing recursive cycles } for ( String callee : templateData . callees ) { collectTransitiveCallees ( getTemplateData ( callee ) , visited ) ; } for ( String delCallee : templateData . delCallees ) { // for { delcalls } we consider all possible targets for (...
public class ProxyBuilderDefaultImpl { /** * ( non - Javadoc ) * @ see * io . joynr . proxy . ProxyBuilder # setDiscoveryQos ( io . joynr . arbitration . DiscoveryQos */ @ Override public ProxyBuilder < T > setDiscoveryQos ( final DiscoveryQos discoveryQos ) throws DiscoveryException { } }
if ( discoveryQos . getDiscoveryTimeoutMs ( ) < 0 && discoveryQos . getDiscoveryTimeoutMs ( ) != DiscoveryQos . NO_VALUE ) { throw new DiscoveryException ( "Discovery timeout cannot be less than zero" ) ; } if ( discoveryQos . getRetryIntervalMs ( ) < 0 && discoveryQos . getRetryIntervalMs ( ) != DiscoveryQos . NO_VALU...
public class EventListenerListHelper { /** * Invokes the method with the given name on each of the listeners registered with this list * helper . The given arguments are passed to each method invocation . * @ param methodName The name of the method to be invoked on the listeners . * @ param eventArgs The argument...
Method eventMethod = ( Method ) methodCache . get ( new MethodCacheKey ( listenerClass , methodName , eventArgs . length ) ) ; Object [ ] listenersCopy = listeners ; for ( int i = 0 ; i < listenersCopy . length ; i ++ ) { try { eventMethod . invoke ( listenersCopy [ i ] , eventArgs ) ; } catch ( InvocationTargetExcepti...
public class ParallelIterate { /** * Returns a brand new ExecutorService using the specified poolName with the specified maximum thread pool size . The * same poolName may be used more than once resulting in multiple pools with the same name . * The pool will be initialised with newPoolSize threads . If that number...
return new ThreadPoolExecutor ( newPoolSize , newPoolSize , 0L , TimeUnit . MILLISECONDS , new SynchronousQueue < Runnable > ( ) , new CollectionsThreadFactory ( poolName , useDaemonThreads ) , new ThreadPoolExecutor . CallerRunsPolicy ( ) ) ;
public class ExpectExec { /** * { @ inheritDoc } * Upon creation , configure the input and output streams for the { @ link ExpectSupportImpl } * instance and * call the { @ link ExpectSupportImpl # execute ( ) } method . * @ return an execute instance */ @ Override protected Execute prepareExec ( ) { } }
Execute original = super . prepareExec ( ) ; Execute exec = new Execute ( this , createWatchdog ( ) ) { @ Override protected void waitFor ( Process process ) { try { expectSupport . execute ( ) ; if ( destroyProcess ) { process . destroy ( ) ; } } catch ( Exception e ) { process . destroy ( ) ; throw new BuildException...
public class ServersInner { /** * Creates or updates a server . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param parameters The requested ser...
return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , parameters ) . map ( new Func1 < ServiceResponse < ServerInner > , ServerInner > ( ) { @ Override public ServerInner call ( ServiceResponse < ServerInner > response ) { return response . body ( ) ; } } ) ;
public class SchemaToJava { /** * Bind to the directory , read and process the schema */ private static ObjectSchema readSchema ( String url , String user , String pass , SyntaxToJavaClass syntaxToJavaClass , Set < String > binarySet , Set < String > objectClasses ) throws NamingException , ClassNotFoundException { } }
// Set up environment Hashtable < String , String > env = new Hashtable < String , String > ( ) ; env . put ( Context . PROVIDER_URL , url ) ; env . put ( Context . INITIAL_CONTEXT_FACTORY , "com.sun.jndi.ldap.LdapCtxFactory" ) ; if ( user != null ) { env . put ( Context . SECURITY_PRINCIPAL , user ) ; } if ( pass != n...
public class AddressbookQuery { /** * Limit the number of results in the response , if supported by the server . A negative value will remove the limit . * @ param limit * The maximum number of result in the response if this is a positive integer . * @ return This instance . */ public AddressbookQuery limitNumber...
if ( limit > 0 ) { addLimit ( WebDavSearch . NRESULTS , limit ) ; } else { removeLimit ( WebDavSearch . NRESULTS ) ; } return this ;
public class ConfigurationsInner { /** * List all the configurations in a given server . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ throws Il...
return listByServerWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < List < ConfigurationInner > > , List < ConfigurationInner > > ( ) { @ Override public List < ConfigurationInner > call ( ServiceResponse < List < ConfigurationInner > > response ) { return response . bod...
public class UpdateObjectAttributesRequest { /** * The attributes update structure . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setAttributeUpdates ( java . util . Collection ) } or { @ link # withAttributeUpdates ( java . util . Collection ) } if you ...
if ( this . attributeUpdates == null ) { setAttributeUpdates ( new java . util . ArrayList < ObjectAttributeUpdate > ( attributeUpdates . length ) ) ; } for ( ObjectAttributeUpdate ele : attributeUpdates ) { this . attributeUpdates . add ( ele ) ; } return this ;
public class ProjectResolver { /** * Returns the directory containing rules . * @ param rootModule The root module of the project . * @ param rulesDirectory The name of the directory used for identifying the root module . * @ return The file representing the directory . */ static File getRulesDirectory ( MavenPro...
File rules = new File ( rulesDirectory ) ; return rules . isAbsolute ( ) ? rules : new File ( rootModule . getBasedir ( ) . getAbsolutePath ( ) + File . separator + rulesDirectory ) ;
public class BinderExtension { /** * / * @ Override */ public < S , T > T convertTo ( ConverterKey < S , T > key , Object object ) { } }
return BINDING . convertTo ( key , object ) ;
public class AmazonTranslateClient { /** * Creates or updates a custom terminology , depending on whether or not one already exists for the given terminology * name . Importing a terminology with the same name as an existing one will merge the terminologies based on the * chosen merge strategy . Currently , the onl...
request = beforeClientExecution ( request ) ; return executeImportTerminology ( request ) ;
public class BuildContext { /** * Replaces the given global variable with the given value . The flag * indicates whether or not the variable should be marked as final . Note , * however , that this routine does not respect the final flag and replaces * the value unconditionally . The function returns the old valu...
assert ( name != null ) ; GlobalVariable oldVariable = globalVariables . get ( name ) ; GlobalVariable newVariable = new GlobalVariable ( finalFlag , value ) ; globalVariables . put ( name , newVariable ) ; return oldVariable ;
public class GeoPackageCoreCache { /** * Close the GeoPackage if it is cached ( same GeoPackage instance ) * @ param geoPackage * GeoPackage * @ return true if closed * @ since 3.1.0 */ public boolean closeIfCached ( T geoPackage ) { } }
boolean closed = false ; if ( geoPackage != null ) { T cached = get ( geoPackage . getName ( ) ) ; if ( cached != null && cached == geoPackage ) { closed = close ( geoPackage . getName ( ) ) ; } } return closed ;
public class UserHandlerImpl { /** * Notifying listeners before user deletion . * @ param user * the user which is used in delete operation * @ throws Exception * if any listener failed to handle the event */ private void preDelete ( User user ) throws Exception { } }
for ( UserEventListener listener : listeners ) { listener . preDelete ( user ) ; }
public class Console { /** * Writes a formatted string to the console using * the specified format string and arguments . * @ param format the format string ( see { @ link java . util . Formatter # format } ) * @ param args * the list of arguments passed to the formatter . If there are * more arguments than r...
try ( Formatter f = new Formatter ( writer ) ) { f . format ( format , args ) ; f . flush ( ) ; return this ; }
public class ResultMatchers { /** * Matches if the result has exactly one failure , and it contains { @ code string } */ public static Matcher < Object > hasSingleFailureContaining ( final String string ) { } }
return new BaseMatcher < Object > ( ) { public boolean matches ( Object item ) { return item . toString ( ) . contains ( string ) && failureCountIs ( 1 ) . matches ( item ) ; } public void describeTo ( Description description ) { description . appendText ( "has single failure containing " + string ) ; } } ;
public class AbstractLongObjectMap { /** * Returns the first key the given value is associated with . * It is often a good idea to first check with { @ link # containsValue ( Object ) } whether there exists an association from a key to this value . * Search order is guaranteed to be < i > identical < / i > to the o...
final long [ ] foundKey = new long [ 1 ] ; boolean notFound = forEachPair ( new LongObjectProcedure ( ) { public boolean apply ( long iterKey , Object iterValue ) { boolean found = value == iterValue ; if ( found ) foundKey [ 0 ] = iterKey ; return ! found ; } } ) ; if ( notFound ) return Long . MIN_VALUE ; return foun...
public class ODatabasePojoAbstract { /** * Register a new POJO */ public void registerUserObject ( final Object iObject , final ORecordInternal < ? > iRecord ) { } }
if ( ! ( iRecord instanceof ODocument ) ) return ; final ODocument doc = ( ODocument ) iRecord ; if ( retainObjects ) { if ( iObject != null ) { objects2Records . put ( iObject , doc ) ; records2Objects . put ( doc , ( T ) iObject ) ; OObjectSerializerHelper . setObjectID ( iRecord . getIdentity ( ) , iObject ) ; OObje...
public class CartesianCategoryTicks { /** * Write the options of cartesian category ticks * @ return options as JSON object * @ throws java . io . IOException If an I / O error occurs */ @ Override public String encode ( ) throws IOException { } }
FastStringWriter fsw = new FastStringWriter ( ) ; try { fsw . write ( super . encode ( ) ) ; ChartUtils . writeDataValue ( fsw , "labels" , this . labels , true ) ; ChartUtils . writeDataValue ( fsw , "min" , this . min , true ) ; ChartUtils . writeDataValue ( fsw , "max" , this . max , true ) ; } finally { fsw . close...
public class OgmTableGenerator { /** * Used in the cases where { @ link # determineSegmentValue } is unable to * determine the value to use . * @ param params The params supplied in the generator config ( plus some standard useful extras ) . * @ return The default segment value to use . */ protected String determ...
boolean preferSegmentPerEntity = ConfigurationHelper . getBoolean ( CONFIG_PREFER_SEGMENT_PER_ENTITY , params , false ) ; String defaultToUse = preferSegmentPerEntity ? params . getProperty ( PersistentIdentifierGenerator . TABLE ) : DEF_SEGMENT_VALUE ; log . infof ( "explicit segment value for id generator [%1$s.%2$s]...
public class CheckParameterizables { /** * Validate all " Parameterizable " objects for parts of the API contract that * cannot be specified in Java interfaces ( such as constructors , static * methods ) */ public void checkParameterizables ( ) { } }
LoggingConfiguration . setVerbose ( Level . VERBOSE ) ; knownParameterizables = new ArrayList < > ( ) ; try { Enumeration < URL > us = getClass ( ) . getClassLoader ( ) . getResources ( ELKIServiceLoader . RESOURCE_PREFIX ) ; while ( us . hasMoreElements ( ) ) { URL u = us . nextElement ( ) ; if ( "file" . equals ( u ....
public class SimpleHadoopFilesystemConfigStore { /** * Retrieves all the { @ link ConfigKeyPath } s that are imported by the given { @ link ConfigKeyPath } . This method does this * by reading the { @ link # INCLUDES _ CONF _ FILE _ NAME } file associated with the dataset specified by the given * { @ link ConfigKey...
Preconditions . checkNotNull ( configKey , "configKey cannot be null!" ) ; Preconditions . checkArgument ( ! Strings . isNullOrEmpty ( version ) , "version cannot be null or empty!" ) ; List < ConfigKeyPath > configKeyPaths = new ArrayList < > ( ) ; Path datasetDir = getDatasetDirForKey ( configKey , version ) ; Path i...
public class MindMapTreePanel { /** * GEN - LAST : event _ buttonExpandAllActionPerformed */ private void buttonCollapseAllActionPerformed ( java . awt . event . ActionEvent evt ) { } }
// GEN - FIRST : event _ buttonCollapseAllActionPerformed Utils . foldUnfoldTree ( this . treeMindMap , false ) ;
public class DelegatingClassResolver { /** * { @ inheritDoc } */ public Class < ? > resolveClass ( final String classname ) throws ClassNotFoundException { } }
LOGGER . trace ( "Try to resolve {} from {} resolvers" , classname , resolvers . size ( ) ) ; for ( IClassResolver resolver : resolvers ) { try { Class < ? > candidate = resolver . resolveClass ( classname ) ; if ( candidate != null ) { return candidate ; } } catch ( ClassNotFoundException e ) { LOGGER . trace ( "Class...
public class CmsJspStandardContextBean { /** * Returns the container page bean for the give page and locale . < p > * @ param page the container page resource as id , path or already as resource * @ param locale the content locale as locale or string * @ return the container page bean */ public CmsContainerPageBe...
CmsResource pageResource = null ; CmsContainerPageBean result = null ; if ( m_cms != null ) { try { pageResource = CmsJspElFunctions . convertRawResource ( m_cms , page ) ; Locale l = CmsJspElFunctions . convertLocale ( locale ) ; result = getPage ( pageResource ) ; if ( result != null ) { CmsADEConfigData adeConfig = ...
public class BatchGetApplicationRevisionsResult { /** * Additional information about the revisions , including the type and location . * @ param revisions * Additional information about the revisions , including the type and location . */ public void setRevisions ( java . util . Collection < RevisionInfo > revision...
if ( revisions == null ) { this . revisions = null ; return ; } this . revisions = new com . amazonaws . internal . SdkInternalList < RevisionInfo > ( revisions ) ;
public class Maxent { /** * Returns the dot product between weight vector and x ( augmented with 1 ) . */ private static double dot ( int [ ] x , double [ ] w , int j , int p ) { } }
int pos = j * ( p + 1 ) ; double dot = w [ pos + p ] ; for ( int i : x ) { dot += w [ pos + i ] ; } return dot ;
public class URL { /** * Makes a copy of a given URL with some additional components . * @ param protocol protocol name * @ return a copy of a given URL with some additional components */ public URL copyWithProtocol ( String protocol ) { } }
return new URL ( protocol , this . adapterAddress , this . deviceAddress , this . deviceAttributes , this . serviceUUID , this . characteristicUUID , this . fieldName ) ;
public class ServiceEndpointPoliciesInner { /** * Gets the specified service Endpoint Policies in a specified resource group . * @ param resourceGroupName The name of the resource group . * @ param serviceEndpointPolicyName The name of the service endpoint policy . * @ param expand Expands referenced resources . ...
return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , serviceEndpointPolicyName , expand ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ResultInterpreter { /** * Interprets the class results . * @ return All REST resources */ public Resources interpret ( final Set < ClassResult > classResults ) { } }
resources = new Resources ( ) ; resources . setBasePath ( PathNormalizer . getApplicationPath ( classResults ) ) ; javaTypeAnalyzer = new JavaTypeAnalyzer ( resources . getTypeRepresentations ( ) ) ; dynamicTypeAnalyzer = new DynamicTypeAnalyzer ( resources . getTypeRepresentations ( ) ) ; stringParameterResolver = new...
public class AdminFailureurlAction { private HtmlResponse asListHtml ( ) { } }
return asHtml ( path_AdminFailureurl_AdminFailureurlJsp ) . renderWith ( data -> { RenderDataUtil . register ( data , "failureUrlItems" , failureUrlService . getFailureUrlList ( failureUrlPager ) ) ; // page navi } ) . useForm ( SearchForm . class , setup -> { setup . setup ( form -> { copyBeanToBean ( failureUrlPager ...
public class ParameterImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case XtextPackage . PARAMETER__NAME : return getName ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class Context { /** * Find the outermost context from this one . * @ return The outermost context . */ public Context getGlobal ( ) { } }
Context op = this ; while ( op . outer != null ) { op = op . outer ; } return op ;
public class DistributionUpdater { /** * Downloads the given artifact , extracts it and replaces current Windup directory ( as given by PathUtil ) * with the content from the artifact ( assuming it really is a Windup distribution zip ) . */ public void replaceWindupDirectoryWithDistribution ( Coordinate distCoordinat...
try { final CoordinateBuilder coord = CoordinateBuilder . create ( distCoordinate ) ; File tempFolder = OperatingSystemUtils . createTempDir ( ) ; this . updater . extractArtifact ( coord , tempFolder ) ; File newDistWindupDir = getWindupDistributionSubdir ( tempFolder ) ; if ( null == newDistWindupDir ) throw new Wind...
public class ViewNode { /** * 增加子节点 * @ param child * @ throws java . lang . IllegalArgumentException */ public void addChild ( ViewNode child ) throws IllegalArgumentException { } }
tree . addNode ( child ) ; child . setParent ( this ) ; this . leaf = false ; // 一旦增加子节点 , 该节点就不是叶了 。 int n = children . size ( ) ; if ( n > 0 ) { ViewNode node = ( ViewNode ) children . get ( n - 1 ) ; node . setLast ( false ) ; } child . setLast ( true ) ; children . add ( child ) ;
public class RunGraphResponse { /** * < code > optional . tensorflow . CostGraphDef cost _ graph = 3 ; < / code > */ public org . tensorflow . framework . CostGraphDef getCostGraph ( ) { } }
return costGraph_ == null ? org . tensorflow . framework . CostGraphDef . getDefaultInstance ( ) : costGraph_ ;
public class LetNode { /** * Visits this node , the variable list , and if present , the body * expression or statement . */ @ Override public void visit ( NodeVisitor v ) { } }
if ( v . visit ( this ) ) { variables . visit ( v ) ; if ( body != null ) { body . visit ( v ) ; } }
public class CmsDriverManager { /** * Deletes a project . < p > * Only the admin or the owner of the project can do this . * @ param dbc the current database context * @ param deleteProject the project to be deleted * @ throws CmsException if something goes wrong */ public void deleteProject ( CmsDbContext dbc ...
deleteProject ( dbc , deleteProject , true ) ;
public class DestinationTools { /** * Check the validity of a queue name */ public static void checkQueueName ( String queueName ) throws JMSException { } }
if ( queueName == null ) throw new FFMQException ( "Queue name is not set" , "INVALID_DESTINATION_NAME" ) ; if ( queueName . length ( ) > FFMQConstants . MAX_QUEUE_NAME_SIZE ) throw new FFMQException ( "Queue name '" + queueName + "' is too long (" + queueName . length ( ) + " > " + FFMQConstants . MAX_QUEUE_NAME_SIZE ...
public class PackageManagerUtils { /** * Checks if the device has a jazzhand multi touch screen . * @ param context the context . * @ return { @ code true } if the device has a jazzhand multi touch screen . */ @ TargetApi ( Build . VERSION_CODES . GINGERBREAD ) public static boolean hasJazzhandMultiTouchScreenFeatu...
return hasJazzhandMultiTouchScreenFeature ( context . getPackageManager ( ) ) ;
public class InitiateDeviceClaimRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( InitiateDeviceClaimRequest initiateDeviceClaimRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( initiateDeviceClaimRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( initiateDeviceClaimRequest . getDeviceId ( ) , DEVICEID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JS...
public class ApiOvhEmaildomain { /** * Create new responder in server * REST : POST / email / domain / { domain } / responder * @ param copyTo [ required ] Account where copy emails * @ param account [ required ] Account of domain * @ param from [ required ] Date of start responder * @ param content [ require...
String qPath = "/email/domain/{domain}/responder" ; StringBuilder sb = path ( qPath , domain ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "account" , account ) ; addBody ( o , "content" , content ) ; addBody ( o , "copy" , copy ) ; addBody ( o , "copyTo" , copyTo ) ; addBody (...
public class BundleUtils { /** * Returns a optional { @ link android . util . SparseArray } value . In other words , returns the value mapped by key if it exists and is a { @ link android . util . SparseArray } . * The bundle argument is allowed to be { @ code null } . If the bundle is null , this method returns null...
if ( bundle == null ) { return fallback ; } return bundle . getSparseParcelableArray ( key ) ;
public class CmsTabbedPanel { /** * Enables the tab with the given index . < p > * @ param tabContent the content of the tab that should be enabled */ public void enableTab ( E tabContent ) { } }
Integer index = new Integer ( m_tabPanel . getWidgetIndex ( tabContent ) ) ; Element tab = getTabElement ( index . intValue ( ) ) ; if ( ( tab != null ) && m_disabledTabIndexes . containsKey ( index ) ) { tab . removeClassName ( I_CmsLayoutBundle . INSTANCE . tabbedPanelCss ( ) . tabDisabled ( ) ) ; tab . setTitle ( m_...
public class TypeIntoStep { /** * { @ inheritDoc } */ @ Override public void setVariables ( Map < String , String > variables ) { } }
injectVariables ( variables , element ) ; if ( keysVariable != null ) { keys = keysVariable . getConvertedValue ( variables ) ; }
public class GZipUtils { /** * 数据压缩 * @ param data * @ throws Exception */ public static byte [ ] compress ( byte [ ] data ) throws Exception { } }
ByteArrayInputStream bais = new ByteArrayInputStream ( data ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; compress ( bais , baos ) ; byte [ ] output = baos . toByteArray ( ) ; baos . flush ( ) ; baos . close ( ) ; bais . close ( ) ; return output ;