signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class JSONStringer { /** * Inserts any necessary separators and whitespace before a name . Also
* adjusts the stack to expect the key ' s value . */
private void beforeKey ( ) throws JSONException { } } | Scope context = peek ( ) ; if ( context == Scope . NONEMPTY_OBJECT ) { // first in object
out . append ( ',' ) ; } else if ( context != Scope . EMPTY_OBJECT ) { // not in an object !
throw new JSONException ( "Nesting problem" ) ; } newline ( ) ; replaceTop ( Scope . DANGLING_KEY ) ; |
public class RxApollo { /** * Converts an { @ link ApolloCall } to a Observable . The number of emissions this Observable will have is based on the
* { @ link ResponseFetcher } used with the call .
* @ param call the ApolloCall to convert
* @ param < T > the value type
* @ param backpressureMode The { @ link rx... | checkNotNull ( call , "call == null" ) ; return Observable . create ( new Action1 < Emitter < Response < T > > > ( ) { @ Override public void call ( final Emitter < Response < T > > emitter ) { final AtomicBoolean canceled = new AtomicBoolean ( ) ; emitter . setCancellation ( new Cancellable ( ) { @ Override public voi... |
public class ListFacetNamesResult { /** * The names of facets that exist within the schema .
* @ param facetNames
* The names of facets that exist within the schema . */
public void setFacetNames ( java . util . Collection < String > facetNames ) { } } | if ( facetNames == null ) { this . facetNames = null ; return ; } this . facetNames = new java . util . ArrayList < String > ( facetNames ) ; |
public class NelsonData { /** * Fourteen ( or more ) points in a row alternate in direction , increasing then decreasing */
private boolean rule4 ( Double sample ) { } } | if ( null == rule4PreviousSample || sample . doubleValue ( ) == rule4PreviousSample . doubleValue ( ) ) { rule4PreviousSample = sample ; rule4PreviousDirection = "=" ; rule4Count = 0 ; return false ; } String sampleDirection = ( sample > rule4PreviousSample ) ? ">" : "<" ; if ( sampleDirection . equals ( rule4PreviousD... |
public class CommitManager { /** * It stops tracking keys committed .
* @ param track Flag to stop tracking keys for local site state transfer or for remote site state transfer . */
public final void stopTrack ( Flag track ) { } } | setTrack ( track , false ) ; if ( ! trackStateTransfer && ! trackXSiteStateTransfer ) { if ( trace ) { log . tracef ( "Tracking is disabled. Clear tracker: %s" , tracker ) ; } tracker . clear ( ) ; } else { for ( Iterator < Map . Entry < Object , DiscardPolicy > > iterator = tracker . entrySet ( ) . iterator ( ) ; iter... |
public class dnszone { /** * Use this API to unset the properties of dnszone resources .
* Properties that need to be unset are specified in args array . */
public static base_responses unset ( nitro_service client , String zonename [ ] , String args [ ] ) throws Exception { } } | base_responses result = null ; if ( zonename != null && zonename . length > 0 ) { dnszone unsetresources [ ] = new dnszone [ zonename . length ] ; for ( int i = 0 ; i < zonename . length ; i ++ ) { unsetresources [ i ] = new dnszone ( ) ; unsetresources [ i ] . zonename = zonename [ i ] ; } result = unset_bulk_request ... |
public class Manager { /** * Returns the database with the given name , or null if it doesn ' t exist .
* Multiple calls with the same name will return the same { @ link Database } instance .
* This is equivalent to calling { @ link # openDatabase ( String , DatabaseOptions ) }
* with a default set of options . *... | DatabaseOptions options = getDefaultOptions ( name ) ; return openDatabase ( name , options ) ; |
public class SimpleIoc { /** * Register @ Bean marked objects */
private Object put ( String name , Class < ? > beanClass , boolean isSingleton ) { } } | BeanDefine beanDefine = this . createBeanDefine ( beanClass , isSingleton ) ; if ( pool . put ( name , beanDefine ) != null ) { log . warn ( "Duplicated Bean: {}" , name ) ; } // add interface 、 put to pool
Class < ? > [ ] interfaces = beanClass . getInterfaces ( ) ; if ( interfaces . length > 0 ) { for ( Class < ? > i... |
public class ClassPathBuilder { /** * Add worklist items from given extensions directory .
* @ param workList
* the worklist
* @ param extDir
* an extensions directory */
private void addWorkListItemsForExtDir ( LinkedList < WorkListItem > workList , String extDir ) { } } | File dir = new File ( extDir ) ; File [ ] fileList = dir . listFiles ( ( FileFilter ) pathname -> { String path = pathname . getPath ( ) ; boolean isArchive = Archive . isArchiveFileName ( path ) ; return isArchive ; } ) ; if ( fileList == null ) { return ; } for ( File archive : fileList ) { addToWorkList ( workList ,... |
public class ZoneNameProviderSPI { /** * ~ Methoden - - - - - */
@ Override public Set < String > getPreferredIDs ( Locale locale , boolean smart ) { } } | String country = FormatUtils . getRegion ( locale ) ; if ( smart ) { if ( country . equals ( "US" ) ) { Set < String > tzids = new LinkedHashSet < > ( ) ; tzids . add ( "America/New_York" ) ; tzids . add ( "America/Chicago" ) ; tzids . add ( "America/Denver" ) ; tzids . add ( "America/Los_Angeles" ) ; tzids . add ( "Am... |
public class MatlabSparseMatrixBuilder { /** * Returns a temporary file that will be deleted on JVM exit .
* @ return a temporary file used to store a matrix */
private static File getTempMatrixFile ( ) { } } | File tmp = null ; try { tmp = File . createTempFile ( "matlab-sparse-matrix" , ".dat" ) ; } catch ( IOException ioe ) { throw new IOError ( ioe ) ; } tmp . deleteOnExit ( ) ; return tmp ; |
public class BookmarkManager { /** * Returns all currently bookmarked conferences .
* @ return returns all currently bookmarked conferences
* @ throws XMPPErrorException
* @ throws NoResponseException
* @ throws NotConnectedException
* @ throws InterruptedException
* @ see BookmarkedConference */
public Lis... | retrieveBookmarks ( ) ; return Collections . unmodifiableList ( bookmarks . getBookmarkedConferences ( ) ) ; |
public class StatementManager { /** * Links a session with a registered compiled statement . If this session has
* not already been linked with the given statement , then the statement use
* count is incremented .
* @ param csid the compiled statement identifier
* @ param sessionID the session identifier */
pri... | LongKeyIntValueHashMap scsMap ; scsMap = ( LongKeyIntValueHashMap ) sessionUseMap . get ( sessionID ) ; if ( scsMap == null ) { scsMap = new LongKeyIntValueHashMap ( ) ; sessionUseMap . put ( sessionID , scsMap ) ; } int count = scsMap . get ( csid , 0 ) ; scsMap . put ( csid , count + 1 ) ; if ( count == 0 ) { useMap ... |
public class AdminWebauthAction { @ Execute public HtmlResponse details ( final int crudMode , final String id ) { } } | verifyCrudMode ( crudMode , CrudMode . DETAILS ) ; saveToken ( ) ; return asHtml ( path_AdminWebauth_AdminWebauthDetailsJsp ) . useForm ( EditForm . class , op -> { op . setup ( form -> { webAuthenticationService . getWebAuthentication ( id ) . ifPresent ( entity -> { copyBeanToBean ( entity , form , copyOp -> { copyOp... |
public class DefaultNotifyHandler { /** * This is for non - Camel style event handlers .
* It is not used here . Overriding has no effect in the context of a Camel route . */
public String handleEventMessage ( String message , Object messageObj , Map < String , String > metaInfo ) throws EventHandlerException { } } | return null ; |
public class ElemVariable { /** * If the children of a variable is a single xsl : value - of or text literal ,
* it is cheaper to evaluate this as an expression , so try and adapt the
* child an an expression .
* @ param varElem Should be a ElemParam , ElemVariable , or ElemWithParam .
* @ return An XPath if re... | ElemTemplateElement t = varElem . getFirstChildElem ( ) ; // Down the line this can be done with multiple string objects using
// the concat function .
if ( null != t && null == t . getNextSiblingElem ( ) ) { int etype = t . getXSLToken ( ) ; if ( Constants . ELEMNAME_VALUEOF == etype ) { ElemValueOf valueof = ( ElemVa... |
public class PersistentExecutorImpl { /** * Returns the execution properties for the specified task .
* @ param task Callable or Runnable which might or might not implement ManagedTask .
* @ return the execution properties for the specified task . */
@ Trivial Map < String , String > getExecutionProperties ( Object... | Map < String , String > execProps = task instanceof ManagedTask ? ( ( ManagedTask ) task ) . getExecutionProperties ( ) : null ; if ( execProps == null ) execProps = defaultExecProps ; else { Map < String , String > mergedProps = new TreeMap < String , String > ( defaultExecProps ) ; mergedProps . putAll ( execProps ) ... |
public class EsigateServer { /** * Get an integer from System properties
* @ param prefix
* @ param name
* @ param defaultValue
* @ return */
private static int getProperty ( String prefix , String name , int defaultValue ) { } } | int result = defaultValue ; try { result = Integer . parseInt ( System . getProperty ( prefix + name ) ) ; } catch ( NumberFormatException e ) { LOG . warn ( "Value for " + prefix + name + " must be an integer. Using default " + defaultValue ) ; } return result ; |
public class TimeToLiveSpecificationMarshaller { /** * Marshall the given parameter object . */
public void marshall ( TimeToLiveSpecification timeToLiveSpecification , ProtocolMarshaller protocolMarshaller ) { } } | if ( timeToLiveSpecification == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( timeToLiveSpecification . getEnabled ( ) , ENABLED_BINDING ) ; protocolMarshaller . marshall ( timeToLiveSpecification . getAttributeName ( ) , ATTRIBUTENAME_BIN... |
public class StorageUtil { /** * reads 2 XML Element Attribute ans cast it to a Credential
* @ param el XML Element to read Attribute from it
* @ param attributeUser Name of the user Attribute to read
* @ param attributePassword Name of the password Attribute to read
* @ param defaultCredentials
* @ return At... | String user = el . getAttribute ( attributeUser ) ; String pass = el . getAttribute ( attributePassword ) ; if ( user == null ) return defaultCredentials ; if ( pass == null ) pass = "" ; return CredentialsImpl . toCredentials ( user , pass ) ; |
public class XmlStreamReaderUtils { /** * Returns the value of an attribute as a byte . If the attribute is empty , this method returns
* the default value provided .
* @ param reader
* < code > XMLStreamReader < / code > that contains attribute values .
* @ param localName
* local name of attribute ( the nam... | return optionalByteAttribute ( reader , null , localName , defaultValue ) ; |
public class Search { /** * Queries a Search Index and returns grouped results in a map where key
* of the map is the groupName . In case the query didnt use grouping ,
* an empty map is returned
* @ param < T > Object type T
* @ param query the Lucene query to be passed to the Search index
* @ param classOfT... | InputStream instream = null ; try { Reader reader = new InputStreamReader ( instream = queryForStream ( query ) , "UTF-8" ) ; JsonObject json = new JsonParser ( ) . parse ( reader ) . getAsJsonObject ( ) ; Map < String , List < T > > result = new LinkedHashMap < String , List < T > > ( ) ; if ( json . has ( "groups" ) ... |
public class LocalSubmissionFromCS { /** * Takes the local job submission configuration file , deserializes it , and creates submission object . */
static LocalSubmissionFromCS fromSubmissionParameterFiles ( final File localJobSubmissionParametersFile , final File localAppSubmissionParametersFile ) throws IOException {... | final AvroLocalAppSubmissionParameters localAppSubmissionParameters ; final AvroLocalJobSubmissionParameters localJobSubmissionParameters ; try ( final FileInputStream fileInputStream = new FileInputStream ( localJobSubmissionParametersFile ) ) { final JsonDecoder decoder = DecoderFactory . get ( ) . jsonDecoder ( Avro... |
public class ExecutionGraph { /** * Deserializes accumulators from a task state update .
* < p > This method never throws an exception !
* @ param state The task execution state from which to deserialize the accumulators .
* @ return The deserialized accumulators , of null , if there are no accumulators or an err... | AccumulatorSnapshot serializedAccumulators = state . getAccumulators ( ) ; if ( serializedAccumulators != null ) { try { return serializedAccumulators . deserializeUserAccumulators ( userClassLoader ) ; } catch ( Throwable t ) { // we catch Throwable here to include all form of linking errors that may
// occur if user ... |
public class ProxyFactory { /** * 构建代理类实例
* @ param proxyType 代理类型
* @ param clazz 原始类
* @ param proxyInvoker 代码执行的Invoker
* @ param < T > 类型
* @ return 代理类实例
* @ throws Exception */
public static < T > T buildProxy ( String proxyType , Class < T > clazz , Invoker proxyInvoker ) throws Exception { } } | try { ExtensionClass < Proxy > ext = ExtensionLoaderFactory . getExtensionLoader ( Proxy . class ) . getExtensionClass ( proxyType ) ; if ( ext == null ) { throw ExceptionUtils . buildRuntime ( "consumer.proxy" , proxyType , "Unsupported proxy of client!" ) ; } Proxy proxy = ext . getExtInstance ( ) ; return proxy . ge... |
public class MessageBean { /** * Set error location in source document .
* @ param elem source element .
* @ return message bean with location set */
public MessageBean setLocation ( final Element elem ) { } } | final MessageBean ret = new MessageBean ( this ) ; final String xtrf = elem . getAttribute ( ATTRIBUTE_NAME_XTRF ) ; if ( ! xtrf . isEmpty ( ) ) { ret . srcFile = toURI ( xtrf ) ; } final String xtrc = elem . getAttribute ( ATTRIBUTE_NAME_XTRC ) ; if ( ! xtrc . isEmpty ( ) ) { final int sep = xtrc . indexOf ( ';' ) ; i... |
public class RepositoryMetadataMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RepositoryMetadata repositoryMetadata , ProtocolMarshaller protocolMarshaller ) { } } | if ( repositoryMetadata == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( repositoryMetadata . getAccountId ( ) , ACCOUNTID_BINDING ) ; protocolMarshaller . marshall ( repositoryMetadata . getRepositoryId ( ) , REPOSITORYID_BINDING ) ; prot... |
public class TemplateBase { /** * Set output file
* @ param file */
protected void __setOutput ( File file ) { } } | try { w_ = new BufferedWriter ( new FileWriter ( file ) ) ; } catch ( Exception e ) { throw new FastRuntimeException ( e . getMessage ( ) ) ; } |
public class ClassLoader { /** * Defines a package by name in this < tt > ClassLoader < / tt > . This allows
* class loaders to define the packages for their classes . Packages must
* be created before the class is defined , and package names must be
* unique within a class loader and cannot be redefined or chang... | synchronized ( packages ) { Package pkg = packages . get ( name ) ; if ( pkg != null ) { throw new IllegalArgumentException ( name ) ; } pkg = new Package ( name , specTitle , specVersion , specVendor , implTitle , implVersion , implVendor , sealBase , this ) ; packages . put ( name , pkg ) ; return pkg ; } |
public class StanzaCollector { /** * Polls to see if a stanza is currently available and returns it , or
* immediately returns < tt > null < / tt > if no packets are currently in the
* result queue .
* Throws an XMPPErrorException in case the polled stanzas did contain an XMPPError .
* @ param < P > type of the... | P result = pollResult ( ) ; if ( result != null ) { XMPPErrorException . ifHasErrorThenThrow ( result ) ; } return result ; |
public class JsonRpcResponse { /** * Builds a new response for an identifier request and containing an error .
* @ param error the error to return to the user
* @ param id the identifier of the request for which this response if
* generated */
static JsonRpcResponse error ( JsonRpcError error , JsonElement id ) {... | return new JsonRpcResponse ( id , error , null ) ; |
public class PathCompiler { /** * Parse the parameters of a function call , either the caller has supplied JSON data , or the caller has supplied
* another path expression which must be evaluated and in turn invoked against the root document . In this tokenizer
* we ' re only concerned with parsing the path thus th... | ParamType type = null ; // Parenthesis starts at 1 since we ' re marking the start of a function call , the close paren will denote the
// last parameter boundary
Integer groupParen = 1 , groupBracket = 0 , groupBrace = 0 , groupQuote = 0 ; Boolean endOfStream = false ; char priorChar = 0 ; List < Parameter > parameter... |
public class Utils { /** * Ensures that an object reference passed as a parameter to the calling method is not null .
* @ param value an object reference
* @ param varName the variable name to use in an exception message if the check fails
* @ return the non - null reference that was validated
* @ throws NullPo... | if ( value == null ) { throw new NullPointerException ( format ( "{} cannot be null" , varName ) ) ; } return value ; |
public class SessionContextRegistry { /** * removes the sessioncontext from the registry */
public static synchronized void remove ( String appname ) { } } | if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_CORE . logp ( Level . FINE , methodClassName , "remove" , appname ) ; } scrSessionContexts . remove ( appname ) ; |
public class BlockingList { /** * Get a point - in - time view of the unmatched keys .
* This may be immediately out of date unless additional
* synchronization is performed to prevent concurrent updates . */
public Set < K > getUnmatchedKeys ( ) { } } | stateLock . readLock ( ) . lock ( ) ; try { return new HashSet < K > ( this . actualIndices . keySet ( ) ) ; } finally { stateLock . readLock ( ) . unlock ( ) ; } |
public class FileUtil { /** * 从文件中读取每一行数据
* @ param < T > 集合类型
* @ param url 文件的URL
* @ param charset 字符集
* @ param collection 集合
* @ return 文件中的每行内容的集合
* @ throws IORuntimeException IO异常
* @ since 3.1.1 */
public static < T extends Collection < String > > T readLines ( URL url , Charset charset , T colle... | InputStream in = null ; try { in = url . openStream ( ) ; return IoUtil . readLines ( in , charset , collection ) ; } catch ( IOException e ) { throw new IORuntimeException ( e ) ; } finally { IoUtil . close ( in ) ; } |
public class ServiceObjectivesInner { /** * Gets a database service objective .
* @ 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 serviceObjec... | return ServiceFuture . fromResponse ( getWithServiceResponseAsync ( resourceGroupName , serverName , serviceObjectiveName ) , serviceCallback ) ; |
public class TimeShift { /** * Adjusts the timestamp of each datapoint by timeshift
* @ param points The data points to factor
* @ param timeshift The factor to multiply by
* @ return The resulting data points */
DataPoints shift ( final DataPoints points , final long timeshift ) { } } | // TODO ( cl ) - Using an array as the size function may not return the exact
// results and we should figure a way to avoid copying data anyway .
final List < DataPoint > dps = new ArrayList < DataPoint > ( ) ; for ( DataPoint pt : points ) { dps . add ( shift ( pt , timeshift ) ) ; } final DataPoint [ ] results = new... |
public class LongGauge { /** * Returns the no - op implementation of the { @ code LongGauge } .
* @ return the no - op implementation of the { @ code LongGauge } .
* @ since 0.17 */
static LongGauge newNoopLongGauge ( String name , String description , String unit , List < LabelKey > labelKeys ) { } } | return NoopLongGauge . create ( name , description , unit , labelKeys ) ; |
public class BooleanList { /** * Returns whether all elements of this List match the provided predicate .
* @ param filter
* @ return */
public < E extends Exception > boolean allMatch ( Try . BooleanPredicate < E > filter ) throws E { } } | return allMatch ( 0 , size ( ) , filter ) ; |
public class EscapeUtil { /** * Combine a list of strings to a single path with proper escaping .
* @ param pParts parts to combine
* @ return the combined path */
public static String combineToPath ( List < String > pParts ) { } } | if ( pParts != null && pParts . size ( ) > 0 ) { StringBuilder buf = new StringBuilder ( ) ; Iterator < String > it = pParts . iterator ( ) ; while ( it . hasNext ( ) ) { String part = it . next ( ) ; buf . append ( escapePart ( part != null ? part : "*" ) ) ; if ( it . hasNext ( ) ) { buf . append ( "/" ) ; } } return... |
public class KeyStroke { /** * Creates a Key from a string representation in Vim ' s key notation .
* @ param keyStr the string representation of this key
* @ return the created { @ link KeyType } */
public static KeyStroke fromString ( String keyStr ) { } } | String keyStrLC = keyStr . toLowerCase ( ) ; KeyStroke k ; if ( keyStr . length ( ) == 1 ) { k = new KeyStroke ( KeyType . Character , keyStr . charAt ( 0 ) , false , false , false ) ; } else if ( keyStr . startsWith ( "<" ) && keyStr . endsWith ( ">" ) ) { if ( keyStrLC . equals ( "<s-tab>" ) ) { k = new KeyStroke ( K... |
public class IndentedConfigReaderMapping { /** * Adds a message to the list .
* @ param fileName
* @ param lineNr
* @ param line
* @ param errorMessage */
private static void reportError ( List messages , String fileName , int lineNr , String line , String errorMessage ) { } } | messages . add ( new Date ( ) + " ERROR in \"" + fileName + "\" at line " + lineNr + ':' ) ; messages . add ( errorMessage ) ; |
public class EmojiUtil { /** * 转换emoji < br >
* Example : < code > 🍀 < / code > 将转变为
* & lt ; span class = ' emoji emoji1f340 ' & gt ; & lt ; / span & gt ; < br >
* @ param emoji _ str emoji _ str
* @ return emoji _ result */
public static String parseToHtmlTag ( String emoji_str ) { } } | if ( emoji_str != null ) { String str = EmojiParser . parseToHtmlHexadecimal ( emoji_str ) ; return htmlHexadecimalToHtmlTag ( str ) ; } return null ; |
public class Security { /** * Returns an array of objects : the first object in the array is
* an instance of an implementation of the requested algorithm
* and type , and the second object in the array identifies the provider
* of that implementation .
* The < code > provider < / code > argument can be null , ... | if ( provider == null ) { return GetInstance . getInstance ( type , getSpiClass ( type ) , algorithm ) . toArray ( ) ; } else { return GetInstance . getInstance ( type , getSpiClass ( type ) , algorithm , provider ) . toArray ( ) ; } |
public class Transformers { /** * Removes pairs non - recursively from a stream . Uses
* { @ code Transformers . stateMachine ( ) } under the covers to ensure items are
* emitted as soon as possible ( if an item can ' t be in a pair then it is
* emitted straight away ) .
* @ param isCandidateForFirst
* return... | return new Transformer < T , T > ( ) { @ Override public Observable < T > call ( Observable < T > o ) { return o . compose ( Transformers . stateMachine ( ) . initialState ( Optional . < T > absent ( ) ) . transition ( new Transition < Optional < T > , T , T > ( ) { @ Override public Optional < T > call ( Optional < T ... |
public class HiveMetaStoreBasedRegister { /** * If databse existed on Hive side will return false ;
* Or will create the table thru . RPC and return retVal from remote MetaStore .
* @ param hiveDbName is the hive databases to be checked for existence */
private boolean ensureHiveDbExistence ( String hiveDbName , IM... | try ( AutoCloseableLock lock = this . locks . getDbLock ( hiveDbName ) ) { Database db = new Database ( ) ; db . setName ( hiveDbName ) ; try { try ( Timer . Context context = this . metricContext . timer ( GET_HIVE_DATABASE ) . time ( ) ) { client . getDatabase ( db . getName ( ) ) ; } return false ; } catch ( NoSuchO... |
public class NodeSetDTM { /** * Inserts the specified node in this vector at the specified index .
* Each component in this vector with an index greater or equal to
* the specified index is shifted upward to have an index one greater
* than the value it had previously .
* @ param value The node to be inserted .... | if ( ! m_mutable ) throw new RuntimeException ( XSLMessages . createXPATHMessage ( XPATHErrorResources . ER_NODESETDTM_NOT_MUTABLE , null ) ) ; // " This NodeSetDTM is not mutable ! " ) ;
super . insertElementAt ( value , at ) ; |
public class AllureLifecycle { /** * Start a new fixture with given uuid .
* @ param uuid the uuid of fixture .
* @ param result the test fixture . */
private void startFixture ( final String uuid , final FixtureResult result ) { } } | storage . put ( uuid , result ) ; result . setStage ( Stage . RUNNING ) ; result . setStart ( System . currentTimeMillis ( ) ) ; threadContext . clear ( ) ; threadContext . start ( uuid ) ; |
public class EclipseIndexWriter { /** * Output the given indexterm into the XML writer .
* @ param term term to serialize
* @ param serializer XML output to write to
* @ param indexsee is term a see term */
private void outputIndexTerm ( final IndexTerm term , final XMLStreamWriter serializer , final boolean inde... | final List < IndexTerm > subTerms = term . getSubTerms ( ) ; final int subTermNum = subTerms . size ( ) ; outputIndexTermStartElement ( term , serializer , indexsee ) ; if ( subTermNum > 0 ) { for ( final IndexTerm subTerm : subTerms ) { outputIndexTerm ( subTerm , serializer , indexsee ) ; } } outputIndexTermEndElemen... |
public class login { /** * < pre >
* Login .
* < / pre > */
public static login add ( nitro_service client , login resource ) throws Exception { } } | resource . validate ( "add" ) ; return ( ( login [ ] ) resource . perform_operation ( client , "add" ) ) [ 0 ] ; |
public class TransactGetItemsRequest { /** * An ordered array of up to 10 < code > TransactGetItem < / code > objects , each of which contains a < code > Get < / code >
* structure .
* @ param transactItems
* An ordered array of up to 10 < code > TransactGetItem < / code > objects , each of which contains a
* <... | if ( transactItems == null ) { this . transactItems = null ; return ; } this . transactItems = new java . util . ArrayList < TransactGetItem > ( transactItems ) ; |
public class IOUtilities { /** * Use this when you expect a byte [ ] length of bytes to be read from the InputStream */
public static void transfer ( InputStream in , byte [ ] bytes ) throws IOException { } } | // Read in the bytes
int offset = 0 ; int numRead ; while ( offset < bytes . length && ( numRead = in . read ( bytes , offset , bytes . length - offset ) ) >= 0 ) { offset += numRead ; } if ( offset < bytes . length ) { throw new IOException ( "Retry: Not all bytes were transferred correctly." ) ; } |
public class MapKeyLoaderUtil { /** * Transforms an iterator of entries to an iterator of entry batches
* where each batch is represented as a map from entry key to
* list of entry values .
* The maximum size of the entry value list in any batch is
* determined by the { @ code maxBatch } parameter . Only one
... | return new UnmodifiableIterator < Map < Integer , List < Data > > > ( ) { @ Override public boolean hasNext ( ) { return entries . hasNext ( ) ; } @ Override public Map < Integer , List < Data > > next ( ) { if ( ! entries . hasNext ( ) ) { throw new NoSuchElementException ( ) ; } return nextBatch ( entries , maxBatch ... |
public class AbstractResultSetWrapper { /** * { @ inheritDoc }
* @ see java . sql . ResultSet # updateBytes ( java . lang . String , byte [ ] ) */
@ Override public void updateBytes ( final String columnLabel , final byte [ ] x ) throws SQLException { } } | wrapped . updateBytes ( columnLabel , x ) ; |
public class EUI48 { /** * Compares this { @ link EUI48 } with the specified { @ link EUI48 } based on their bit
* representations .
* @ param val { @ code EUI48 } to which this { @ code EUI48 } should be compared .
* @ return { @ code - 1 } , { @ code 0 } or { @ code 1 } if this { @ link EUI48 } is less than , e... | if ( this . mostSignificantBits < val . mostSignificantBits ) { return - 1 ; } else if ( this . mostSignificantBits > val . mostSignificantBits ) { return 1 ; } else if ( this . leastSignificantBits < val . leastSignificantBits ) { return - 1 ; } else if ( this . leastSignificantBits > val . leastSignificantBits ) { re... |
public class MultivaluedAttributeMerger { /** * / * ( non - Javadoc )
* @ see org . jasig . services . persondir . support . merger . BaseAdditiveAttributeMerger # mergePersonAttributes ( java . util . Map , java . util . Map ) */
@ Override protected Map < String , List < Object > > mergePersonAttributes ( final Map... | Validate . notNull ( toModify , "toModify cannot be null" ) ; Validate . notNull ( toConsider , "toConsider cannot be null" ) ; for ( final Map . Entry < String , List < Object > > sourceEntry : toConsider . entrySet ( ) ) { final String sourceKey = sourceEntry . getKey ( ) ; List < Object > destList = toModify . get (... |
public class DependencyList { /** * Returns true if the underlying dependencies have changed . */
public boolean isModified ( ) { } } | for ( int i = _dependencyList . size ( ) - 1 ; i >= 0 ; i -- ) { Dependency dependency = _dependencyList . get ( i ) ; if ( dependency . isModified ( ) ) { return true ; } } return false ; |
public class RESTClientConfig { /** * Set the values using the specified Properties object .
* @ param properties Properties object containing specific property values
* for the RESTClient config
* Note : We ' re using the same property names as that in ClientConfig
* for backwards compatibility . */
private vo... | Props props = new Props ( properties ) ; if ( props . containsKey ( ClientConfig . ENABLE_JMX_PROPERTY ) ) { this . setEnableJmx ( props . getBoolean ( ClientConfig . ENABLE_JMX_PROPERTY ) ) ; } if ( props . containsKey ( ClientConfig . BOOTSTRAP_URLS_PROPERTY ) ) { List < String > urls = props . getList ( ClientConfig... |
public class Counters { /** * Returns a comparator suitable for sorting this Counter ' s keys or entries by
* their respective value or magnitude ( by absolute value ) . If
* < tt > ascending < / tt > is true , smaller magnitudes will be returned first ,
* otherwise higher magnitudes will be returned first .
* ... | return new Comparator < E > ( ) { public int compare ( E o1 , E o2 ) { if ( ascending ) { if ( useMagnitude ) { return Double . compare ( Math . abs ( counter . getCount ( o1 ) ) , Math . abs ( counter . getCount ( o2 ) ) ) ; } else { return Double . compare ( counter . getCount ( o1 ) , counter . getCount ( o2 ) ) ; }... |
public class AsaCalculator { /** * Returns the 2 - dimensional array with neighbor indices for every atom .
* @ return 2 - dimensional array of size : n _ atoms x n _ neighbors _ per _ atom */
int [ ] [ ] findNeighborIndices ( ) { } } | // looking at a typical protein case , number of neighbours are from ~ 10 to ~ 50 , with an average of ~ 30
int initialCapacity = 60 ; int [ ] [ ] nbsIndices = new int [ atomCoords . length ] [ ] ; for ( int k = 0 ; k < atomCoords . length ; k ++ ) { double radius = radii [ k ] + probe + probe ; List < Integer > thisNb... |
public class BasicExpressionParser { /** * Parse expression .
* @ param sqlStatement SQL statement
* @ return expression */
public SQLExpression parse ( final SQLStatement sqlStatement ) { } } | int beginPosition = lexerEngine . getCurrentToken ( ) . getEndPosition ( ) ; SQLExpression result = parseExpression ( sqlStatement ) ; if ( result instanceof SQLPropertyExpression ) { setTableToken ( sqlStatement , beginPosition , ( SQLPropertyExpression ) result ) ; } return result ; |
public class HttpBuilder { /** * Executes a HEAD request on the configured URI , with additional configuration provided by the configuration function . The result will be cast to
* the specified ` type ` .
* This method is generally used for Java - specific configuration .
* [ source , groovy ]
* HttpBuilder ht... | return type . cast ( interceptors . get ( HttpVerb . HEAD ) . apply ( configureRequest ( type , HttpVerb . HEAD , configuration ) , this :: doHead ) ) ; |
public class XMLServiceDocumentWriter { /** * This writes all singletons in entity data model as collection of " metadata : singleton " .
* @ param writer which writes to stream .
* @ throws XMLStreamException in case of any xml errors
* @ throws ODataRenderException if entity container is null . */
private void ... | List < Singleton > singletons = getEntityContainer ( ) . getSingletons ( ) ; LOG . debug ( "Number of singletons to be written in service document are {}" , singletons . size ( ) ) ; for ( Singleton singleton : singletons ) { writeElement ( writer , METADATA , SERVICE_SINGLETON , ODATA_METADATA_NS , singleton . getName... |
public class UserTunnel { /** * Returns the ActiveConnection object associated with this tunnel within
* the AuthenticationProvider and UserContext which created the tunnel . If
* the AuthenticationProvider is not tracking active connections , or this
* tunnel is no longer active , this will be null .
* @ retur... | // Pull the UUID of the current tunnel
UUID uuid = getUUID ( ) ; // Get the directory of active connections
Directory < ActiveConnection > activeConnectionDirectory = userContext . getActiveConnectionDirectory ( ) ; Collection < String > activeConnectionIdentifiers = activeConnectionDirectory . getIdentifiers ( ) ; // ... |
public class Channel { /** * Enables access to event mechanism of a channel and is normally not used by clients directly .
* @ param evt sends an Event to a specific protocol layer and receives a response .
* @ return a response from a particular protocol layer targeted by Event parameter */
public Object down ( Ev... | if ( evt . type ( ) == 1 ) // MSG
return ch . down ( ( Message ) evt . getArg ( ) ) ; return ch . down ( evt ) ; |
public class JsonBuilderHandler { /** * This method removes all the json which is not mapped into a
* method inside the JsonBuilder Object .
* Also if the proxy contains another JsonBuilder in their methods
* the method strip ( ) is called . */
private void stripProxy ( JsonBuilder proxy ) throws Throwable { } } | Class < ? > type = proxy . getClass ( ) . getInterfaces ( ) [ 0 ] ; HashSet < String > validAttrs = getAttributeNames ( type . getMethods ( ) ) ; Hashtable < String , Method > ispropertyGetters = getJsonBuilders ( type . getMethods ( ) ) ; for ( String key : jsonObject . keys ( ) ) { String name = methodName2AttrName (... |
public class ManagedHotdeploy { public static synchronized ClassLoader start ( ) { } } | if ( isHotdeploy ( ) ) { final ClassLoader originalLoader = getThreadContextClassLoader ( ) ; if ( isAnotherThreadHotdeploy ( ) ) { // e . g . job started
inheritAnotherThreadClassLoader ( ) ; // to use same loader
} else { // normally here
// _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / _ / ... |
public class JSONTokener { /** * 获得源字符串中的下一个字符
* @ return 下一个字符 , or 0 if past the end of the source string .
* @ throws JSONException JSON异常 , 包装IO异常 */
public char next ( ) throws JSONException { } } | int c ; if ( this . usePrevious ) { this . usePrevious = false ; c = this . previous ; } else { try { c = this . reader . read ( ) ; } catch ( IOException exception ) { throw new JSONException ( exception ) ; } if ( c <= 0 ) { // End of stream
this . eof = true ; c = 0 ; } } this . index += 1 ; if ( this . previous == ... |
public class AbstractRedisStorage { /** * Get the names of all of the < code > { @ link org . quartz . Calendar } < / code > s in the < code > JobStore < / code > .
* @ param jedis a thread - safe Redis connection
* @ return the names of all calendars or an empty list if no calendars exist */
public List < String >... | final Set < String > calendarsSet = jedis . smembers ( redisSchema . calendarsSet ( ) ) ; List < String > calendars = new ArrayList < > ( calendarsSet . size ( ) ) ; for ( String group : calendarsSet ) { calendars . add ( redisSchema . calendarName ( group ) ) ; } return calendars ; |
public class AbstractCommonShapeFileWriter { /** * Flush temp buffers , write down final information in
* file header ( file size . . . ) , and close the streams .
* @ throws IOException in case of error . */
@ Override @ SuppressWarnings ( "resource" ) public void close ( ) throws IOException { } } | flush ( ) ; if ( this . tempStream != null ) { this . tempStream . close ( ) ; this . tempStream = null ; } if ( this . stream != null && this . stream . isOpen ( ) ) { // Copy the channels
if ( this . buffer != null && this . tempFile != null ) { try { try ( ReadableByteChannel in = Channels . newChannel ( new FileInp... |
public class GSMXImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setMODE ( Integer newMODE ) { } } | Integer oldMODE = mode ; mode = newMODE ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . GSMX__MODE , oldMODE , mode ) ) ; |
public class CProductPersistenceImpl { /** * Returns the c product where uuid = & # 63 ; and groupId = & # 63 ; or returns < code > null < / code > if it could not be found . Uses the finder cache .
* @ param uuid the uuid
* @ param groupId the group ID
* @ return the matching c product , or < code > null < / cod... | return fetchByUUID_G ( uuid , groupId , true ) ; |
public class LTPAKeyFileUtilityImpl { /** * Obtain the OutputStream for the given file .
* @ param keyFile
* @ return
* @ throws IOException */
private OutputStream getOutputStream ( final String keyFile ) throws IOException { } } | try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < OutputStream > ( ) { @ Override public OutputStream run ( ) throws IOException { return new FileOutputStream ( new File ( keyFile ) ) ; } } ) ; } catch ( PrivilegedActionException e ) { // Wrap the wrapped IOException from doPriv in an IOExc... |
public class Authorization { /** * Checks if the User passed has access to the alias to perform an action
* < ul >
* < li > When Messaging Security is disabled , it always returns true < / li >
* < li > When Messaging Security is enabled , it calls
* MessagingAuthorizationService to check for access < / li >
... | SibTr . entry ( tc , CLASS_NAME + "checkAliasAccess" , new Object [ ] { authenticatedSubject , destination , operationType , aliasDestination } ) ; boolean result = false ; if ( ! runtimeSecurityService . isMessagingSecure ( ) ) { result = true ; } else { if ( messagingAuthorizationService != null ) { result = messagin... |
public class DateTime { /** * Returns a copy of this datetime minus the specified number of years .
* The calculation will do its best to only change the year field
* retaining the same month of year .
* However , in certain circumstances , it may be necessary to alter
* smaller fields . For example , 2008-02-2... | if ( years == 0 ) { return this ; } long instant = getChronology ( ) . years ( ) . subtract ( getMillis ( ) , years ) ; return withMillis ( instant ) ; |
public class DefaultComposedValueConverter { /** * @ see # addConverter ( ValueConverter )
* @ param converter is the converter to add . */
public void addConverterComponent ( ValueConverter < ? , ? > converter ) { } } | if ( converter instanceof AbstractRecursiveValueConverter ) { ( ( AbstractRecursiveValueConverter < ? , ? > ) converter ) . setComposedValueConverter ( this ) ; } if ( converter instanceof AbstractComponent ) { ( ( AbstractComponent ) converter ) . initialize ( ) ; } addConverter ( converter ) ; |
public class Resolve { /** * Resolve constructor using diamond inference .
* @ param pos The position to use for error reporting .
* @ param env The environment current at the constructor invocation .
* @ param site The type of class for which a constructor is searched .
* The scope of this class has been touch... | return lookupMethod ( env , pos , site . tsym , resolveMethodCheck , new BasicLookupHelper ( names . init , site , argtypes , typeargtypes ) { @ Override Symbol doLookup ( Env < AttrContext > env , MethodResolutionPhase phase ) { return findDiamond ( env , site , argtypes , typeargtypes , phase . isBoxingRequired ( ) ,... |
public class IndexChangeAdapters { /** * Create an { @ link IndexChangeAdapter } implementation that handles the " mode : localName " property .
* @ param context the execution context ; may not be null
* @ param matcher the node type matcher used to determine which nodes should be included in the index ; may not b... | return new NodeLocalNameChangeAdapter ( context , matcher , workspaceName , index ) ; |
public class LCMSData { /** * Releases all memory by calling { @ link LCMSDataSource # releaseMemory ( ) } and { @ link
* IScanCollection # reset ( ) } . Effectively , you get this object to the same state as it was after
* calling the constructor , however any ScanCollection configurations are preserved ( e . g . ... | isReleasingMemory = true ; userPhantomRefs . clear ( ) ; cache . invalidateAll ( ) ; scans . reset ( ) ; source . releaseMemory ( ) ; // loadedSubsets . clear ( ) ;
isReleasingMemory = false ; |
public class CmsDefaultXmlContentHandler { /** * Initializes the relation configuration for this content handler . < p >
* OpenCms performs link checks for all OPTIONAL links defined in XML content values of type
* OpenCmsVfsFile . However , for most projects in the real world a more fine - grained control
* over... | Iterator < Element > i = CmsXmlGenericWrapper . elementIterator ( root , APPINFO_RELATION ) ; while ( i . hasNext ( ) ) { // iterate all " checkrule " elements in the " checkrule " node
Element element = i . next ( ) ; String elementName = element . attributeValue ( APPINFO_ATTR_ELEMENT ) ; String invalidate = element ... |
public class TileDaoUtils { /** * Get the zoom level for the provided width and height in the default units
* @ param widths
* sorted widths
* @ param heights
* sorted heights
* @ param tileMatrices
* tile matrices
* @ param width
* width in default units
* @ param height
* height in default units
... | Long zoomLevel = null ; // Find where the width and height fit in
int widthIndex = Arrays . binarySearch ( widths , width ) ; if ( widthIndex < 0 ) { widthIndex = ( widthIndex + 1 ) * - 1 ; } int heightIndex = Arrays . binarySearch ( heights , height ) ; if ( heightIndex < 0 ) { heightIndex = ( heightIndex + 1 ) * - 1 ... |
public class Solo { /** * Returns a TextView matching the specified index .
* @ param index the index of the { @ link TextView } . { @ code 0 } if only one is available
* @ return a { @ link TextView } matching the specified index */
public TextView getText ( int index ) { } } | if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "getText(" + index + ")" ) ; } return getter . getView ( TextView . class , index ) ; |
public class Entity { /** * Returns true if the provided property is a persistent property ; false , otherwise .
* @ return
* returned object is { @ link boolean } */
public boolean isPersistentProperty ( String propName ) { } } | if ( transientProperties == null ) { setTransientPropertyNames ( ) ; } if ( transientProperties . contains ( propName ) ) { return false ; } else { return true ; } |
public class JunitNotifier { /** * ( non - Javadoc )
* @ see
* com . technophobia . substeps . runner . AbstractBaseNotifier # handleNotifyNodeFailed
* ( com . technophobia . substeps . execution . ExecutionNode , java . lang . Throwable ) */
public void onNodeFailed ( final IExecutionNode node , final Throwable ... | final Description description = descriptionMap . get ( Long . valueOf ( node . getId ( ) ) ) ; notifyTestFailed ( description , cause ) ; |
public class InternalService { /** * Returns observable to remove list of participants from a conversation .
* @ param conversationId ID of a conversation to delete .
* @ param ids List of participant ids to be removed .
* @ return Observable to remove list of participants from a conversation . */
public Observab... | final String token = getToken ( ) ; if ( sessionController . isCreatingSession ( ) ) { return getTaskQueue ( ) . queueRemoveParticipants ( conversationId , ids ) ; } else if ( TextUtils . isEmpty ( token ) ) { return Observable . error ( getSessionStateErrorDescription ( ) ) ; } else { return doRemoveParticipants ( tok... |
public class ViewPropertyAnimatorPreHC { /** * This method gets the value of the named property from the View object .
* @ param propertyConstant The property whose value should be returned
* @ return float The value of the named property */
private float getValue ( int propertyConstant ) { } } | // final View . TransformationInfo info = mView . mTransformationInfo ;
switch ( propertyConstant ) { case TRANSLATION_X : // return info . mTranslationX ;
return mProxy . getTranslationX ( ) ; case TRANSLATION_Y : // return info . mTranslationY ;
return mProxy . getTranslationY ( ) ; case ROTATION : // return info . m... |
public class ZMQ { /** * Starts the built - in 0MQ proxy in the current application thread .
* The proxy connects a frontend socket to a backend socket . Conceptually , data flows from frontend to backend .
* Depending on the socket types , replies may flow in the opposite direction . The direction is conceptual on... | return zmq . ZMQ . proxy ( frontend . base , backend . base , capture != null ? capture . base : null ) ; |
public class JdbcStoreConfigurationParser60 { /** * This method is public static so that it can be reused by custom cache store / loader configuration parsers */
public static void parseCommonLoaderAttributes ( XMLExtendedStreamReader reader , int i , StoreConfigurationBuilder < ? , ? > builder ) throws XMLStreamExcept... | throw ParseUtils . unexpectedAttribute ( reader , i ) ; |
public class CmsGwtDialogExtension { /** * Opens the publish dialog for the given project . < p >
* @ param project the project for which to open the dialog
* @ param directPublishResources the resources for which to open the publish dialog . */
protected void openPublishDailog ( CmsProject project , List < CmsReso... | CmsPublishData publishData = getPublishData ( project , directPublishResources ) ; String data = getSerializedPublishData ( publishData ) ; getRpcProxy ( I_CmsGwtDialogClientRpc . class ) . openPublishDialog ( data ) ; |
public class QueryImpl { /** * ( non - Javadoc )
* @ see
* javax . persistence . Query # getParameterValue ( javax . persistence . Parameter ) */
@ Override public < T > T getParameterValue ( Parameter < T > paramParameter ) { } } | Object value = kunderaQuery . getClauseValue ( paramParameter ) ; if ( value == null ) { throw new IllegalStateException ( "parameter has not been bound" + paramParameter ) ; } return ( T ) value ; |
public class HttpClientChannelInitializer { /** * Use netty proxy handler only if scheme is https */
private void configureProxyServer ( ChannelPipeline clientPipeline ) { } } | if ( proxyServerConfiguration != null && sslConfig != null ) { if ( proxyServerConfiguration . getProxyUsername ( ) != null && proxyServerConfiguration . getProxyPassword ( ) != null ) { clientPipeline . addLast ( Constants . PROXY_HANDLER , new HttpProxyHandler ( proxyServerConfiguration . getInetSocketAddress ( ) , p... |
public class CDIInterceptorWrapperImpl { /** * Liberty change begin */
@ FFDCIgnore ( PrivilegedActionException . class ) private static Class < ? > getFTAnnotationClass ( ) { } } | try { return AccessController . doPrivileged ( ( PrivilegedExceptionAction < Class < ? > > ) ( ) -> { return Class . forName ( "com.ibm.ws.microprofile.faulttolerance.cdi.FaultTolerance" ) ; } ) ; } catch ( PrivilegedActionException pae ) { if ( LOG . isLoggable ( Level . FINEST ) ) { LOG . log ( Level . FINEST , "Exce... |
public class Cells { /** * Returns the { @ code Integer } value of the { @ link Cell } ( associated to { @ code table } ) whose name iscellName , or
* null if this Cells object contains no cell whose name is cellName .
* @ param nameSpace the name of the owning table
* @ param cellName the name of the Cell we wan... | return getValue ( nameSpace , cellName , Integer . class ) ; |
public class Lexer { /** * / * \ M - , \ C - , \ c , or \ . . . */
private void fetchEscapedValue ( ) { } } | if ( ! left ( ) ) newSyntaxException ( END_PATTERN_AT_ESCAPE ) ; fetch ( ) ; switch ( c ) { case 'M' : if ( syntax . op2EscCapitalMBarMeta ( ) ) { if ( ! left ( ) ) newSyntaxException ( END_PATTERN_AT_META ) ; fetch ( ) ; if ( c != '-' ) newSyntaxException ( META_CODE_SYNTAX ) ; if ( ! left ( ) ) newSyntaxException ( E... |
public class ImportSnapshotRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional
* parameters to enable operation dry - run . */
@ Override public Request < ImportSnapshotRequest > getDryRunRequest ( ) { } } | Request < ImportSnapshotRequest > request = new ImportSnapshotRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ; |
public class JsonParseUtil { /** * Parses the current token as a list of Enums .
* @ param < T >
* @ param parser
* @ param clazz
* @ return List of { @ link Enum } s
* @ throws IOException
* @ throws JsonFormatException
* @ author vvakame */
public static < T extends Enum < T > > List < T > parserEnumLis... | State eventType = parser . getEventType ( ) ; if ( eventType == State . VALUE_NULL ) { return null ; } if ( eventType != State . START_ARRAY ) { throw new IllegalStateException ( "not started brace!" ) ; } List < T > list = new ArrayList < T > ( ) ; while ( parser . lookAhead ( ) != State . END_ARRAY ) { eventType = pa... |
public class PEMKeyStore { /** * Persist the security material in this keystore . If the object has a path
* associated with it , the object will be persisted to that path . Otherwise
* it will be stored in the default certificate directory . As a result , the
* parameters of this method are ignored .
* @ param... | for ( SecurityObjectWrapper < ? > object : this . aliasObjectMap . values ( ) ) { if ( object instanceof Storable ) { try { ( ( Storable ) object ) . store ( ) ; } catch ( ResourceStoreException e ) { throw new CertificateException ( e ) ; } } } |
public class NanoHTTPD { /** * Override this to customize the server .
* ( By default , this delegates to serveFile ( ) and allows directory listing . )
* @ param session
* The HTTP session
* @ return HTTP response , see class Response for details */
public Response serve ( IHTTPSession session ) { } } | Map < String , String > files = new HashMap < > ( ) ; Method method = session . getMethod ( ) ; if ( Method . PUT . equals ( method ) || Method . POST . equals ( method ) ) { try { session . parseBody ( files ) ; } catch ( IOException ioe ) { return new Response ( Response . Status . INTERNAL_ERROR , MIME_PLAINTEXT , "... |
public class HtmlBuilder { /** * Build a String containing a HTML opening tag with given CSS class and / or
* style and concatenates the given HTML content .
* @ param tag String name of HTML tag
* @ param clazz CSS class of the tag
* @ param style style for tag ( plain CSS )
* @ param content content string ... | return openTag ( tag , clazz , style , true , content ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.