signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class KAMStoreImpl { /** * { @ inheritDoc } */
@ Override public Kam getKam ( KamInfo kamInfo , KamFilter kamFilter ) { } } | if ( kamInfo == null ) throw new InvalidArgument ( DEFAULT_MSG ) ; if ( ! exists ( kamInfo ) ) return null ; try { return getKam ( kamStoreDao ( kamInfo ) , kamInfo , kamFilter ) ; } catch ( SQLException e ) { final String msg = "error getting KAM" ; throw new KAMStoreException ( msg , e ) ; } |
public class BasicWorkspaceManager { /** * This method temporary opens block out of any workspace scope .
* PLEASE NOTE : Do not forget to close this block .
* @ return */
@ Override public MemoryWorkspace scopeOutOfWorkspaces ( ) { } } | MemoryWorkspace workspace = Nd4j . getMemoryManager ( ) . getCurrentWorkspace ( ) ; if ( workspace == null ) return new DummyWorkspace ( ) ; else { Nd4j . getMemoryManager ( ) . setCurrentWorkspace ( null ) ; return workspace . tagOutOfScopeUse ( ) ; } |
public class EnvironmentClassLoader { /** * Overrides getResource to implement caching . */
@ Override public InputStream getResourceAsStream ( String name ) { } } | ResourceEntry entry = _resourceCacheMap . get ( name ) ; if ( entry == null || entry . isModified ( ) ) { URL resource = super . getResource ( name ) ; entry = new ResourceEntry ( resource ) ; _resourceCacheMap . put ( name , entry ) ; } return entry . getResourceAsStream ( ) ; |
public class AbstractRequestHandler { /** * Extract the first value in the array mapped to by field in queryMap
* @ param queryMap the Map in which to search
* @ param field the field value desired
* @ return the first value in the array mapped to field in queryMap , if
* present , null otherwise */
public stat... | String arr [ ] = queryMap . get ( field ) ; if ( arr == null || arr . length == 0 ) { return null ; } return arr [ 0 ] ; |
public class FactoryOptimizationSparse { /** * Creates a sparse trust region optimization using cauchy steps .
* @ see UnconLeastSqTrustRegion _ F64
* @ param config Trust region configuration
* @ return The new optimization routine */
public static UnconstrainedLeastSquares < DMatrixSparseCSC > cauchy ( @ Nullab... | if ( config == null ) config = new ConfigTrustRegion ( ) ; HessianLeastSquares_DSCC hessian = new HessianLeastSquares_DSCC ( ) ; MatrixMath_DSCC math = new MatrixMath_DSCC ( ) ; TrustRegionUpdateCauchy_F64 < DMatrixSparseCSC > update = new TrustRegionUpdateCauchy_F64 < > ( ) ; UnconLeastSqTrustRegion_F64 < DMatrixSpars... |
public class BaseBundleActivator { /** * Bundle stopping .
* Don ' t override this , override shutdownService . */
public void stop ( BundleContext context ) throws Exception { } } | ClassServiceUtility . log ( context , LogService . LOG_INFO , "Stopping " + this . getClass ( ) . getName ( ) + " Bundle" ) ; if ( this . shutdownService ( service , context ) ) service = null ; // Unregisters automatically
this . context = null ; |
public class ContentServiceV1 { /** * POST / projects / { projectName } / repos / { repoName } / contents ? revision = { revision }
* < p > Pushes a commit . */
@ Post ( "/projects/{projectName}/repos/{repoName}/contents" ) @ RequiresWritePermission public CompletableFuture < PushResultDto > push ( @ Param ( "revisio... | final long commitTimeMillis = System . currentTimeMillis ( ) ; return push ( commitTimeMillis , author , repository , new Revision ( revision ) , commitMessage , changes ) . toCompletableFuture ( ) . thenApply ( rrev -> convert ( rrev , commitTimeMillis ) ) ; |
public class TextUtility { /** * 判断一个字符串的所有字符是否在另一个字符串集合中
* @ param aggr 字符串集合
* @ param str 需要判断的字符串
* @ return */
public static boolean isInAggregate ( String aggr , String str ) { } } | if ( aggr != null && str != null ) { str += "1" ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { String s = str . substring ( i , i + 1 ) ; if ( aggr . indexOf ( s ) == - 1 ) return false ; } return true ; } return false ; |
public class ProcessTreeKiller { /** * Short for { @ code kill ( null , modelEnvVars ) }
* @ deprecated Use { @ link ProcessTree # killAll ( Map ) } */
@ Deprecated public void kill ( Map < String , String > modelEnvVars ) throws InterruptedException { } } | kill ( null , modelEnvVars ) ; |
public class Transform { /** * Compute the correct CSS property name for a specific browser vendor . */
public static String getVendorPropertyName ( String prop ) { } } | // we prefer vendor specific names by default
String vendorProp = JsUtils . camelize ( "-" + prefix + "-" + prop ) ; if ( JsUtils . hasProperty ( divStyle , vendorProp ) ) { return vendorProp ; } if ( JsUtils . hasProperty ( divStyle , prop ) ) { return prop ; } String camelProp = JsUtils . camelize ( prop ) ; if ( JsU... |
public class OgnlExpectation { /** * < p > conditionalExpression . < / p >
* @ param expectation a { @ link java . lang . String } object .
* @ return a boolean . */
public static boolean conditionalExpression ( String expectation ) { } } | String expression = expectation . replaceAll ( CONDITIONAL_EXPRESSION_WITH_DOUBLE_QUOTES_PATTERN , "" ) ; return Pattern . matches ( CONDITIONAL_EXPRESSION_NO_DOUBLE_QUOTES_PATTERN , expression ) ; |
public class StringUtils { /** * Returns a string whose value is the concatenation of the
* string { @ code s } repeated { @ code count } times .
* If count or length is zero then the empty string is returned .
* This method may be used to create space padding for
* formatting text or zero padding for formattin... | if ( count < 0 ) { throw new IllegalArgumentException ( "count is negative, " + count ) ; } if ( count == 1 ) { return s ; } byte [ ] value = s . getBytes ( StandardCharsets . UTF_8 ) ; final int len = value . length ; if ( len == 0 || count == 0 ) { return "" ; } if ( len == 1 ) { final byte [ ] single = new byte [ co... |
public class MessageSerializer { /** * Make a transaction from the payload . Extension point for alternative
* serialization format support .
* @ throws UnsupportedOperationException if this serializer / deserializer
* does not support deserialization . This can occur either because it ' s a dummy
* serializer ... | return makeTransaction ( payloadBytes , offset , payloadBytes . length , null ) ; |
public class SeaGlassTabbedPaneUI { /** * Called when a close tab button is pressed .
* @ param tabIndex TODO */
protected void doClose ( int tabIndex ) { } } | if ( tabCloseListener == null || tabCloseListener . tabAboutToBeClosed ( tabIndex ) ) { String title = tabPane . getTitleAt ( tabIndex ) ; Component component = tabPane . getComponentAt ( tabIndex ) ; tabPane . removeTabAt ( tabIndex ) ; if ( tabCloseListener != null ) { tabCloseListener . tabClosed ( title , component... |
public class FileResourceBundle { /** * Called by the resource manager once it has ensured that our resource jar file is up to date
* and ready for reading .
* @ return true if we successfully unpacked our resources , false if we encountered errors in
* doing so . */
public boolean sourceIsReady ( ) { } } | // make a note of our source ' s last modification time
_sourceLastMod = _source . lastModified ( ) ; // if we are unpacking files , the time to do so is now
if ( _unpacked != null && _unpacked . lastModified ( ) != _sourceLastMod ) { try { resolveJarFile ( ) ; } catch ( IOException ioe ) { log . warning ( "Failure res... |
public class AbstractExceptionConfiguration { /** * Method registers a new handler to some type of exception .
* @ param clazz type of the exception to which is handler registered
* @ param action action that is performed when the proper exception is thrown
* @ param ex thrown exception
* @ param < T > type of ... | final InternalExceptionHandler handler = new InternalExceptionHandler ( clazz , action , ex ) ; handlers . add ( handler ) ; return handler ; |
public class GroupBy { /** * Create a new aggregating map expression using a backing LinkedHashMap
* @ param key key for the map entries
* @ param value value for the map entries
* @ return wrapper expression */
public static < K , V , U > AbstractGroupExpression < Pair < K , V > , Map < K , U > > map ( Expressio... | return map ( new GOne < K > ( key ) , value ) ; |
public class JavaSmsApi { /** * 通过接口发送语音验证码
* @ param apikey apikey
* @ param mobile 接收的手机号
* @ param code 验证码
* @ return the http result */
public static Single < String > sendVoice ( String apikey , String mobile , String code ) { } } | Map < String , String > params = new HashMap < > ( ) ; params . put ( "apikey" , apikey ) ; params . put ( "mobile" , mobile ) ; params . put ( "code" , code ) ; return post ( URI_SEND_VOICE , params ) ; |
public class ResourcesInner { /** * Updates a resource .
* @ param resourceGroupName The name of the resource group for the resource . The name is case insensitive .
* @ param resourceProviderNamespace The namespace of the resource provider .
* @ param parentResourcePath The parent resource identity .
* @ param... | return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , resourceProviderNamespace , parentResourcePath , resourceType , resourceName , apiVersion , parameters ) , serviceCallback ) ; |
public class ReComputeTimeOffsetHandler { /** * Compute the target value .
* @ param srcValue The value of this listener ' s owner .
* @ return The value to set the target field to . */
public double computeValue ( double srcValue ) { } } | double dateOtherDate = 0 ; double dateThisDate = 0 ; if ( m_fldOtherDate != null ) dateOtherDate = m_fldOtherDate . getValue ( ) ; else dateOtherDate = DateField . todaysDate ( ) ; dateThisDate = ( ( DateTimeField ) this . getOwner ( ) ) . getValue ( ) ; double tsDifference = ( Math . floor ( ( dateThisDate - dateOther... |
public class RandomDateTime { /** * Generates a random ZonedDateTime in the range [ ' minYear ' , ' maxYear ' ] . This
* method generate dates without time ( or time set to 00:00:00)
* @ param minYear ( optional ) minimum range value
* @ param maxYear max range value
* @ return a random ZonedDateTime value . */... | int currentYear = ZonedDateTime . now ( ) . getYear ( ) ; minYear = minYear == 0 ? currentYear - RandomInteger . nextInteger ( 10 ) : minYear ; maxYear = maxYear == 0 ? currentYear : maxYear ; int year = RandomInteger . nextInteger ( minYear , maxYear ) ; int month = RandomInteger . nextInteger ( 1 , 13 ) ; int day = R... |
public class KodoClient { /** * Lists object for Qiniu kodo .
* @ param prefix prefix for bucket
* @ param marker Marker returned the last time a file list was obtained
* @ param limit Length limit for each iteration , Max . 1000
* @ param delimiter Specifies a directory separator that lists all common prefixes... | return mBucketManager . listFiles ( mBucketName , prefix , marker , limit , delimiter ) ; |
public class Dstream { /** * Makes first change available to it by following the steps :
* < ol type = a >
* < li > For each cluster c < / li >
* < li > For each outside grid g of c < / li >
* < li > For each neighbouring grid h of g < / li >
* < li > If h belongs to c ' , label c and c ' with the label of th... | Iterator < GridCluster > gridClusIter = this . cluster_list . iterator ( ) ; // a . For each cluster c
while ( gridClusIter . hasNext ( ) ) { GridCluster c = gridClusIter . next ( ) ; // System . out . print ( " Adjusting from cluster " + c . getClusterLabel ( ) + " , standby . . . " ) ;
// b . for each grid , dg , of ... |
public class NettyMessage { /** * Allocates a new buffer and adds some header information for the frame decoder .
* < p > If the < tt > contentLength < / tt > is unknown , you must write the actual length after adding
* the contents as an integer to position < tt > 0 < / tt > !
* @ param allocator
* byte buffer... | checkArgument ( contentLength <= Integer . MAX_VALUE - FRAME_HEADER_LENGTH ) ; final ByteBuf buffer ; if ( ! allocateForContent ) { buffer = allocator . directBuffer ( FRAME_HEADER_LENGTH + messageHeaderLength ) ; } else if ( contentLength != - 1 ) { buffer = allocator . directBuffer ( FRAME_HEADER_LENGTH + messageHead... |
public class GenericDao { /** * 根据条件查询若干个字段 , 加载到ENTITY里
* @ param matches
* @ param columns
* @ return */
protected List < ENTITY > findColumns ( List < Match > matches , String [ ] columns ) { } } | Query query = queryGenerator . getMiniSelectQuery ( Arrays . asList ( columns ) , matches ) ; return findBySQL ( query . getSql ( ) , query . getParams ( ) ) ; |
public class Validation { /** * createManagedConnectionFactory
* @ param cmd connector metadata
* @ param failures list of failures
* @ param rb ResourceBundle
* @ param cl classloador
* @ return list of validate objects */
private static List < Validate > createManagedConnectionFactory ( Connector cmd , List... | List < Validate > result = new ArrayList < Validate > ( ) ; if ( cmd . getVersion ( ) != Version . V_10 && cmd . getResourceadapter ( ) != null && cmd . getResourceadapter ( ) . getOutboundResourceadapter ( ) != null && cmd . getResourceadapter ( ) . getOutboundResourceadapter ( ) . getConnectionDefinitions ( ) != null... |
public class SecurityAcl { /** * ( non - Javadoc )
* @ see nyla . solutions . core . security . data . Acl # checkPermission ( java . security .
* Principal , java . lang . String ) */
@ Override public synchronized boolean checkPermission ( Principal aPrincipal , String aPermission ) { } } | if ( aPermission == null ) return false ; SecurityPermission securityPermission = new SecurityPermission ( aPermission ) ; return this . checkPermission ( aPrincipal , securityPermission ) ; |
public class StunAttributeFactory { /** * Creates a ReflectedFromAddressAttribute of the specified type and with
* the specified address and port
* @ param address
* the address value of the address attribute
* @ return the newly created address attribute . */
public static ReflectedFromAttribute createReflecte... | ReflectedFromAttribute attribute = new ReflectedFromAttribute ( ) ; attribute . setAddress ( address ) ; return attribute ; |
public class QueryUi { /** * Additional styling options . */
private Grid makeStylePanel ( ) { } } | for ( Entry < String , Integer > item : stylesMap . entrySet ( ) ) { styles . insertItem ( item . getKey ( ) , item . getValue ( ) ) ; } final Grid grid = new Grid ( 5 , 3 ) ; grid . setText ( 0 , 1 , "Smooth" ) ; grid . setWidget ( 0 , 2 , smooth ) ; grid . setText ( 1 , 1 , "Style" ) ; grid . setWidget ( 1 , 2 , styl... |
public class rewritepolicylabel_stats { /** * Use this API to fetch statistics of rewritepolicylabel _ stats resource of given name . */
public static rewritepolicylabel_stats get ( nitro_service service , String labelname ) throws Exception { } } | rewritepolicylabel_stats obj = new rewritepolicylabel_stats ( ) ; obj . set_labelname ( labelname ) ; rewritepolicylabel_stats response = ( rewritepolicylabel_stats ) obj . stat_resource ( service ) ; return response ; |
public class SipServletMessageImpl { /** * ( non - Javadoc )
* @ see javax . servlet . sip . SipServletMessage # getLocalPort ( ) */
public int getLocalPort ( ) { } } | final SIPTransaction sipTransaction = ( SIPTransaction ) getTransaction ( ) ; if ( sipTransaction != null ) { return sipTransaction . getPort ( ) ; } else { final String transport = JainSipUtils . findTransport ( message ) ; final MobicentsExtendedListeningPoint listeningPoint = sipFactoryImpl . getSipNetworkInterfaceM... |
public class EntityGraph { /** * Given a association attribute in an Entity find the Entity the attribute is referencing .
* @ param attribute association attribute
* @ return Optional Entity type being referenced . */
Optional < EntityDescriptor > referencingEntity ( AttributeDescriptor attribute ) { } } | if ( ! Names . isEmpty ( attribute . referencedTable ( ) ) ) { // match by table name
return entities . values ( ) . stream ( ) . filter ( entity -> entity . tableName ( ) . equalsIgnoreCase ( attribute . referencedTable ( ) ) ) . findFirst ( ) ; } else if ( ! Names . isEmpty ( attribute . referencedType ( ) ) ) { // m... |
public class IterableExtensions { /** * Combines multiple iterables into a single iterable . The returned iterable has an iterator that traverses the
* elements of each iterable in { @ code inputs } . The input iterators are not polled until necessary .
* The returned iterable ' s iterator supports { @ code remove ... | return Iterables . concat ( inputs ) ; |
public class ComponentAccess { /** * Find the execute method .
* @ Execute or execute ( ) will match in this order .
* @ param cmp the Object where to look for
* @ return the method */
@ SuppressWarnings ( "unchecked" ) private static Method getMethodOfInterest ( Object cmp , Class < ? extends Annotation > ann ) ... | Class cmpClass = cmp . getClass ( ) ; Class infoClass = infoClass ( cmpClass ) ; Method [ ] ms = infoClass . getMethods ( ) ; for ( Method m : ms ) { if ( m . getAnnotation ( ann ) != null ) { if ( m . getReturnType ( ) != Void . TYPE || m . getParameterTypes ( ) . length > 0 ) { throw new IllegalArgumentException ( "I... |
public class Utils { /** * Shifting the feature Locations according to the new sequence locations
* @ param entry
* @ param deletedBeginNs
* ( number of deleted ' n ' s at the beginning of sequence )
* @ return ArrayList ( Validation Messages ) */
public static ArrayList < ValidationMessage > shiftLocation ( En... | ArrayList < Feature > gapFeatures = new ArrayList < Feature > ( ) ; ArrayList < Feature > invalidFeatures = new ArrayList < Feature > ( ) ; ArrayList < ValidationMessage > validationMessages = new ArrayList < ValidationMessage > ( ) ; if ( entry == null ) { return null ; } List < Feature > features = entry . getFeature... |
public class BranchController { /** * Gets the template instance for a branch */
@ RequestMapping ( value = "branches/{branchId}/template/instance" , method = RequestMethod . GET ) public TemplateInstance getTemplateInstance ( @ PathVariable ID branchId ) { } } | return branchTemplateService . getTemplateInstance ( branchId ) . orElseThrow ( ( ) -> new BranchNotTemplateInstanceException ( branchId ) ) ; |
public class ClasspathElementModule { /** * / * ( non - Javadoc )
* @ see io . github . classgraph . ClasspathElement # open (
* nonapi . io . github . classgraph . concurrency . WorkQueue , nonapi . io . github . classgraph . utils . LogNode ) */
@ Override void open ( final WorkQueue < ClasspathEntryWorkUnit > wo... | if ( ! scanSpec . scanModules ) { if ( log != null ) { log . log ( "Skipping module, since module scanning is disabled: " + getModuleName ( ) ) ; } skipClasspathElement = true ; return ; } try { moduleReaderProxyRecycler = nestedJarHandler . moduleRefToModuleReaderProxyRecyclerMap . get ( moduleRef , /* ignored */
null... |
public class AuditEncryptionImpl { /** * * openKeyStore method to open keystore in the form of a file or a url * * */
protected static InputStream openKeyStore ( String fileName ) throws MalformedURLException , IOException { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "openKeyStore" + fileName ) ; ; try { OpenKeyStoreAction action = new OpenKeyStoreAction ( fileName ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "openKeyStore" ) ; return ( InputStream ) java . security . AccessController . doPrivileged ( action ) ; } catch ( java... |
public class ParsedScheduleExpression { /** * Returns the next day of the month after < tt > day < / tt > that satisfies the
* dayOfMonth constraint .
* @ param day the current 0 - based day of the month
* @ return a value greater than or equal to < tt > day < / tt > */
private int getNextDayOfMonth ( int day ) {... | if ( ! contains ( daysOfMonth , day ) ) { long higher = higher ( daysOfMonth , day ) ; if ( higher != 0 ) { return first ( higher ) ; } return ADVANCE_TO_NEXT_MONTH ; } return day ; |
public class ExampleFitPolygon { /** * Fits polygons to found contours around binary blobs . */
public static void fitBinaryImage ( GrayF32 input ) { } } | GrayU8 binary = new GrayU8 ( input . width , input . height ) ; BufferedImage polygon = new BufferedImage ( input . width , input . height , BufferedImage . TYPE_INT_RGB ) ; // the mean pixel value is often a reasonable threshold when creating a binary image
double mean = ImageStatistics . mean ( input ) ; // create a ... |
public class InstanceFilter { /** * Builds a node for a single type ( meaning no ' | ' in the path ) .
* @ param path a non - null type
* @ return a non - null node */
private static Node buildNodeForPath ( String path ) { } } | // The path cannot be empty , guaranteed by AllHelper
final String [ ] elements = path . split ( PATH_SEPARATOR , - 1 ) ; final int last = elements . length - 1 ; // Iterate in reverse order , as the instances we want are those on the right side of the path .
AndNode rootNode = null ; AndNode parentNode = null ; for ( ... |
public class ConfusionMatrix { /** * Return recall for labels
* @ return double */
public Map < String , Double > getRecallForLabels ( ) { } } | Map < String , Double > recalls = new LinkedHashMap < > ( ) ; for ( String label : allGoldLabels ) { double recall = getRecallForLabel ( label ) ; recalls . put ( label , recall ) ; } return recalls ; |
public class EngineManager { /** * Get an instance of a RenderEngine . This is a factory method .
* Defaults to a default RenderEngine . Currently this is a
* basic EngineManager with no additional features that is
* distributed with Radeox .
* @ return engine default RenderEngine */
public static synchronized ... | // availableEngines = null ;
if ( null == availableEngines ) { availableEngines = new HashMap ( ) ; } if ( ! availableEngines . containsKey ( DEFAULT ) ) { RenderEngine engine = new BaseRenderEngine ( ) ; availableEngines . put ( engine . getName ( ) , engine ) ; } return ( RenderEngine ) availableEngines . get ( DEFAU... |
public class Stanza { /** * Adds a collection of stanza extensions to the packet . Does nothing if extensions is null .
* @ param extensions a collection of stanza extensions */
public void addExtensions ( Collection < ExtensionElement > extensions ) { } } | if ( extensions == null ) return ; for ( ExtensionElement packetExtension : extensions ) { addExtension ( packetExtension ) ; } |
public class SIXAResourceProxy { /** * @ return Returns the lowest message priority of either the joined resource ( if we are joined
* to one ) , or us if we are not .
* @ see com . ibm . ws . sib . comms . client . Transaction # getLowestMessagePriority ( ) */
public short getLowestMessagePriority ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getLowestMessagePriority" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Current state = " + state ) ; final short result ; if ( state == ResourceState . J... |
public class ApiTokenStore { /** * Defensive approach to avoid involuntary change since the UUIDs are generated at startup only for UI
* and so between restart they change */
public synchronized void reconfigure ( @ Nonnull Map < String , JSONObject > tokenStoreDataMap ) { } } | tokenList . forEach ( hashedToken -> { JSONObject receivedTokenData = tokenStoreDataMap . get ( hashedToken . uuid ) ; if ( receivedTokenData == null ) { LOGGER . log ( Level . INFO , "No token received for {0}" , hashedToken . uuid ) ; return ; } String name = receivedTokenData . getString ( "tokenName" ) ; if ( Strin... |
public class Dater { /** * Returns a new Comparer that target date milliseconds minus the delegate date milliseconds as comparison object
* @ param targetDate
* @ return */
public Comparer < Long > until ( String targetDate ) { } } | return until ( this . style . from ( ) . apply ( targetDate ) ) ; |
public class Http2ClientStreamTransportState { /** * Called by subclasses whenever { @ code Headers } are received from the transport .
* @ param headers the received headers */
protected void transportHeadersReceived ( Metadata headers ) { } } | Preconditions . checkNotNull ( headers , "headers" ) ; if ( transportError != null ) { // Already received a transport error so just augment it . Something is really , really strange .
transportError = transportError . augmentDescription ( "headers: " + headers ) ; return ; } try { if ( headersReceived ) { transportErr... |
public class FSDirectory { /** * Updates namespace and diskspace consumed for all
* directories until the parent directory of file represented by path .
* @ param path path for the file .
* @ param nsDelta the delta change of namespace
* @ param dsDelta the delta change of diskspace
* @ throws QuotaExceededEx... | updateSpaceConsumed ( path , null , nsDelta , dsDelta ) ; |
public class CoreOAuthConsumerSupport { /** * Loads the OAuth parameters for the given resource at the given URL and the given token . These parameters include
* any query parameters on the URL since they are included in the signature . The oauth parameters are NOT encoded .
* @ param details The resource details .... | Map < String , Set < CharSequence > > oauthParams = new TreeMap < String , Set < CharSequence > > ( ) ; if ( additionalParameters != null ) { for ( Map . Entry < String , String > additionalParam : additionalParameters . entrySet ( ) ) { Set < CharSequence > values = oauthParams . get ( additionalParam . getKey ( ) ) ;... |
public class Stoichiometry { /** * Make a combined Stoichiometry object of < i > this < / > and the < i > other < / > .
* The combined list of clusters will be ordered by the number of subunits .
* @ return new { @ link Stoichiometry } object . */
public Stoichiometry combineWith ( Stoichiometry other ) { } } | Set < SubunitCluster > combinedClusters = new LinkedHashSet < > ( ) ; combinedClusters . addAll ( this . orderedClusters ) ; combinedClusters . addAll ( other . orderedClusters ) ; Stoichiometry combinedStoichiometry ; if ( this . strategy == StringOverflowStrategy . CUSTOM ) { combinedStoichiometry = new Stoichiometry... |
public class LoggingFraction { /** * Add a ConsoleHandler to the list of handlers for this logger .
* @ param level The logging level
* @ param formatter A pattern string for the console ' s formatter
* @ return This fraction */
public LoggingFraction consoleHandler ( Level level , String formatter ) { } } | consoleHandler ( new ConsoleHandler ( CONSOLE ) . level ( level ) . namedFormatter ( formatter ) ) ; return this ; |
public class CmsDriverManager { /** * Returns a new publish list that contains the unpublished resources related
* to all resources in the given publish list , the related resources exclude
* all resources in the given publish list and also locked ( by other users ) resources . < p >
* @ param dbc the current dat... | Map < String , CmsResource > relations = new HashMap < String , CmsResource > ( ) ; // check if progress should be set in the thread
A_CmsProgressThread thread = null ; if ( Thread . currentThread ( ) instanceof A_CmsProgressThread ) { thread = ( A_CmsProgressThread ) Thread . currentThread ( ) ; } // get all resources... |
public class BAMShard { /** * Appends chunks from another bin to the list and moved the end position . */
public void addBin ( List < Chunk > chunksToAdd , long lastLocus ) { } } | assert chunks != null ; contig = new Contig ( contig . referenceName , contig . start , lastLocus ) ; chunks . addAll ( chunksToAdd ) ; updateSpan ( ) ; |
public class WindowReferenceBuilder { /** * / * ( non - Javadoc )
* @ see org . kie . reteoo . builder . ReteooComponentBuilder # build ( org . kie . reteoo . builder . BuildContext , org . kie . reteoo . builder . BuildUtils , org . kie . rule . RuleConditionElement ) */
public void build ( BuildContext context , Bu... | final WindowReference window = ( WindowReference ) rce ; final WindowNode node = context . getKnowledgeBase ( ) . getReteooBuilder ( ) . getWindowNode ( window . getName ( ) ) ; context . setObjectSource ( node ) ; context . setCurrentEntryPoint ( node . getEntryPoint ( ) ) ; |
public class JXMapKit { /** * Sets if the zoom buttons should be visible . This ia bound property . Changes can be listened for using a
* PropertyChaneListener
* @ param zoomButtonsVisible new value of the zoomButtonsVisible property */
public void setZoomButtonsVisible ( boolean zoomButtonsVisible ) { } } | boolean old = this . isZoomButtonsVisible ( ) ; this . zoomButtonsVisible = zoomButtonsVisible ; zoomInButton . setVisible ( zoomButtonsVisible ) ; zoomOutButton . setVisible ( zoomButtonsVisible ) ; firePropertyChange ( "zoomButtonsVisible" , old , this . isZoomButtonsVisible ( ) ) ; |
public class SingleFileStore { /** * Manipulates the free entries for optimizing disk space . */
private void processFreeEntries ( ) { } } | // Get a reverse sorted list of free entries based on file offset ( bigger entries will be ahead of smaller entries )
// This helps to work backwards with free entries at end of the file
List < FileEntry > l = new ArrayList < > ( freeList ) ; l . sort ( ( o1 , o2 ) -> { long diff = o1 . offset - o2 . offset ; return ( ... |
public class TransactWriteItemsResult { /** * A list of tables that were processed by < code > TransactWriteItems < / code > and , for each table , information about
* any item collections that were affected by individual < code > UpdateItem < / code > , < code > PutItem < / code > or
* < code > DeleteItem < / code... | setItemCollectionMetrics ( itemCollectionMetrics ) ; return this ; |
public class GroupTemplate { /** * 执行某个脚本 , 参数是paras , 返回的是顶级变量
* @ param key
* @ param paras
* @ param w
* @ param loader 额外的资源管理器就在脚本
* @ return
* @ throws ScriptEvalError */
public Map runScript ( String key , Map < String , Object > paras , Writer w , ResourceLoader loader ) throws ScriptEvalError { } } | Template t = loadScriptTemplate ( key , loader ) ; t . fastBinding ( paras ) ; if ( w == null ) { t . render ( ) ; } else { t . renderTo ( w ) ; } try { Map map = getSrirptTopScopeVars ( t ) ; if ( map == null ) { throw new ScriptEvalError ( ) ; } return map ; } catch ( ScriptEvalError ex ) { throw ex ; } catch ( Excep... |
public class TermOfUsePanel { /** * Factory method for creating the new { @ link Component } for the legal references . This method
* is invoked in the constructor from the derived classes and can be overridden so users can
* provide their own version of a new { @ link Component } for the legal references .
* @ p... | return new LegalReferencesPanel ( id , Model . of ( model . getObject ( ) ) ) ; |
public class Stripe { /** * Blocking method to create a { @ link Token } for a Connect Account . Do not call this on the UI
* thread .
* @ param accountParams params to use for this token .
* @ param publishableKey the publishable key to use with this request . If null is passed in as
* the publishable key , we... | String apiKey = publishableKey == null ? mDefaultPublishableKey : publishableKey ; if ( apiKey == null ) { return null ; } validateKey ( publishableKey ) ; RequestOptions requestOptions = RequestOptions . builder ( publishableKey , mStripeAccount , RequestOptions . TYPE_QUERY ) . build ( ) ; try { return mApiHandler . ... |
public class QRSCT { /** * Sets the reference of this builder ! ! ! If you set this attribute ,
* attribute text will be reset to an empty string ! ! ! It ' s only possible to
* define one of these attributes
* @ param reference
* reference ( max length : 35)
* @ return QRSCT builder */
public QRSCT reference... | if ( reference != null && reference . length ( ) <= 35 ) { this . text = "" ; // $ NON - NLS - 1 $
this . reference = checkValidSigns ( reference ) ; return this ; } throw new IllegalArgumentException ( "supplied reference [" + reference // $ NON - NLS - 1 $
+ "] not valid: has to be not null and of max length 35" ) ; ... |
public class Page { /** * Locate closest page in ancestor package hierarchy ( if any ) . */
public Page findAncestor ( String name ) { } } | Path rootPath = Paths . get ( mdw . getAssetRoot ( ) . getPath ( ) ) . normalize ( ) ; Path pkgPath = Paths . get ( getAsset ( ) . getFile ( ) . getPath ( ) ) . normalize ( ) ; while ( pkgPath != null && pkgPath . startsWith ( rootPath ) ) { if ( new File ( pkgPath + "/" + PackageDir . PACKAGE_JSON_PATH ) . exists ( ) ... |
public class Logger { /** * Log . */
public void debug ( String message , Throwable t ) { } } | if ( getLevel ( ) > Level . DEBUG . ordinal ( ) ) return ; logMessage ( Level . DEBUG , message , t ) ; |
public class TransportApiClient { /** * Gets a specific agency .
* @ param agencyId The id of the agency you want to get .
* @ return An agency . */
public TransportApiResult < Agency > getAgency ( String agencyId ) { } } | if ( Extensions . isNullOrWhiteSpace ( agencyId ) ) { throw new IllegalArgumentException ( "AgencyId is required." ) ; } return TransportApiClientCalls . getAgency ( tokenComponent , settings , agencyId ) ; |
public class DependencyListView { /** * Retrieve the require information ( regarding filters ) of a dependency
* @ param dependency Dependency
* @ param license License
* @ return String [ ] */
private String [ ] getDependencyCells ( final Dependency dependency , final License license ) { } } | final List < String > cells = new ArrayList < > ( ) ; if ( decorator . getShowSources ( ) ) { cells . add ( dependency . getSourceName ( ) ) ; } if ( decorator . getShowSourcesVersion ( ) ) { cells . add ( dependency . getSourceVersion ( ) ) ; } if ( decorator . getShowTargets ( ) ) { cells . add ( dependency . getTarg... |
public class SIMPTransactionManager { /** * Creates a local transaction .
* @ return The uncoordinated transaction */
public LocalTransaction createLocalTransaction ( boolean useSingleResourceOnly ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createLocalTransaction" ) ; LocalTransaction tran = null ; // Venu Removing the createLocalTransactionWithSubordinates ( ) as it has to happen only
// in case of PEV resources
tran = transactionFactory . createLocalTransact... |
public class FieldTypeHelper { /** * Retrieve a FieldType instance based on an ID value from
* an MPP9 or MPP12 file .
* @ param fieldID field ID
* @ return FieldType instance */
public static final FieldType getInstance ( int fieldID ) { } } | FieldType result ; int prefix = fieldID & 0xFFFF0000 ; int index = fieldID & 0x0000FFFF ; switch ( prefix ) { case MPPTaskField . TASK_FIELD_BASE : { result = MPPTaskField . getInstance ( index ) ; if ( result == null ) { result = getPlaceholder ( TaskField . class , index ) ; } break ; } case MPPResourceField . RESOUR... |
public class RowProcessingPublisher { /** * Sorts a list of consumers into their execution order
* @ param consumers
* @ return */
public static List < RowProcessingConsumer > sortConsumers ( List < RowProcessingConsumer > consumers ) { } } | final RowProcessingConsumerSorter sorter = new RowProcessingConsumerSorter ( consumers ) ; final List < RowProcessingConsumer > sortedConsumers = sorter . createProcessOrderedConsumerList ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Row processing order ({} consumers):" , sortedConsumers . size ( ) ) ; ... |
public class PluginCommandLine { /** * Returns the value of the specified option .
* @ param optionName
* The option name
* @ return The value of the option * @ see it . jnrpe . ICommandLine # getOptionValue ( String ) */
public String getOptionValue ( final String optionName ) { } } | if ( optionName . length ( ) == 1 ) { return getOptionValue ( optionName . charAt ( 0 ) ) ; } return ( String ) commandLine . getValue ( "--" + optionName ) ; |
public class HorizontalRecordsProcessor { /** * セルの入力規則の範囲を修正する 。
* @ param sheet
* @ param recordOperation */
private void correctDataValidation ( final Sheet sheet , final RecordOperation recordOperation ) { } } | if ( recordOperation . isNotExecuteRecordOperation ( ) ) { return ; } // TODO : セルの結合も考慮する
// 操作をしていないセルの範囲の取得
final CellRangeAddress notOperateRange = new CellRangeAddress ( recordOperation . getTopLeftPoisitoin ( ) . y , recordOperation . getBottomRightPosition ( ) . y - recordOperation . getCountInsertRecord ( ) , r... |
public class StringUtils { /** * Capitalizes the first { @ link Character letter } for the { @ link String } .
* @ param value { @ link String } to capitalize .
* @ return the given { @ link String } with the first { @ link Character letter } capitalized .
* @ throws IllegalArgumentException if the { @ link Strin... | Assert . hasText ( value , "Value [%s] is required" , value ) ; String firstCharacter = String . valueOf ( value . charAt ( 0 ) ) ; return firstCharacter . toUpperCase ( ) . concat ( value . substring ( 1 ) ) ; |
public class FunctionsUtil { /** * Returns a default function if the argument is { @ code null } . The default function ' s { @ link IntFunction # apply ( int )
* apply } method will always return { @ code null } . If a non - { @ code null } function is passed to this method , it is
* returned as - is .
* @ param... | if ( func == null ) { return ( i ) -> null ; } return func ; |
public class ApplicationMetadata { /** * Adds the entity metadata .
* @ param persistenceUnit
* the persistence unit
* @ param clazz
* the clazz
* @ param entityMetadata
* the entity metadata */
public void addEntityMetadata ( String persistenceUnit , Class < ? > clazz , EntityMetadata entityMetadata ) { } ... | Metamodel metamodel = getMetamodelMap ( ) . get ( persistenceUnit ) ; Map < String , EntityMetadata > entityClassToMetadataMap = ( ( MetamodelImpl ) metamodel ) . getEntityMetadataMap ( ) ; if ( entityClassToMetadataMap == null || entityClassToMetadataMap . isEmpty ( ) ) { entityClassToMetadataMap . put ( clazz . getNa... |
public class QosModels { /** * Get the actions of a rule filtered by its name */
public static List < Action > getActions ( MonitoringRule rule , String nameFilter ) { } } | List < Action > result = new ArrayList < Action > ( ) ; if ( nameFilter == null ) { throw new NullPointerException ( "nameFilter cannot be null" ) ; } for ( Action action : getActions ( rule ) ) { if ( nameFilter . equalsIgnoreCase ( action . getName ( ) ) ) { result . add ( action ) ; } } return result ; |
public class TangoAttConfig { private void fireTangoAttConfigEvent ( TangoAttConfig tangoAttConfig , EventData eventData ) { } } | TangoAttConfigEvent tangoAttConfigEvent = new TangoAttConfigEvent ( tangoAttConfig , eventData ) ; // Notifying those that are interested in this event
ArrayList < EventListener > listeners = event_listeners . getListeners ( ITangoAttConfigListener . class ) ; for ( EventListener eventListener : listeners ) { ( ( ITang... |
public class ValuesAction { /** * Return list of settings by component uuid , sorted from project to lowest module */
private Multimap < String , Setting > loadComponentSettings ( DbSession dbSession , Set < String > keys , ComponentDto component ) { } } | List < String > componentUuids = DOT_SPLITTER . splitToList ( component . moduleUuidPath ( ) ) ; List < ComponentDto > componentDtos = dbClient . componentDao ( ) . selectByUuids ( dbSession , componentUuids ) ; Set < Long > componentIds = componentDtos . stream ( ) . map ( ComponentDto :: getId ) . collect ( Collector... |
public class CmsRoleManager { /** * Returns all resources of organizational units for which the current user has
* the given role role . < p >
* @ param cms the current cms context
* @ param role the role to check
* @ return a list of { @ link org . opencms . file . CmsResource } objects
* @ throws CmsExcepti... | return m_securityManager . getManageableResources ( cms . getRequestContext ( ) , role ) ; |
public class StringValue { @ Override public void read ( final DataInput in ) throws IOException { } } | int len = in . readUnsignedByte ( ) ; if ( len >= HIGH_BIT ) { int shift = 7 ; int curr ; len = len & 0x7f ; while ( ( curr = in . readUnsignedByte ( ) ) >= HIGH_BIT ) { len |= ( curr & 0x7f ) << shift ; shift += 7 ; } len |= curr << shift ; } this . len = len ; this . hashCode = 0 ; ensureSize ( len ) ; final char [ ]... |
public class CachePanel { /** * A call of this method should validate the positions of the panels
* components . */
@ Override public void relocate ( ) { } } | int w = 310 , h = 255 ; int x = ( this . getWidth ( ) - w ) / 2 , y = ( this . getHeight ( ) - h ) / 2 ; taskLimitationsLabel . setLocation ( x , y ) ; articleTaskLabel . setLocation ( x , y + 30 ) ; articleTaskLimitField . setLocation ( x + 110 , y + 30 ) ; diffTaskLabel . setLocation ( x , y + 60 ) ; diffTaskLimitFie... |
public class Log { /** * all message size in the broker ( some old messages has been deleted )
* @ return effected message size */
public long size ( ) { } } | int size = 0 ; for ( LogSegment seg : segments . getView ( ) ) { size += seg . size ( ) ; } return size ; |
public class CollectionUtils { /** * Adds all elements from the given { @ link Iterable } to the { @ link Collection } .
* @ param < E > { @ link Class } type of the elements in the { @ link Collection } and { @ link Iterable } .
* @ param < T > concrete { @ link Class } type of the { @ link Collection } .
* @ pa... | Assert . notNull ( collection , "Collection is required" ) ; for ( E element : nullSafeIterable ( iterable ) ) { collection . add ( element ) ; } return collection ; |
public class FlowControllerFactory { /** * Get the map of shared flows for the given path . The map is derived from the shared flows
* that are declared ( through the < code > sharedFlowRefs < / code > attribute of
* { @ link org . apache . beehive . netui . pageflow . annotations . Jpf . Controller & # 64 ; Jpf . ... | String parentDir = PageFlowUtils . getModulePathForRelativeURI ( path ) ; HttpServletRequest request = context . getHttpRequest ( ) ; HttpServletResponse response = context . getHttpResponse ( ) ; ModuleConfig mc = InternalUtils . ensureModuleConfig ( parentDir , getServletContext ( ) ) ; LinkedHashMap /* < String , Sh... |
public class Quaternion { /** * Sets this quaternion to the rotation of ( 0 , 0 , - 1 ) onto the supplied normalized vector .
* @ return a reference to the quaternion , for chaining . */
public Quaternion fromVectorFromNegativeZ ( double tx , double ty , double tz ) { } } | double angle = Math . acos ( - tz ) ; if ( angle < MathUtil . EPSILON ) { return set ( IDENTITY ) ; } if ( angle > Math . PI - MathUtil . EPSILON ) { return set ( 0f , 1f , 0f , 0f ) ; // 180 degrees about y
} double len = Math . hypot ( tx , ty ) ; return fromAngleAxis ( angle , ty / len , - tx / len , 0f ) ; |
public class StringIterate { /** * @ return true if all of the characters in the { @ code string } answer true for the specified { @ code predicate } .
* @ deprecated since 7.0 . Use { @ link # allSatisfyChar ( String , CharPredicate ) } instead . */
@ Deprecated public static boolean allSatisfy ( String string , Cha... | return StringIterate . allSatisfyChar ( string , predicate ) ; |
public class ApiOvhMe { /** * Alter this object properties
* REST : PUT / me / subAccount / { id }
* @ param body [ required ] New object properties
* @ param id [ required ] Id of the object */
public void subAccount_id_PUT ( Long id , OvhSubAccount body ) throws IOException { } } | String qPath = "/me/subAccount/{id}" ; StringBuilder sb = path ( qPath , id ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ; |
public class Configuration { public static final RecoveryLogComponent getRecoveryLogComponent ( ) { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getRecoveryLogComponent" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getRecoveryLogComponent" , _reclogComponent ) ; return _reclogComponent ; |
public class DisconnectUserImpl { /** * / * ( non - Javadoc )
* @ see com . tvd12 . ezyfox . core . command . BaseCommand # execute ( ) */
@ SuppressWarnings ( "unchecked" ) @ Override public Boolean execute ( ) { } } | User user = CommandUtil . getSfsUser ( username , api ) ; api . disconnectUser ( user , new IDisconnectionReason ( ) { @ Override public int getValue ( ) { return getByteValue ( ) ; } @ Override public byte getByteValue ( ) { return reasonId ; } } ) ; return Boolean . TRUE ; |
public class HttpUtil { /** * Performs an HTTP POST on the given URL .
* Basic auth is used if both username and password are not null
* @ param uri The URI to connect to .
* @ param body The POST body .
* @ param contentType The ContentType of the POST body .
* @ param username Credentials - username
* @ p... | return postBody ( new HttpPost ( uri ) , body , contentType , new UsernamePasswordCredentials ( username , password ) , null ) ; |
public class StringValue { /** * Sets the value of the StringValue to the given string .
* @ param value The new string value . */
@ Override public void setValue ( StringValue value ) { } } | checkNotNull ( value ) ; setValue ( value . value , 0 , value . len ) ; |
public class FnBigDecimal { /** * It divides the target element by the given divisor and returns the
* remainder ( target % divisor ) . The remainder precision and { @ link RoundingMode }
* is specified by the given { @ link MathContext }
* @ param divisor the divisor
* @ param mathContext the { @ link MathCont... | return remainder ( Byte . valueOf ( divisor ) , mathContext ) ; |
public class SchemaParserImpl { /** * / * ( non - Javadoc )
* @ see nz . co . senanque . schemaparser . SchemaParserInterface # findOperandInScope ( java . lang . String , java . lang . String ) */
@ Override public FieldDescriptor findOperandInScope ( String scope , String operand ) { } } | ObjectDescriptor currentScope = m_classes . get ( scope ) ; StringTokenizer st = new StringTokenizer ( operand , "." ) ; FieldDescriptor ret = null ; while ( st . hasMoreTokens ( ) ) { if ( currentScope == null ) { return null ; } String token = st . nextToken ( ) ; ret = currentScope . get ( token ) ; if ( ret == null... |
public class Sample { /** * Does the linear interpolation with the next sample
* @ since 06.06.2006
* @ param currentTuningPos
* @ return */
private int getLinearInterpolated ( final int currentSamplePos , final int currentTuningPos ) { } } | final long s1 = ( ( long ) sample [ currentSamplePos ] ) << Helpers . SAMPLE_SHIFT ; final long s2 = ( ( long ) sample [ currentSamplePos + 1 ] ) << Helpers . SAMPLE_SHIFT ; return ( int ) ( ( s1 + ( ( ( s2 - s1 ) * ( ( long ) currentTuningPos ) ) >> Helpers . SHIFT ) ) >> Helpers . SAMPLE_SHIFT ) ; |
public class ArrayMath { /** * Returns the smallest element of the matrix */
public static int max ( int [ ] [ ] matrix ) { } } | int max = Integer . MIN_VALUE ; for ( int [ ] row : matrix ) { for ( int elem : row ) { max = Math . max ( max , elem ) ; } } return max ; |
public class ShapeFittingOps { /** * < p > Fits a polygon to the provided sequence of connected points . The found polygon is returned as a list of
* vertices . Each point in the original sequence is guaranteed to be within " toleranceDist ' of a line segment . < / p >
* < p > Internally a split - and - merge algor... | PolylineSplitMerge alg = new PolylineSplitMerge ( ) ; alg . setLoops ( loop ) ; alg . setMinimumSideLength ( minimumSideLength ) ; alg . setCornerScorePenalty ( cornerPenalty ) ; alg . process ( sequence ) ; PolylineSplitMerge . CandidatePolyline best = alg . getBestPolyline ( ) ; FastQueue < PointIndex_I32 > output = ... |
public class GeneratorMojo { /** * Extends { @ link MavenProject } s < code > CompileSourceRoots < / code > and
* < code > TestCompileSourceRoots < / code > with the directories holding the
* generated source code artifacts .
* There ' s no problem in adding the same directory multiple times because
* this is h... | // Add source artifacts
if ( isVerbose ( ) ) { getLog ( ) . info ( "Adding compile source directory '" + outletSrcDir + "'" ) ; } project . addCompileSourceRoot ( outletSrcDir . getAbsolutePath ( ) ) ; if ( isVerbose ( ) ) { getLog ( ) . info ( "Adding compile source directory '" + outletSrcOnceDir + "'" ) ; } project ... |
public class HttpSessionsPanel { /** * Gets the panel ' s toolbar .
* @ return the panel toolbar */
private javax . swing . JToolBar getPanelToolbar ( ) { } } | if ( panelToolbar == null ) { // Initialize the toolbar
panelToolbar = new javax . swing . JToolBar ( ) ; panelToolbar . setLayout ( new java . awt . GridBagLayout ( ) ) ; panelToolbar . setEnabled ( true ) ; panelToolbar . setFloatable ( false ) ; panelToolbar . setRollover ( true ) ; panelToolbar . setPreferredSize (... |
public class PipelineConfig { /** * A list of < code > Function < / code > objects .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setFunctions ( java . util . Collection ) } or { @ link # withFunctions ( java . util . Collection ) } if you want to
* over... | if ( this . functions == null ) { setFunctions ( new java . util . ArrayList < String > ( functions . length ) ) ; } for ( String ele : functions ) { this . functions . add ( ele ) ; } return this ; |
public class AbstractBeanJsonSerializer { /** * Serializes all the properties of the bean in a json object .
* @ param writer writer
* @ param value bean to serialize
* @ param ctx context of the serialization process
* @ param ignoredProperties ignored properties
* @ param identityInfo identity info
* @ pa... | writer . beginObject ( ) ; if ( null != typeName && null != typeInformation ) { writer . name ( typeName ) ; writer . value ( typeInformation ) ; } if ( null != idWriter ) { writer . name ( identityInfo . getPropertyName ( ) ) ; idWriter . serializeId ( writer , ctx ) ; } serializeProperties ( writer , value , ctx , ig... |
public class HandlerHolder { /** * Deliver this event to the next target handler pulled from the
* handlerQueue . If the handler is not reentrant , the delivery will be
* serialized to prevent multiple threads entering the handler concurrently . */
void fireEvent ( ) { } } | boolean useLock = ! isReentrant ( ) ; if ( useLock ) { lock . lock ( ) ; } EventImpl event = eventQueue . poll ( ) ; try { if ( event != null ) { fireEvent ( event ) ; } } finally { if ( useLock ) { lock . unlock ( ) ; } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.