signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class CommerceNotificationQueueEntryPersistenceImpl { /** * Returns the first commerce notification queue entry in the ordered set where sentDate & lt ; & # 63 ; .
* @ param sentDate the sent date
* @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > )
* @ ret... | CommerceNotificationQueueEntry commerceNotificationQueueEntry = fetchByLtS_First ( sentDate , orderByComparator ) ; if ( commerceNotificationQueueEntry != null ) { return commerceNotificationQueueEntry ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "sentDate... |
public class AlignmentTools { /** * Fundamentally , an alignment is just a list of aligned residues in each
* protein . This method converts two lists of ResidueNumbers into an
* AFPChain .
* < p > Parameters are filled with defaults ( often null ) or sometimes
* calculated .
* < p > For a way to modify the a... | // input validation
int alnLen = aligned1 . length ; if ( alnLen != aligned2 . length ) { throw new IllegalArgumentException ( "Alignment lengths are not equal" ) ; } AFPChain a = new AFPChain ( AFPChain . UNKNOWN_ALGORITHM ) ; try { a . setName1 ( ca1 [ 0 ] . getGroup ( ) . getChain ( ) . getStructure ( ) . getName ( ... |
public class InventoryAggregatorMarshaller { /** * Marshall the given parameter object . */
public void marshall ( InventoryAggregator inventoryAggregator , ProtocolMarshaller protocolMarshaller ) { } } | if ( inventoryAggregator == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( inventoryAggregator . getExpression ( ) , EXPRESSION_BINDING ) ; protocolMarshaller . marshall ( inventoryAggregator . getAggregators ( ) , AGGREGATORS_BINDING ) ; p... |
public class JvmMetricPoller { /** * { @ inheritDoc } */
@ Override public final List < Metric > poll ( MetricFilter filter , boolean reset ) { } } | long now = System . currentTimeMillis ( ) ; MetricList metrics = new MetricList ( filter ) ; addClassLoadingMetrics ( now , metrics ) ; addCompilationMetrics ( now , metrics ) ; addGarbageCollectorMetrics ( now , metrics ) ; addMemoryPoolMetrics ( now , metrics ) ; addOperatingSystemMetrics ( now , metrics ) ; addThrea... |
public class Matrix4x3d { /** * / * ( non - Javadoc )
* @ see org . joml . Matrix4x3dc # shadow ( double , double , double , double , org . joml . Matrix4x3dc , org . joml . Matrix4x3d ) */
public Matrix4x3d shadow ( double lightX , double lightY , double lightZ , double lightW , Matrix4x3dc planeTransform , Matrix4x... | // compute plane equation by transforming ( y = 0)
double a = planeTransform . m10 ( ) ; double b = planeTransform . m11 ( ) ; double c = planeTransform . m12 ( ) ; double d = - a * planeTransform . m30 ( ) - b * planeTransform . m31 ( ) - c * planeTransform . m32 ( ) ; return shadow ( lightX , lightY , lightZ , lightW... |
public class LeaderRole { /** * Ensures the local server is not the leader . */
private void stepDown ( ) { } } | if ( raft . getLeader ( ) != null && raft . getLeader ( ) . equals ( raft . getCluster ( ) . getMember ( ) ) ) { raft . setLeader ( null ) ; } |
public class RecommendationsInner { /** * Disable all recommendations for an app .
* Disable all recommendations for an app .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param siteName Name of the app .
* @ param serviceCallback the async ServiceCallback to handle ... | return ServiceFuture . fromResponse ( disableAllForWebAppWithServiceResponseAsync ( resourceGroupName , siteName ) , serviceCallback ) ; |
public class ArgumentAttr { /** * Main entry point for attributing an argument with given tree and attribution environment . */
Type attribArg ( JCTree tree , Env < AttrContext > env ) { } } | Env < AttrContext > prevEnv = this . env ; try { this . env = env ; tree . accept ( this ) ; return result ; } finally { this . env = prevEnv ; } |
public class JoynrRuntimeImpl { /** * Registers a provider in the joynr framework
* @ param domain
* The domain the provider should be registered for . Has to be identical at the client to be able to find
* the provider .
* @ param provider
* Instance of the provider implementation ( has to extend a generated... | JoynrInterface joynrInterfaceAnnotatation = AnnotationUtil . getAnnotation ( provider . getClass ( ) , JoynrInterface . class ) ; if ( joynrInterfaceAnnotatation == null ) { throw new IllegalArgumentException ( "The provider object must have a JoynrInterface annotation" ) ; } Class interfaceClass = joynrInterfaceAnnota... |
public class RequestUtils { /** * Checks if the requests content - type contains application / json
* @ param exchange The Undertow HttpServerExchange
* @ return True if the request content - type contains application / json , false otherwise */
public static boolean isJsonRequest ( HttpServerExchange exchange ) { ... | Objects . requireNonNull ( exchange , Required . HTTP_SERVER_EXCHANGE . toString ( ) ) ; final HeaderMap headerMap = exchange . getRequestHeaders ( ) ; return headerMap != null && headerMap . get ( Header . CONTENT_TYPE . toHttpString ( ) ) != null && headerMap . get ( Header . CONTENT_TYPE . toHttpString ( ) ) . eleme... |
public class CmsDriverManager { /** * Returns a list of all template resources which must be processed during a static export . < p >
* @ param dbc the current database context
* @ param parameterResources flag for reading resources with parameters ( 1 ) or without ( 0)
* @ param timestamp for reading the data fr... | return getProjectDriver ( dbc ) . readStaticExportResources ( dbc , parameterResources , timestamp ) ; |
public class AsyncTableEntryReader { /** * Creates a new { @ link AsyncTableEntryReader } that can be used to read a { @ link TableEntry } with a an optional
* matching key .
* @ param soughtKey ( Optional ) An { @ link ArrayView } representing the Key to match . If provided , a { @ link TableEntry }
* will only ... | return new EntryReader ( soughtKey , keyVersion , serializer , timer ) ; |
public class SnapshotJobBuilder { /** * / * ( non - Javadoc )
* @ see org . duracloud . snapshot . manager . spring . batch . BatchJobBuilder # buildIdentifyingJobParameters ( java . lang . Object ) */
@ Override public JobParameters buildIdentifyingJobParameters ( Snapshot snapshot ) { } } | Map < String , JobParameter > map = createIdentifyingJobParameters ( snapshot ) ; JobParameters params = new JobParameters ( map ) ; return params ; |
public class PushSelectCriteria { /** * Move the criteria that applies to the join to be included in the actual join criteria .
* @ param criteriaNode the SELECT node ; may not be null
* @ param joinNode the JOIN node ; may not be null */
private void moveCriteriaIntoOnClause ( PlanNode criteriaNode , PlanNode join... | List < Constraint > constraints = joinNode . getPropertyAsList ( Property . JOIN_CONSTRAINTS , Constraint . class ) ; Constraint criteria = criteriaNode . getProperty ( Property . SELECT_CRITERIA , Constraint . class ) ; // since the parser uses EMPTY _ LIST , check for size 0 also
if ( constraints == null || constrain... |
public class ReflTools { /** * Sets the field < tt > fieldName < / tt > of an object < tt > obj < / tt > to a the
* value < tt > value < / tt > .
* @ param obj The object
* @ param fieldName the field name
* @ param value The value */
public static final void setValue ( Object obj , String fieldName , Object va... | try { getField ( obj . getClass ( ) , fieldName ) . set ( obj , value ) ; } catch ( IllegalArgumentException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } |
public class ConnectionMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Connection connection , ProtocolMarshaller protocolMarshaller ) { } } | if ( connection == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( connection . getOwnerAccount ( ) , OWNERACCOUNT_BINDING ) ; protocolMarshaller . marshall ( connection . getConnectionId ( ) , CONNECTIONID_BINDING ) ; protocolMarshaller . m... |
public class AgentLoader { /** * Finds attach method in VirtualMachine .
* @ param vmClass
* VirtualMachine class
* @ return ' attach ' Method
* @ throws SecurityException
* If access is not legal
* @ throws NoSuchMethodException
* If no such method is found */
private static Method getAttachMethod ( Clas... | return vmClass . getMethod ( "attach" , new Class < ? > [ ] { String . class } ) ; |
public class ProviderInfo { /** * 得到属性值 , 先去动态属性 , 再取静态属性
* @ param key 属性Key
* @ return 属性值 */
public String getAttr ( String key ) { } } | String val = ( String ) dynamicAttrs . get ( key ) ; return val == null ? staticAttrs . get ( key ) : val ; |
public class TransactionSynchronizationRegistryImpl { /** * { @ inheritDoc } */
public Object getResource ( Object key ) { } } | TransactionImpl tx = registry . getTransaction ( ) ; return tx . getResource ( key ) ; |
public class Diff { /** * DifferenceListener implementation .
* If the { @ link Diff # overrideDifferenceListener overrideDifferenceListener }
* method has been called then the interpretation of the difference
* will be delegated .
* @ param difference
* @ return a DifferenceListener . RETURN _ . . . constant... | int returnValue = evaluate ( difference ) ; switch ( returnValue ) { case RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL : return returnValue ; case RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR : identical = false ; haltComparison = false ; break ; case RETURN_ACCEPT_DIFFERENCE : identical = false ; if ( difference . isRecoverable... |
public class BingImagesImpl { /** * The Image Detail Search API lets you search on Bing and get back insights about an image , such as webpages that include the image . This section provides technical details about the query parameters and headers that you use to request insights of images and the JSON response objects... | return detailsWithServiceResponseAsync ( query , detailsOptionalParameter ) . map ( new Func1 < ServiceResponse < ImageInsights > , ImageInsights > ( ) { @ Override public ImageInsights call ( ServiceResponse < ImageInsights > response ) { return response . body ( ) ; } } ) ; |
public class Frame { /** * Get the number of arguments passed to given method invocation , including
* the object instance if the call is to an instance method .
* @ param ins
* the method invocation instruction
* @ param cpg
* the ConstantPoolGen for the class containing the method
* @ return number of arg... | int numConsumed = ins . consumeStack ( cpg ) ; if ( numConsumed == Const . UNPREDICTABLE ) { throw new DataflowAnalysisException ( "Unpredictable stack consumption in " + ins ) ; } return numConsumed ; |
public class AbstractSequenceClassifier { /** * Makes a DocumentReaderAndWriter based on
* flags . plainTextReaderAndWriter . Useful for reading in
* untokenized text documents or reading plain text from the command
* line . An example of a way to use this would be to return a
* edu . stanford . nlp . wordseg .... | String readerClassName = flags . plainTextDocumentReaderAndWriter ; // We set this default here if needed because there may be models
// which don ' t have the reader flag set
if ( readerClassName == null ) { readerClassName = SeqClassifierFlags . DEFAULT_PLAIN_TEXT_READER ; } DocumentReaderAndWriter < IN > readerAndWr... |
public class SimpleAttributeListOpenRenderer { /** * { @ inheritDoc } */
@ Override public final void renderAttributeListOpen ( final StringBuilder builder , final int pad , final GedObject subObject ) { } } | if ( subObject . hasAttributes ( ) ) { GedRenderer . renderPad ( builder , pad , true ) ; builder . append ( "<ul>\n" ) ; } |
public class CheckBoxMenuItemPainter { /** * Paint the check mark in enabled state .
* @ param g the Graphics2D context to paint with .
* @ param width the width .
* @ param height the height . */
private void paintCheckIconEnabledAndSelected ( Graphics2D g , int width , int height ) { } } | Shape s = shapeGenerator . createCheckMark ( 0 , 0 , width , height ) ; g . setPaint ( iconEnabledSelected ) ; g . fill ( s ) ; |
public class LiveVariablesAnalysis { /** * Parameters belong to the function scope , but variables defined in the function body belong to
* the function body scope . Assign a unique index to each variable , regardless of which scope it ' s
* in . */
private void addScopeVariables ( ) { } } | int num = 0 ; for ( Var v : orderedVars ) { scopeVariables . put ( v . getName ( ) , num ) ; num ++ ; } |
public class PayloadSender { /** * Executed when we ' re done with the current payload
* @ param payload - current payload
* @ param cancelled - flag indicating if payload Http - request was cancelled
* @ param errorMessage - if not < code > null < / code > - payload request failed
* @ param responseCode - http... | sendingFlag = false ; // mark sender as ' not busy '
try { if ( listener != null ) { listener . onFinishSending ( this , payload , cancelled , errorMessage , responseCode , responseData ) ; } } catch ( Exception e ) { ApptentiveLog . e ( e , "Exception while notifying payload listener" ) ; logException ( e ) ; } |
public class DomainsInner { /** * Get a domain .
* Get properties of a domain .
* @ param resourceGroupName The name of the resource group within the user ' s subscription .
* @ param domainName Name of the domain
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws CloudExc... | return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , domainName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class AbstractCommand { /** * 执行命令
* @ param params
* @ return
* @ throws APPErrorException */
@ Override public Object excute ( Object ... params ) throws APPErrorException { } } | Object obj = tgtools . util . JsonParseHelper . parseToObject ( params [ 0 ] . toString ( ) , getModelClass ( ) , false ) ; invoke ( obj ) ; return true ; |
public class DefaultSentryClientFactory { /** * Whether to sample events , and if so how much to allow through to the server ( from 0.0 to 1.0 ) .
* @ param dsn Sentry server DSN which may contain options .
* @ return The ratio of events to allow through to server , or null if sampling is disabled . */
protected Do... | return Util . parseDouble ( Lookup . lookup ( SAMPLE_RATE_OPTION , dsn ) , null ) ; |
public class NetworkSadnessTransformer { /** * Return the next event that is safe for delivery or null
* if there are no safe objects to deliver .
* Null response could mean no events , or could mean all events
* are scheduled for the future .
* @ param systemCurrentTimeMillis The current time . */
@ Override p... | // drain all the waiting messages from the source ( up to 10k )
while ( delayed . size ( ) < 10000 ) { T event = source . next ( systemCurrentTimeMillis ) ; if ( event == null ) { break ; } transformAndQueue ( event , systemCurrentTimeMillis ) ; } return delayed . nextReady ( systemCurrentTimeMillis ) ; |
public class NIOLockFile { /** * does the real work of releasing the FileLock */
private boolean releaseFileLock ( ) { } } | // Note : Closing the super class RandomAccessFile has the
// side - effect of closing the file lock ' s FileChannel ,
// so we do not deal with this here .
boolean success = false ; if ( this . fileLock == null ) { success = true ; } else { try { this . fileLock . release ( ) ; success = true ; } catch ( Exception e )... |
public class BalancerUrlRewriter { /** * Return the path within the web application for the given request .
* < p > Detects include request URL if called within a RequestDispatcher include . */
public String getPathWithinApplication ( HttpServletRequest request ) { } } | String requestUri = request . getRequestURI ( ) ; if ( requestUri == null ) requestUri = "" ; String decodedRequestUri = decodeRequestString ( request , requestUri ) ; String contextPath = "" ; // getContextPath ( request ) ;
String path ; if ( StringUtils . startsWithIgnoreCase ( decodedRequestUri , contextPath ) && !... |
public class AmazonCloudFormationClient { /** * Returns the stack instance that ' s associated with the specified stack set , AWS account , and region .
* For a list of stack instances that are associated with a specific stack set , use < a > ListStackInstances < / a > .
* @ param describeStackInstanceRequest
* @... | request = beforeClientExecution ( request ) ; return executeDescribeStackInstance ( request ) ; |
public class MSwingUtilities { /** * Démarre un composant dans une Frame sans pack ( ) ( utile pour écrire des méthodes main sur des panels en développement ) .
* @ param component
* JComponent
* @ return la Frame créée */
public static JFrame runUnpacked ( final JComponent component ) { } } | component . setPreferredSize ( component . getSize ( ) ) ; return run ( component ) ; |
public class CrnkClient { /** * Generic access using { @ link Resource } class without type mapping . */
public ResourceRepository < Resource , String > getRepositoryForPath ( String resourceType ) { } } | init ( ) ; ResourceInformation resourceInformation = new ResourceInformation ( moduleRegistry . getTypeParser ( ) , Resource . class , resourceType , null , null , PagingSpec . class ) ; return ( ResourceRepository < Resource , String > ) decorate ( new ResourceRepositoryStubImpl < > ( this , Resource . class , resourc... |
public class ComputeNodesImpl { /** * Gets the Remote Desktop Protocol file for the specified compute node .
* Before you can access a node by using the RDP file , you must create a user account on the node . This API can only be invoked on pools created with a cloud service configuration . For pools created with a v... | if ( this . client . batchUrl ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.batchUrl() is required and cannot be null." ) ; } if ( poolId == null ) { throw new IllegalArgumentException ( "Parameter poolId is required and cannot be null." ) ; } if ( nodeId == null ) { throw new IllegalArgum... |
public class PlaneSweepCrackerHelper { /** * Merges two coincident edges into one . The edge2 becomes invalid . */
void mergeEdges_ ( int edge1 , int edge2 ) { } } | // dbg _ check _ edge _ ( edge1 ) ;
int cluster_1 = getEdgeCluster ( edge1 , 0 ) ; int cluster2 = getEdgeCluster ( edge1 , 1 ) ; int cluster21 = getEdgeCluster ( edge2 , 0 ) ; int cluster22 = getEdgeCluster ( edge2 , 1 ) ; int originVertices1 = getEdgeOriginVertices ( edge1 ) ; int originVertices2 = getEdgeOriginVertic... |
public class HijrahDate { /** * Obtains an instance of { @ code HijrahDate } from the era , year - of - era
* month - of - year and day - of - month .
* @ param era the era to represent , not null
* @ param yearOfEra the year - of - era to represent , from 1 to 9999
* @ param monthOfYear the month - of - year t... | Jdk8Methods . requireNonNull ( era , "era" ) ; checkValidYearOfEra ( yearOfEra ) ; checkValidMonth ( monthOfYear ) ; checkValidDayOfMonth ( dayOfMonth ) ; long gregorianDays = getGregorianEpochDay ( era . prolepticYear ( yearOfEra ) , monthOfYear , dayOfMonth ) ; return new HijrahDate ( gregorianDays ) ; |
public class ByteUtils { /** * Converts a byte array into an UTF String .
* @ param bytes
* used to be converted
* @ return UTF String
* @ throws IllegalArgumentException
* if codePoint is less than 0 or greater than 0X10FFFF */
public static String toUTF ( byte [ ] bytes ) { } } | int codePoint = ByteBuffer . wrap ( bytes ) . getInt ( ) ; if ( codePoint < 0 || codePoint > 0X10FFFF ) throw new IllegalArgumentException ( "RangeError: pack(U): value out of range" ) ; return String . valueOf ( ( char ) codePoint ) ; |
public class RefinePolyLineCorner { /** * If A * A + B * B = = 1 then a simplified distance formula can be used */
protected static double distance ( LineGeneral2D_F64 line , Point2D_I32 p ) { } } | return Math . abs ( line . A * p . x + line . B * p . y + line . C ) ; |
public class DFSClient { /** * Get the data transfer protocol version supported in the cluster
* assuming all the datanodes have the same version .
* @ return the data transfer protocol version supported in the cluster */
public int getDataTransferProtocolVersion ( ) throws IOException { } } | synchronized ( dataTransferVersion ) { if ( dataTransferVersion == - 1 ) { // Get the version number from NN
try { int remoteDataTransferVersion = namenode . getDataTransferProtocolVersion ( ) ; updateDataTransferProtocolVersionIfNeeded ( remoteDataTransferVersion ) ; } catch ( RemoteException re ) { IOException ioe = ... |
public class JingleSession { /** * Trigger a session closed event . */
protected void triggerSessionClosed ( String reason ) { } } | // for ( ContentNegotiator contentNegotiator : contentNegotiators ) {
// contentNegotiator . stopJingleMediaSession ( ) ;
// for ( TransportCandidate candidate : contentNegotiator . getTransportNegotiator ( ) . getOfferedCandidates ( ) )
// candidate . removeCandidateEcho ( ) ;
List < JingleListener > listeners = getLi... |
public class UpdateChecker { /** * Downloads the specified update as a jar - file and launches it . The jar
* file will be saved at the same location as the currently executed file
* but will not replace it ( unless it has the same filename but this will
* never happen )
* @ param updateToInstall The { @ link U... | // Reset cancel state
cancelDownloadAndLaunch = false ; if ( gui != null ) { gui . preparePhaseStarted ( ) ; } // Perform Cancel if requested
if ( cancelDownloadAndLaunch ) { // noinspection ConstantConditions
if ( gui != null ) { gui . operationCanceled ( ) ; } return false ; } String destFolder ; File currentSourceFo... |
public class Key { /** * Decrypt the payload of a Fernet token .
* @ param cipherText the padded encrypted payload of a token . The length < em > must < / em > be a multiple of 16 ( 128 bits ) .
* @ param initializationVector the random bytes used in the AES encryption of the token
* @ return the decrypted payloa... | try { final Cipher cipher = Cipher . getInstance ( getCipherTransformation ( ) ) ; cipher . init ( DECRYPT_MODE , getEncryptionKeySpec ( ) , initializationVector ) ; return cipher . doFinal ( cipherText ) ; } catch ( final NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParamet... |
public class AWSServerlessApplicationRepositoryClient { /** * Creates an application version .
* @ param createApplicationVersionRequest
* @ return Result of the CreateApplicationVersion operation returned by the service .
* @ throws TooManyRequestsException
* The client is sending more than the allowed number ... | request = beforeClientExecution ( request ) ; return executeCreateApplicationVersion ( request ) ; |
public class StateDescriptor { /** * Configures optional activation of state time - to - live ( TTL ) .
* < p > State user value will expire , become unavailable and be cleaned up in storage
* depending on configured { @ link StateTtlConfig } .
* @ param ttlConfig configuration of state TTL */
public void enableT... | Preconditions . checkNotNull ( ttlConfig ) ; Preconditions . checkArgument ( ttlConfig . getUpdateType ( ) != StateTtlConfig . UpdateType . Disabled && queryableStateName == null , "Queryable state is currently not supported with TTL" ) ; this . ttlConfig = ttlConfig ; |
public class RTMPConnection { /** * Dispatches event
* @ param event
* Event */
@ Override public void dispatchEvent ( IEvent event ) { } } | if ( log . isDebugEnabled ( ) ) { log . debug ( "Event notify: {}" , event ) ; } // determine if its an outgoing invoke or notify
switch ( event . getType ( ) ) { case CLIENT_INVOKE : ClientInvokeEvent cie = ( ClientInvokeEvent ) event ; invoke ( cie . getMethod ( ) , cie . getParams ( ) , cie . getCallback ( ) ) ; bre... |
public class UrlUtils { /** * Create a map from String to String that represents the contents of the query
* portion of a URL . For each x = y , x is the key and y is the value .
* @ param s the query part of the URI .
* @ return the map . */
public static Map < String , String > parseQueryString ( String s ) { }... | Map < String , String > ht = new HashMap < String , String > ( ) ; StringTokenizer st = new StringTokenizer ( s , "&" ) ; while ( st . hasMoreTokens ( ) ) { String pair = st . nextToken ( ) ; int pos = pair . indexOf ( '=' ) ; if ( pos == - 1 ) { ht . put ( pair . toLowerCase ( ) , "" ) ; } else { ht . put ( pair . sub... |
public class MediaFormatBuilder { /** * Builds the media format definition .
* @ return Media format definition */
public @ NotNull MediaFormat build ( ) { } } | if ( this . name == null ) { throw new IllegalArgumentException ( "Name is missing." ) ; } return new MediaFormat ( name , label , description , width , minWidth , maxWidth , height , minHeight , maxHeight , ratio , ratioWidth , ratioHeight , fileSizeMax , nonNullArray ( extensions ) , renditionGroup , download , inter... |
public class SnapshotNode { /** * Tries to get the most up to date lengths of files under construction . */
void updateLeasedFiles ( SnapshotStorage ssStore ) throws IOException { } } | FSNamesystem fsNamesys = ssStore . getFSNamesystem ( ) ; List < Block > blocksForNN = new ArrayList < Block > ( ) ; leaseUpdateThreadPool = new ThreadPoolExecutor ( 1 , maxLeaseUpdateThreads , 60 , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) ) ; ( ( ThreadPoolExecutor ) leaseUpdateThreadPool ) . allow... |
public class SelfExtractor { /** * Display and obtain agreement for the license terms */
private static boolean obtainLicenseAgreement ( LicenseProvider licenseProvider ) { } } | // Prompt for word - wrapped display of license agreement & information
boolean view ; SelfExtract . wordWrappedOut ( SelfExtract . format ( "showAgreement" , "--viewLicenseAgreement" ) ) ; view = SelfExtract . getResponse ( SelfExtract . format ( "promptAgreement" ) , "" , "xX" ) ; if ( view ) { SelfExtract . showLice... |
public class JobTracker { /** * Change the run - time priority of the given job .
* @ param jobId job id
* @ param priority new { @ link JobPriority } for the job */
synchronized void setJobPriority ( JobID jobId , JobPriority priority ) { } } | JobInProgress job = jobs . get ( jobId ) ; if ( job != null ) { synchronized ( taskScheduler ) { JobStatus oldStatus = ( JobStatus ) job . getStatus ( ) . clone ( ) ; job . setPriority ( priority ) ; JobStatus newStatus = ( JobStatus ) job . getStatus ( ) . clone ( ) ; JobStatusChangeEvent event = new JobStatusChangeEv... |
public class BindTypeSubProcessor { /** * / * ( non - Javadoc )
* @ see javax . annotation . processing . AbstractProcessor # process ( java . util . Set , javax . annotation . processing . RoundEnvironment ) */
@ Override public boolean process ( final Set < ? extends TypeElement > annotations , final RoundEnvironme... | parseBindType ( roundEnv ) ; // Build model
for ( Element element : roundEnv . getElementsAnnotatedWith ( BindType . class ) ) { final Element item = element ; AssertKripton . assertTrueOrInvalidKindForAnnotationException ( item . getKind ( ) == ElementKind . CLASS , item , BindType . class ) ; BindEntityBuilder . pars... |
public class CommonOps_DSCC { /** * Returns a diagonal matrix with the specified diagonal elements .
* @ param values values of diagonal elements
* @ return A diagonal matrix */
public static DMatrixSparseCSC diag ( double ... values ) { } } | int N = values . length ; return diag ( new DMatrixSparseCSC ( N , N , N ) , values , 0 , N ) ; |
public class Image { /** * Deprecates this image .
* @ return a global operation if the deprecation request was successfully sent , { @ code null } if
* the image was not found
* @ throws ComputeException upon failure or if this image is a publicly - available image */
public Operation deprecate ( DeprecationStat... | return compute . deprecate ( getImageId ( ) , deprecationStatus , options ) ; |
public class SVGAndroidRenderer { private void render ( SVG . Polygon obj ) { } } | debug ( "Polygon render" ) ; updateStyleForElement ( state , obj ) ; if ( ! display ( ) ) return ; if ( ! visible ( ) ) return ; if ( ! state . hasStroke && ! state . hasFill ) return ; if ( obj . transform != null ) canvas . concat ( obj . transform ) ; int numPoints = obj . points . length ; if ( numPoints < 2 ) retu... |
public class JsonLdProcessor { /** * Expands the given input according to the steps in the
* < a href = " http : / / www . w3 . org / TR / json - ld - api / # expansion - algorithm " > Expansion
* algorithm < / a > .
* @ param input
* The input JSON - LD object .
* @ param opts
* The { @ link JsonLdOptions ... | // TODO : look into java futures / promises
// 2 ) TODO : better verification of DOMString IRI
if ( input instanceof String && ( ( String ) input ) . contains ( ":" ) ) { try { final RemoteDocument tmp = opts . getDocumentLoader ( ) . loadDocument ( ( String ) input ) ; input = tmp . getDocument ( ) ; // TODO : figure ... |
public class WorkflowClient { /** * Starts the decision task for the given workflow instance
* @ param workflowId the id of the workflow instance */
public void runDecider ( String workflowId ) { } } | Preconditions . checkArgument ( StringUtils . isNotBlank ( workflowId ) , "workflow id cannot be blank" ) ; put ( "workflow/decide/{workflowId}" , null , null , workflowId ) ; |
public class Interpreter { /** * FIXME : This breaks for non - numeric uses if isSubtraction */
private static Object add ( ExecutionContext context , Object lhs , Object rhs ) { } } | if ( lhs instanceof String || rhs instanceof String ) { return ( Types . toString ( context , lhs ) + Types . toString ( context , rhs ) ) ; } Number lhsNum = Types . toNumber ( context , lhs ) ; Number rhsNum = Types . toNumber ( context , rhs ) ; if ( Double . isNaN ( lhsNum . doubleValue ( ) ) || Double . isNaN ( rh... |
public class LocalTrustGraph { /** * create a bidirectional trust link between the nodes with ids ' a ' and ' b '
* @ param a id of node that will form a trust link with ' b '
* @ param b id of node that will form a trust link with ' a ' */
public void addRoute ( final TrustGraphNodeId a , final TrustGraphNodeId b ... | addDirectedRoute ( a , b ) ; addDirectedRoute ( b , a ) ; |
public class PhotosInterface { /** * Set the meta data for the photo .
* This method requires authentication with ' write ' permission .
* @ param photoId
* The photo ID
* @ param title
* The new title
* @ param description
* The new description
* @ throws FlickrException */
public void setMeta ( String... | Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_SET_META ) ; parameters . put ( "photo_id" , photoId ) ; parameters . put ( "title" , title ) ; parameters . put ( "description" , description ) ; Response response = transport . post ( transport . getPath ( ... |
public class LocalCall { /** * Calls this salt call via the async client and returns the results
* as they come in via the event stream .
* @ param localAsync function providing callAsync for LocalCalls
* @ param runnerAsync function providing callAsync for RunnerCalls
* @ param events the event stream to use
... | return localAsync . apply ( this ) . thenApply ( optLar -> { TypeToken < R > returnTypeToken = this . getReturnType ( ) ; Type result = ClientUtils . parameterizedType ( null , Result . class , returnTypeToken . getType ( ) ) ; @ SuppressWarnings ( "unchecked" ) TypeToken < Result < R > > typeToken = ( TypeToken < Resu... |
public class SnapshotStore { /** * Creates a memory snapshot . */
private Snapshot createMemorySnapshot ( SnapshotDescriptor descriptor ) { } } | HeapBuffer buffer = HeapBuffer . allocate ( SnapshotDescriptor . BYTES , Integer . MAX_VALUE ) ; Snapshot snapshot = new MemorySnapshot ( buffer , descriptor . copyTo ( buffer ) , this ) ; LOGGER . debug ( "Created memory snapshot: {}" , snapshot ) ; return snapshot ; |
public class Symm { /** * encode InputStream onto Output Stream
* @ param is
* @ param estimate
* @ return
* @ throws IOException */
public void encode ( InputStream is , OutputStream os ) throws IOException { } } | // StringBuilder sb = new StringBuilder ( ( int ) ( estimate * 1.255 ) ) ; / / try to get the right size of StringBuilder from start . . slightly more than 1.25 times
int prev = 0 ; int read , idx = 0 , line = 0 ; boolean go ; do { read = is . read ( ) ; if ( go = read >= 0 ) { if ( line >= splitLinesAt ) { os . write ... |
public class KeyValueDatabase { /** * Look up potentially matching records . */
public Collection < Record > findCandidateMatches ( Record record ) { } } | if ( DEBUG ) System . out . println ( "---------------------------------------------------------------------------" ) ; // do lookup on all tokens from all lookup properties
// ( we only identify the buckets for now . later we decide how to process
// them )
List < Bucket > buckets = lookup ( record ) ; // preprocess t... |
public class RedisQueue { /** * { @ inheritDoc } */
@ Override protected JedisConnector buildJedisConnector ( ) { } } | JedisConnector jedisConnector = new JedisConnector ( ) ; jedisConnector . setJedisPoolConfig ( JedisUtils . defaultJedisPoolConfig ( ) ) . setRedisHostsAndPorts ( getRedisHostAndPort ( ) ) . setRedisPassword ( getRedisPassword ( ) ) . init ( ) ; return jedisConnector ; |
public class FloatColumnsMathOpTransform { /** * Transform a sequence
* @ param sequence */
@ Override public Object mapSequence ( Object sequence ) { } } | List < List < Float > > seq = ( List < List < Float > > ) sequence ; List < Float > ret = new ArrayList < > ( ) ; for ( List < Float > step : seq ) ret . add ( ( Float ) map ( step ) ) ; return ret ; |
public class ApiOvhMsServices { /** * Alter this object properties
* REST : PUT / msServices / { serviceName } / account / { userPrincipalName } / exchange
* @ param body [ required ] New object properties
* @ param serviceName [ required ] The internal name of your Active Directory organization
* @ param userP... | String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/exchange" ; StringBuilder sb = path ( qPath , serviceName , userPrincipalName ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ; |
public class ApiOvhTelephony { /** * List of available exchange merchandise brand
* REST : GET / telephony / { billingAccount } / line / { serviceName } / phone / merchandiseAvailable
* @ param billingAccount [ required ] The name of your billingAccount
* @ param serviceName [ required ] */
public ArrayList < Ovh... | String qPath = "/telephony/{billingAccount}/line/{serviceName}/phone/merchandiseAvailable" ; StringBuilder sb = path ( qPath , billingAccount , serviceName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t7 ) ; |
public class DefaultErrorWebExceptionHandler { /** * Render the error information as a JSON payload .
* @ param request the current request
* @ return a { @ code Publisher } of the HTTP response */
protected Mono < ServerResponse > renderErrorResponse ( ServerRequest request ) { } } | boolean includeStackTrace = isIncludeStackTrace ( request , MediaType . ALL ) ; Map < String , Object > error = getErrorAttributes ( request , includeStackTrace ) ; return ServerResponse . status ( getHttpStatus ( error ) ) . contentType ( MediaType . APPLICATION_JSON_UTF8 ) . body ( BodyInserters . fromObject ( error ... |
public class InventorySchedule { /** * Sets the frequency for producing inventory results . */
public void setFrequency ( InventoryFrequency frequency ) { } } | setFrequency ( frequency == null ? ( String ) null : frequency . toString ( ) ) ; |
public class SAXProcessor { /** * Get all permutations of the given alphabet of given length .
* @ param alphabet the alphabet to use .
* @ param wordLength the word length .
* @ return set of permutation . */
public static String [ ] getAllPermutations ( String [ ] alphabet , int wordLength ) { } } | // initialize our returned list with the number of elements calculated above
String [ ] allLists = new String [ ( int ) Math . pow ( alphabet . length , wordLength ) ] ; // lists of length 1 are just the original elements
if ( wordLength == 1 ) return alphabet ; else { // the recursion - - get all lists of length 3 , l... |
public class AppWidgetManagerUtils { /** * Wrapper method of the { @ link android . appwidget . AppWidgetManager # getAppWidgetIds ( android . content . ComponentName ) } .
* @ see android . appwidget . AppWidgetManager # getAppWidgetIds ( android . content . ComponentName ) . */
public static int [ ] getAppWidgetIds... | return appWidgetManager . getAppWidgetIds ( new ComponentName ( context , clazz ) ) ; |
public class AbstractDb { /** * 检查数据库是否支持事务 , 此项检查同一个数据源只检查一次 , 如果不支持抛出DbRuntimeException异常
* @ param conn Connection
* @ throws SQLException 获取元数据信息失败
* @ throws DbRuntimeException 不支持事务 */
protected void checkTransactionSupported ( Connection conn ) throws SQLException , DbRuntimeException { } } | if ( null == isSupportTransaction ) { isSupportTransaction = conn . getMetaData ( ) . supportsTransactions ( ) ; } if ( false == isSupportTransaction ) { throw new DbRuntimeException ( "Transaction not supported for current database!" ) ; } |
public class SystemConfiguration { /** * Returns for given parameter < i > _ id < / i > the instance of class
* { @ link SystemConfiguration } .
* @ param _ id id of the system configuration
* @ return instance of class { @ link SystemConfiguration }
* @ throws CacheReloadException on error */
public static Sys... | final Cache < Long , SystemConfiguration > cache = InfinispanCache . get ( ) . < Long , SystemConfiguration > getCache ( SystemConfiguration . IDCACHE ) ; if ( ! cache . containsKey ( _id ) ) { SystemConfiguration . getSystemConfigurationFromDB ( SystemConfiguration . SQL_ID , _id ) ; } return cache . get ( _id ) ; |
public class SipFactoryImpl { /** * ( non - Javadoc )
* @ see javax . servlet . sip . SipFactory # createAddress ( javax . servlet . sip . URI ,
* java . lang . String ) */
public Address createAddress ( URI uri , String displayName ) { } } | try { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Creating Address from URI[" + uri . toString ( ) + "] with display name[" + displayName + "]" ) ; } javax . sip . address . Address address = SipFactoryImpl . addressFactory . createAddress ( ( ( URIImpl ) uri ) . getURI ( ) ) ; address . setDisplayName ( dis... |
public class AbstractJdbcHelper { /** * Calculate fetch size used for streaming .
* @ param hintFetchSize
* @ param conn
* @ return
* @ throws SQLException */
protected int calcFetchSizeForStream ( int hintFetchSize , Connection conn ) throws SQLException { } } | DatabaseVendor dbVendor = DbcHelper . detectDbVendor ( conn ) ; switch ( dbVendor ) { case MYSQL : return Integer . MIN_VALUE ; default : return hintFetchSize < 0 ? 1 : hintFetchSize ; } |
public class locationfile { /** * Use this API to fetch all the locationfile resources that are configured on netscaler . */
public static locationfile get ( nitro_service service ) throws Exception { } } | locationfile obj = new locationfile ( ) ; locationfile [ ] response = ( locationfile [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; |
public class GaugeSkin { /** * * * * * * Private Methods * * * * * */
private void rotateNeedle ( double value ) { } } | double startOffsetAngle = 180 - startAngle ; double targetAngle ; if ( NeedleBehavior . STANDARD == needleBehavior ) { if ( ScaleDirection . CLOCKWISE == gauge . getScaleDirection ( ) ) { targetAngle = startOffsetAngle + ( value - minValue ) * angleStep ; targetAngle = Helper . clamp ( startOffsetAngle , startOffsetAng... |
public class SyntaxNum { public void init ( String st , int minsize , int maxsize ) { } } | super . init ( check ( st ) , minsize , maxsize ) ; |
public class LdapHelper { /** * Returns a Value from the Default Collection .
* @ param key the key of the default - collection .
* @ return the default value for that key if exists otherwise an empty
* string . */
public String getDefault ( final String key ) { } } | if ( defaultValues . containsKey ( key ) ) { return defaultValues . get ( key ) ; } return "" ; |
public class DataUtils { /** * Checks if a given value is the default value . Default value can be
* < ul >
* < li > { @ code null } < / li >
* < li > empty string < / li >
* < li > 0 < / li >
* < li > 0,00 < / li >
* < / ul >
* @ param value
* the value to check
* @ return { @ code true } if the valu... | if ( value == null || value . equals ( "" ) || value . equals ( "0,00" ) || value . equals ( "0" ) ) { return true ; } return false ; |
public class AnimatedImageResultBuilder { /** * Builds the { @ link AnimatedImageResult } . The preview bitmap and the decoded frames are closed
* after build is called , so this should not be called more than once or those fields will be lost
* after the first call .
* @ return the result */
public AnimatedImage... | try { return new AnimatedImageResult ( this ) ; } finally { CloseableReference . closeSafely ( mPreviewBitmap ) ; mPreviewBitmap = null ; CloseableReference . closeSafely ( mDecodedFrames ) ; mDecodedFrames = null ; } |
public class CharacterEncoder { /** * Return a byte array from the remaining bytes in this ByteBuffer .
* The ByteBuffer ' s position will be advanced to ByteBuffer ' s limit .
* To avoid an extra copy , the implementation will attempt to return the
* byte array backing the ByteBuffer . If this is not possible , ... | /* * This should never return a BufferOverflowException , as we ' re
* careful to allocate just the right amount . */
byte [ ] buf = null ; /* * If it has a usable backing byte buffer , use it . Use only
* if the array exactly represents the current ByteBuffer . */
if ( bb . hasArray ( ) ) { byte [ ] tmp = bb . arr... |
public class FreeMarkerRender { /** * Set freemarker ' s property .
* The value of template _ update _ delay is 5 seconds .
* Example : FreeMarkerRender . setProperty ( " template _ update _ delay " , " 1600 " ) ; */
public static void setProperty ( String propertyName , String propertyValue ) { } } | try { FreeMarkerRender . getConfiguration ( ) . setSetting ( propertyName , propertyValue ) ; } catch ( TemplateException e ) { throw new RuntimeException ( e ) ; } |
public class MessageProcessorControl { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . runtime . MessageProcessorControllable # getLocalQueuePointControlByID ( java . lang . String ) */
public SIMPLocalQueuePointControllable getLocalQueuePointControlByID ( String id ) throws SIMPInvalidRuntimeI... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getLocalQueuePointControlByID" , new Object [ ] { id } ) ; SIMPLocalQueuePointControllable control = null ; // Extract destination uuid and msgStore id
String [ ] tokens = id . split ( RuntimeControlConstants . QUEUE_ID_INS... |
public class AbstractStringBasedEbeanQuery { /** * ( non - Javadoc )
* @ see org . springframework . data . ebean . repository . query . AbstractEbeanQuery # doCreateQuery ( java . lang . Object [ ] ) */
@ Override public EbeanQueryWrapper doCreateQuery ( Object [ ] values ) { } } | ParameterAccessor accessor = new ParametersParameterAccessor ( getQueryMethod ( ) . getParameters ( ) , values ) ; EbeanQueryWrapper query = createEbeanQuery ( this . query . getQueryString ( ) ) ; return createBinder ( values ) . bindAndPrepare ( query ) ; |
public class RestorePhoneNumberRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RestorePhoneNumberRequest restorePhoneNumberRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( restorePhoneNumberRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( restorePhoneNumberRequest . getPhoneNumberId ( ) , PHONENUMBERID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall reque... |
public class KillBillHttpClient { /** * HEAD */
public Response doHead ( final String uri , final RequestOptions requestOptions ) throws KillBillClientException { } } | return doHead ( uri , requestOptions , this . requestTimeoutSec ) ; |
public class NetworkConverter { /** * Convert a JSON link object into a Java Link object .
* @ param net the network to populate
* @ param o the JSON object to convert */
public void linkFromJSON ( Model mo , Network net , JSONObject o ) throws JSONConverterException { } } | net . connect ( requiredInt ( o , "id" ) , readCapacity ( o ) , getSwitch ( net , requiredInt ( o , SWITCH_LABEL ) ) , physicalElementFromJSON ( mo , net , ( JSONObject ) o . get ( "physicalElement" ) ) ) ; |
public class AbstractCassandraStorage { /** * convert object to ByteBuffer */
protected ByteBuffer objToBB ( Object o ) { } } | if ( o == null ) return nullToBB ( ) ; if ( o instanceof java . lang . String ) return ByteBuffer . wrap ( new DataByteArray ( ( String ) o ) . get ( ) ) ; if ( o instanceof Integer ) return Int32Type . instance . decompose ( ( Integer ) o ) ; if ( o instanceof Long ) return LongType . instance . decompose ( ( Long ) o... |
public class DecimalConvertor { /** * Produces decimal digits for non - zero , finite floating point values .
* The sign of the value is discarded . Passing in Infinity or NaN produces
* invalid digits . The maximum number of decimal digits that this
* function will likely produce is 9.
* @ param v value
* @ ... | int bits = Float . floatToIntBits ( v ) ; int f = bits & 0x7fffff ; int e = ( bits >> 23 ) & 0xff ; if ( e != 0 ) { // Normalized number .
return toDecimalDigits ( f + 0x800000 , e - 126 , 24 , digits , offset , maxDigits , maxFractDigits , roundMode ) ; } else { // Denormalized number .
return toDecimalDigits ( f , - ... |
public class SubjectHelper { /** * Gets a Hashtable of values from the Subject , but do not trace the hashtable
* @ param subject { @ code null } is not supported .
* @ param properties The properties to get .
* @ return the hashtable containing the properties . */
@ Sensitive public Hashtable < String , ? > getS... | return AccessController . doPrivileged ( new PrivilegedAction < Hashtable < String , ? > > ( ) { @ Override public Hashtable < String , ? > run ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Looking for custom properties in public cred list." ) ; } Set < Object > l... |
public class ChineseLengthValidator { /** * 获取中文字符串长度 中文算N个字符 ( N由 { @ link ChineseLengthConstrant # cnHoldLength ( ) } 指定 ,
* 默认为2 ) , 英文算一个
* @ param value
* @ return */
private long getChineseLength ( String value ) { } } | long valueLength = 0 ; for ( int i = 0 ; i < value . length ( ) ; i ++ ) { /* 获取一个字符 */
char temp = value . charAt ( i ) ; /* 判断是否为中文字符 */
if ( ( temp >= '\u4e00' && temp <= '\u9fa5' ) || ( temp >= '\ufe30' && temp <= '\uffa0' ) ) { /* 中文长度倍数 */
valueLength += this . chineseHoldLength ; } else { /* 其他字符长度为1 */
valueLen... |
public class ChronoFormatter { /** * / * [ deutsch ]
* < p > Konstruiert ein Hilfsobjekt zum Bauen eines globalen Zeitformats mit Verwendung
* des angegebenen Kalendertyps . < / p >
* < p > Zum Formatieren ist es notwendig , die Zeitzone am fertiggestellten Formatierer zu setzen .
* Beim Parsen ist die Kalender... | if ( overrideCalendar == null ) { throw new NullPointerException ( "Missing override calendar." ) ; } return new Builder < > ( Moment . axis ( ) , locale , overrideCalendar ) ; |
public class SolutionStackDescription { /** * The permitted file types allowed for a solution stack .
* @ return The permitted file types allowed for a solution stack . */
public java . util . List < String > getPermittedFileTypes ( ) { } } | if ( permittedFileTypes == null ) { permittedFileTypes = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return permittedFileTypes ; |
public class SheetBindingErrors { /** * パスを指定してフィールドエラーを取得する 。
* < p > 検索する際には 、 引数 「 path 」 に現在のパス ( { @ link # getCurrentPath ( ) } ) を付与して処理します 。 < / p >
* @ param path 最後に ' * ' を付けるとワイルドカードが指定可能 。
* @ return エラーがない場合は空のリストを返す */
public List < FieldError > getFieldErrors ( final String path ) { } } | final String fullPath = buildFieldPath ( path ) ; return getFieldErrors ( ) . stream ( ) . filter ( e -> isMatchingFieldError ( fullPath , e ) ) . collect ( Collectors . toList ( ) ) ; |
public class AbstractRadialBargraph { /** * Returns the bargraph track image
* with the given with and height .
* @ param WIDTH
* @ param START _ ANGLE
* @ param ANGLE _ EXTEND
* @ param APEX _ ANGLE
* @ param BARGRAPH _ OFFSET
* @ param image
* @ return buffered image containing the bargraph track imag... | if ( WIDTH <= 0 ) { return null ; } if ( image == null ) { image = UTIL . createImage ( WIDTH , WIDTH , Transparency . TRANSLUCENT ) ; } final Graphics2D G2 = image . createGraphics ( ) ; G2 . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; // G2 . setRenderingHint ( Rende... |
public class AccessorUtils { /** * Validates that the method annotated with the specified annotation has a single
* argument of the expected type . */
public static void validateArgument ( Method method , Class < ? extends Annotation > annotationType , Class < ? > expectedParameterType ) { } } | if ( method . getParameterTypes ( ) . length != 1 || ! method . getParameterTypes ( ) [ 0 ] . equals ( expectedParameterType ) ) { throw new BeanCreationException ( String . format ( "Method %s with @%s MUST take a single argument of type %s" , method , annotationType . getName ( ) , expectedParameterType . getName ( )... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.