signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class FileCopyProgressMonitor { /** * Main method to test the monitor . Only for testing purposes . * @ param args * Not used . */ public static void main ( final String [ ] args ) { } }
// This runs in the " main " thread ( outside the EDT ) // Initialize the L & F in a thread safe way Utils4Swing . initSystemLookAndFeel ( ) ; // Create an cancel tracker final Cancelable cancelable = new CancelableVolatile ( ) ; // Create the monitor dialog final FileCopyProgressMonitor monitor = new FileCopyProgressM...
public class CurveArrayPropertyType { /** * Gets the value of the curve property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > set < / CO...
if ( _Curve == null ) { _Curve = new ArrayList < JAXBElement < ? extends AbstractCurveType > > ( ) ; } return this . _Curve ;
public class DraggableBehavior { /** * Moves the dragging helper so the cursor always appears to drag from the same * position . Coordinates can be given as a hash using a combination of one or two * keys : { top , left , right , bottom } . * @ param cusorAt * @ return instance of the current behavior * @ dep...
this . options . putLiteral ( "cusorAt" , cusorAt . toString ( ) . toLowerCase ( ) . replace ( '_' , ' ' ) ) ; return this ;
public class NumberExpression { /** * Create a { @ code abs ( this ) } expression * < p > Returns the absolute value of this expression < / p > * @ return abs ( this ) */ public NumberExpression < T > abs ( ) { } }
if ( abs == null ) { abs = Expressions . numberOperation ( getType ( ) , MathOps . ABS , mixin ) ; } return abs ;
public class PhynixxXAResource { /** * called when the current XAresource is expired ( time out occurred ) The * current Impl . does nothing but marked the associated TX as rollback only * The underlying core connection are not treated . . . . * There are two different situation that have to be handled If the *...
try { if ( this . xaConnection != null ) { XATransactionalBranch < C > transactionalBranch = this . xaConnection . toGlobalTransactionBranch ( ) ; if ( transactionalBranch != null ) { transactionalBranch . setRollbackOnly ( true ) ; } } if ( LOG . isInfoEnabled ( ) ) { String logString = "PhynixxXAResource.expired :: X...
public class MethodDocImpl { /** * Return the class that originally defined the method that * is overridden by the current definition , or null if no * such class exists . * @ return a ClassDocImpl representing the superclass that * originally defined this method , null if this method does * not override a de...
com . sun . javadoc . Type t = overriddenType ( ) ; return ( t != null ) ? t . asClassDoc ( ) : null ;
public class CmsSitemapTreeController { /** * If the given resource is the default file of a sitmeap entry folder , then returns that * folder , else the original file . < p > * @ param resource a resource * @ return the resource or its parent folder */ protected CmsResource readSitemapEntryFolderIfPossible ( Cms...
CmsObject cms = A_CmsUI . getCmsObject ( ) ; try { if ( resource . isFolder ( ) ) { return resource ; } CmsResource parent = cms . readParentFolder ( resource . getStructureId ( ) ) ; CmsResource defaultFile = cms . readDefaultFile ( parent , CmsResourceFilter . IGNORE_EXPIRATION ) ; if ( ( defaultFile != null ) && def...
public class FessLoginAssist { @ Override protected void resolveCredential ( final CredentialResolver resolver ) { } }
resolver . resolve ( LocalUserCredential . class , credential -> { final LocalUserCredential userCredential = credential ; final String username = userCredential . getUser ( ) ; final String password = userCredential . getPassword ( ) ; if ( ! fessConfig . isAdminUser ( username ) ) { final OptionalEntity < FessUser > ...
public class Parsers { /** * A { @ link Parser } that sequentially runs { @ code parsers } one by one and collects the return * values in an array . */ public static Parser < Object [ ] > array ( final Parser < ? > ... parsers ) { } }
return new Parser < Object [ ] > ( ) { @ Override boolean apply ( ParseContext ctxt ) { Object [ ] ret = new Object [ parsers . length ] ; for ( int i = 0 ; i < parsers . length ; i ++ ) { Parser < ? > parser = parsers [ i ] ; if ( ! parser . apply ( ctxt ) ) return false ; ret [ i ] = parser . getReturn ( ctxt ) ; } c...
public class XmlRpcDataMarshaller { /** * < p > toRequirementSummary . < / p > * @ param xmlRpcParameters a { @ link java . util . Vector } object . * @ return a { @ link com . greenpepper . server . domain . RequirementSummary } object . */ public static RequirementSummary toRequirementSummary ( Vector < Object > ...
RequirementSummary summary = new RequirementSummary ( ) ; summary . setReferencesSize ( ( Integer ) xmlRpcParameters . get ( SUMMARY_REFERENCES_IDX ) ) ; summary . setFailures ( ( Integer ) xmlRpcParameters . get ( SUMMARY_FAILIURES_IDX ) ) ; summary . setErrors ( ( Integer ) xmlRpcParameters . get ( SUMMARY_ERRORS_IDX...
public class ReadWriteLockPoint { /** * To call when a thread wants to enter write mode . * If write can start immediately , this method returns null . * If the lock point is used in read mode , this method will return a SynchronizationPoint unblocked when write can start . */ public SynchronizationPoint < NoExcept...
SynchronizationPoint < NoException > sp ; synchronized ( this ) { // if nobody is using the resource , we can start writing if ( readers == 0 && ! writer ) { writer = true ; return returnNullIfReady ? null : new SynchronizationPoint < > ( true ) ; } // someone is doing something , we need to block sp = new Synchronizat...
public class DefaultRenditionHandler { /** * Checks if the media args contain any with / height restriction , that means a rendition matching * the given size constraints is requested . Additionally it is checked that at least one image file * extension is requested . * @ param mediaArgs Media arguments * @ ret...
// check that at least one image file extension is in the list of requested extensions boolean anyImageFileExtension = false ; for ( String fileExtension : requestedFileExtensions ) { if ( FileExtension . isImage ( fileExtension ) ) { anyImageFileExtension = true ; } } if ( ! anyImageFileExtension && mediaArgs . getFix...
public class FSElsewhere { private Path getHost ( String id , long version ) { } }
Path ret = root ; for ( String part : id . split ( "-" ) ) { ret = ret . resolve ( part ) ; } return ret . resolve ( "" + version ) ;
public class ZScreenField { /** * Display this screen ' s hidden params . * @ param out The html out stream . * @ exception DBException File exception . */ public Map < String , Object > getHiddenParams ( ) { } }
Map < String , Object > mapParams = this . getScreenField ( ) . getBasePanel ( ) . getHiddenParams ( ) ; String strParamRecord = this . getProperty ( DBParams . RECORD ) ; // Display record if ( strParamRecord == null ) strParamRecord = Constants . BLANK ; String strParamScreen = this . getProperty ( DBParams . SCREEN ...
public class GeometryUtil { /** * Translates a molecule from the origin to a new point denoted by a vector . See comment for * center ( IAtomContainer atomCon , Dimension areaDim , HashMap renderingCoordinates ) for details * on coordinate sets * @ param atomCon molecule to be translated * @ param p Description...
Point2d com = get2DCentreOfMass ( atomCon ) ; Vector2d translation = new Vector2d ( p . x - com . x , p . y - com . y ) ; for ( IAtom atom : atomCon . atoms ( ) ) { if ( atom . getPoint2d ( ) != null ) { atom . getPoint2d ( ) . add ( translation ) ; } }
public class TokenNode { /** * tags */ public void add ( char c ) { } }
if ( c > 0 ) { if ( chars . length ( ) == 0 ) { ContentNode co = new ContentNode ( ) ; addChild ( co ) ; co . chars = chars ; } chars . append ( c ) ; }
public class AxisSplitterMedian { /** * Select the maximum variance as the split */ private void computeAxisVariance ( List < P > points ) { } }
int numPoints = points . size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { mean [ i ] = 0 ; var [ i ] = 0 ; } // compute the mean for ( int i = 0 ; i < numPoints ; i ++ ) { P p = points . get ( i ) ; for ( int j = 0 ; j < N ; j ++ ) { mean [ j ] += distance . valueAt ( p , j ) ; } } for ( int i = 0 ; i < N ; i ++ ) { mean ...
public class FragmentJoiner { /** * Calculate the pairwise compatibility of fpairs . * Iterates through a list of fpairs and joins them if * they have compatible rotation and translation parameters . * @ param fraglst FragmentPair [ ] array * @ param angleDiff angle cutoff * @ param fragCompatDist distance cu...
FragmentPair [ ] tmpfidx = new FragmentPair [ fraglst . length ] ; for ( int i = 0 ; i < fraglst . length ; i ++ ) { tmpfidx [ i ] = ( FragmentPair ) fraglst [ i ] . clone ( ) ; } int n = tmpfidx . length ; // indicator if a fragment was already used int [ ] used = new int [ n ] ; // the final list of joined fragments ...
public class MulticoreExecutor { /** * Creates the worker thread pool . */ private static void createThreadPool ( ) { } }
if ( nprocs == - 1 ) { int n = - 1 ; try { String env = System . getProperty ( "smile.threads" ) ; if ( env != null ) { n = Integer . parseInt ( env ) ; } } catch ( Exception ex ) { logger . error ( "Failed to create multi-core execution thread pool" , ex ) ; } if ( n < 1 ) { nprocs = Runtime . getRuntime ( ) . availab...
public class BufferedIterator { /** * Returns an list of the next tokens in the stream based on the requested * amount . If the stream did not contain as many tokens as was requested , * list will contain the remaining tokens , but will not throw an { @ code * NoSuchElementException } . * @ param tokens the num...
advance ( tokens ) ; return new ArrayList < String > ( buffer . subList ( 0 , Math . min ( tokens , buffer . size ( ) ) ) ) ;
public class JSMessageImpl { /** * concurrency issues . Called by setCaseChain ( ) & assembledForField ( ) . */ private boolean setDominatingCases ( JSType field ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "setDominatingCases" , new Object [ ] { field } ) ; field = findDominatingCase ( field ) ; JSVariant parent = ( JSVariant ) field . getParent ( ) ; if ( parent == null ) { if ( TraceComponent . isAnyTracingEnabled ( )...
public class ServerLogReaderPreTransactional { /** * Sets the current position of the input stream , after a * transaction has been successfully consumed . * @ throws IOException if a fatal error occurred . */ private void updateStreamPosition ( ) throws IOException { } }
try { editLogFilePosition = inputStream . getPosition ( ) ; } catch ( IOException e ) { LOG . error ( "Failed to get edit log file position" , e ) ; throw new IOException ( "updateStreamPosition failed" ) ; }
public class DocumentService { /** * RPC : TIU GET RECORD TEXT * < pre > * Get the textual portion of a TIU Document . * Input parameters : * IEN - IEN [ 8925 ] in the TIU Document file . * ACTION - Defaults to VIEW . . 01 Field for file USR ACTION . * Return format : * An array of text . * Example ( pa...
for ( Document doc : documents ) { if ( doc . getBody ( ) == null ) { List < String > body = broker . callRPCList ( "TIU GET RECORD TEXT" , null , doc . getId ( ) . getIdPart ( ) ) ; doc . setBody ( StrUtil . fromList ( body ) ) ; } }
public class SymbolTable { /** * Method called when copy - on - write is needed ; generally when first * change is made to a derived symbol table . */ private void copyArrays ( ) { } }
String [ ] oldSyms = mSymbols ; int size = oldSyms . length ; mSymbols = new String [ size ] ; System . arraycopy ( oldSyms , 0 , mSymbols , 0 , size ) ; Bucket [ ] oldBuckets = mBuckets ; size = oldBuckets . length ; mBuckets = new Bucket [ size ] ; System . arraycopy ( oldBuckets , 0 , mBuckets , 0 , size ) ;
public class ApiOvhOrder { /** * Get prices and contracts information * REST : GET / order / dedicatedCloud / { serviceName } / vdi * @ param secondPublicIpAddress [ required ] Another avaiable ip from one of your Private Cloud public IP blocks * @ param firstPublicIpAddress [ required ] An avaiable ip from one o...
String qPath = "/order/dedicatedCloud/{serviceName}/vdi" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "datacenterId" , datacenterId ) ; query ( sb , "firstPublicIpAddress" , firstPublicIpAddress ) ; query ( sb , "secondPublicIpAddress" , secondPublicIpAddress ) ; String resp = exec ( qPath , "GET" ,...
public class MaterialAPI { /** * 新增其他类型永久素材 * @ param access _ token access _ token * @ param mediaType mediaType * @ param media 多媒体文件有格式和大小限制 , 如下 : * 图片 ( image ) : 2M , 支持bmp / png / jpeg / jpg / gif格式 * 语音 ( voice ) : 5M , 播放长度不超过60s , 支持AMR \ MP3格式 * 视频 ( video ) : 10MB , 支持MP4格式 * 缩略图 ( thumb ) : 6...
HttpPost httpPost = new HttpPost ( BASE_URI + "/cgi-bin/material/add_material" ) ; FileBody bin = new FileBody ( media ) ; MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder . create ( ) . addPart ( "media" , bin ) ; if ( description != null ) { multipartEntityBuilder . addTextBody ( "description" ,...
public class WTable { /** * Retrieves the constraints for the given action . * @ param button the button to retrieve the constraints for . * @ return the constraints for the given action , or null if there are no constraints . */ public List < ActionConstraint > getActionConstraints ( final WButton button ) { } }
List < ActionConstraint > constraints = getComponentModel ( ) . actionConstraints . get ( button ) ; return constraints == null ? null : Collections . unmodifiableList ( constraints ) ;
public class DirectoryScanner { /** * Do we have to traverse a symlink when trying to reach path from * basedir ? * @ param base base File ( dir ) . * @ param path file path . * @ since Ant 1.6 */ private boolean isSymlink ( File base , String path ) { } }
return isSymlink ( base , SelectorUtils . tokenizePath ( path ) ) ;
public class ContentPackage { /** * If path parts contain namespace definitions they need to be escaped for the ZIP file . * Example : oak : index - > jcr _ root / _ oak _ index * @ param path Path * @ return Safe path */ @ VisibleForTesting static String buildJcrPathForZip ( final String path ) { } }
String normalizedPath = StringUtils . defaultString ( path ) ; if ( ! normalizedPath . startsWith ( "/" ) ) { normalizedPath = "/" + normalizedPath ; } return ROOT_DIR + PlatformNameFormat . getPlatformPath ( normalizedPath ) ;
public class SessionStateEventDispatcher { /** * Method sessionAttributeSet * @ see com . ibm . wsspi . session . ISessionStateObserver # sessionAttributeSet ( com . ibm . wsspi . session . ISession , java . lang . Object , java . lang . Object , java . lang . Object ) */ public void sessionAttributeSet ( ISession so...
// ArrayList sessionStateObservers = null ; /* * Check to see if there is a non - empty list of sessionStateObservers . */ if ( _sessionStateObservers == null || _sessionStateObservers . size ( ) < 1 ) { return ; } // synchronized ( _ sessionStateObservers ) { // sessionStateObservers = ( ArrayList ) _ sessionStateObse...
public class CmsClientUgcSession { /** * Initializes the form belonging to this session . < p > * @ param formElement the form element */ @ NoExport public void initFormElement ( Element formElement ) { } }
m_formWrapper = new CmsUgcWrapper ( formElement , getSessionId ( ) ) ; m_formWrapper . setFormSession ( this ) ;
public class TaskManager { /** * Find out the TaskManager ' s own IP address . */ private InetAddress getTaskManagerAddress ( InetSocketAddress jobManagerAddress ) throws IOException { } }
AddressDetectionState strategy = AddressDetectionState . ADDRESS ; while ( true ) { Enumeration < NetworkInterface > e = NetworkInterface . getNetworkInterfaces ( ) ; while ( e . hasMoreElements ( ) ) { NetworkInterface n = e . nextElement ( ) ; Enumeration < InetAddress > ee = n . getInetAddresses ( ) ; while ( ee . h...
public class BaseProxy { /** * Retrieve this record from the key . * @ param strSeekSign Which way to seek null / = matches data also & gt ; , & lt ; , & gt ; = , and & lt ; = . * @ param strKeyArea The name of the key area to seek on . * @ param objKeyData The data for the seek ( The raw data if a single field ,...
if ( objData instanceof RemoteException ) throw ( RemoteException ) objData ; return objData ;
public class LCharSupplierBuilder { /** * One of ways of creating builder . This is possibly the least verbose way where compiler should be able to guess the generic parameters . */ @ Nonnull public static LCharSupplier charSupplierFrom ( Consumer < LCharSupplierBuilder > buildingFunction ) { } }
LCharSupplierBuilder builder = new LCharSupplierBuilder ( ) ; buildingFunction . accept ( builder ) ; return builder . build ( ) ;
public class CanonicalRequest { /** * Extract parameters from a query string , preserving encoding . * We can ' t use Apache HTTP Client ' s URLEncodedUtils . parse , mainly because * we don ' t want to decode names / values . * @ param rawQuery * the query to parse * @ return The list of parameters , in the ...
List < Parameter > results = new ArrayList < > ( ) ; int endIndex = rawQuery . length ( ) - 1 ; int index = 0 ; while ( 0 <= index && index <= endIndex ) { /* * Ideally we should first look for ' & ' , then look for ' = ' before * the ' & ' , but obviously that ' s not how AWS understand query * parsing ; see the t...
public class UrlEncoded { /** * Decoded parameters to Map . * @ param in the stream containing the encoded parameters * @ param map the MultiMap to decode into * @ param charset the charset to use for decoding * @ param maxLength the maximum length of the form to decode * @ param maxKeys the maximum number of...
// no charset present , use the configured default if ( charset == null ) charset = ENCODING ; if ( StandardCharsets . UTF_8 . equals ( charset ) ) { decodeUtf8To ( in , map , maxLength , maxKeys ) ; return ; } if ( StandardCharsets . ISO_8859_1 . equals ( charset ) ) { decode88591To ( in , map , maxLength , maxKeys ) ...
public class IterableExtensions { /** * Creates a sorted list that contains the items of the given iterable . The resulting list is in ascending order , * according to the natural ordering of the elements in the iterable . * @ param iterable * the items to be sorted . May not be < code > null < / code > . * @ r...
List < T > asList = Lists . newArrayList ( iterable ) ; if ( iterable instanceof SortedSet < ? > ) { if ( ( ( SortedSet < T > ) iterable ) . comparator ( ) == null ) { return asList ; } } return ListExtensions . sortInplace ( asList ) ;
public class Task { /** * Continues a task with the equivalent of a Task - based while loop , where the body of the loop is * a task continuation . */ public Task < Void > continueWhile ( final Callable < Boolean > predicate , final Continuation < Void , Task < Void > > continuation , final Executor executor ) { } }
return continueWhile ( predicate , continuation , executor , null ) ;
public class EventClient { /** * Sends an asynchronous create event request to the API . * @ param event an instance of { @ link Event } that will be turned into a request */ public FutureAPIResponse createEventAsFuture ( Event event ) throws IOException { } }
RequestBuilder builder = new RequestBuilder ( "POST" ) ; builder . setUrl ( apiUrl + "/events.json?accessKey=" + accessKey ) ; String requestJsonString = event . toJsonString ( ) ; builder . setBody ( requestJsonString ) ; builder . setHeader ( "Content-Type" , "application/json" ) ; builder . setHeader ( "Content-Leng...
public class Workflow { /** * Gets and removes all responses for the specified correlation id * < b > Attention < / b > : When a workflow instance is resumed after a < code > Workflow . wait < / code > call , all corresponding * responses for this workflow instance in the storage are read . Each of these responses ...
"rawtypes" , "unchecked" } ) protected < T > List < Response < T > > getAndRemoveResponses ( final String correlationId ) { synchronized ( responseMap ) { final List rv = responseMap . remove ( correlationId ) ; return rv == null ? Collections . emptyList ( ) : new ArrayList ( rv ) ; }
public class PutStatObjectEncrypted { /** * MinioClient . putObject ( ) and MinioClient . statObject ( ) example for SSE _ C . */ public static void main ( String [ ] args ) throws NoSuchAlgorithmException , IOException , InvalidKeyException , XmlPullParserException { } }
try { /* play . min . io for test and development . */ MinioClient minioClient = new MinioClient ( "https://play.min.io:9000" , "Q3AM3UQ867SPQQA43P2F" , "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG" ) ; /* Amazon S3: */ // MinioClient minioClient = new MinioClient ( " https : / / s3 . amazonaws . com " , " YOUR - ACCESSKE...
public class AllPageTitles { /** * { @ inheritDoc } */ @ Override protected Iterator < String > copy ( ) { } }
return new AllPageTitles ( bot ( ) , from , prefix , rf , namespaces ) ;
public class CmsResourceUtil { /** * Returns the resource type for the given resource . < p > * @ return the resource type for the given resource */ public I_CmsResourceType getResourceType ( ) { } }
if ( m_resourceType == null ) { m_resourceType = OpenCms . getResourceManager ( ) . getResourceType ( m_resource ) ; } return m_resourceType ;
public class ServerControllerImpl { /** * Build { @ link SSLContext } using arguments only * @ param keystorePath * @ param keystoreType * @ param keystorePassword * @ param keystoreCertAlias * @ param truststorePath * @ param truststoreType * @ param truststorePassword * @ param validateCerts * @ par...
try { URL keyStoreURL = loadResource ( keystorePath ) ; KeyStore keyStore = getKeyStore ( keyStoreURL , keystoreType != null ? keystoreType : "JKS" , keystorePassword , sslKeystoreProvider ) ; // key managers String _keyManagerFactoryAlgorithm = Security . getProperty ( "ssl.KeyManagerFactory.algorithm" ) == null ? Key...
public class WButtonExample { /** * Examples showing use of client only buttons . */ private void addClientOnlyExamples ( ) { } }
// client command button add ( new WHeading ( HeadingLevel . H2 , "Client command buttons" ) ) ; add ( new ExplanatoryText ( "These examples show buttons which do not submit the form" ) ) ; // client command buttons witho a command WButton nothingButton = new WButton ( "Do nothing" ) ; add ( nothingButton ) ; nothingBu...
public class IssueDescriptionReader { /** * Checks the description version tag . * @ param pIssue * the issue * @ throws IssueParseException * the description version tag doesn ' t describe the expected version * { @ link IssueDescriptionUtils # DESCRIPTION _ VERSION } */ private void checkDescriptionVersion ...
final Matcher m = DESCRIPTION_VERSION_PATTERN . matcher ( pIssue . getDescription ( ) ) ; final int version ; if ( m . find ( ) ) { version = Integer . parseInt ( m . group ( 1 ) ) ; } else { // default version is 1 version = 1 ; } if ( IssueDescriptionUtils . DESCRIPTION_VERSION != version ) { throw new IssueParseExce...
public class SharedCostReader { /** * Make the request to the Twilio API to perform the read . * @ param client TwilioRestClient with which to make the request * @ return SharedCost ResourceSet */ @ Override public ResourceSet < SharedCost > read ( final TwilioRestClient client ) { } }
return new ResourceSet < > ( this , client , firstPage ( client ) ) ;
public class EMMImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . EMM__MM_NAME : setMMName ( ( String ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class TokenPropagationHelper { /** * Authenticate the username , create it ' s Subject and push it on to the thread . * It ' s up to the caller to save off the prior subject and make sure it gets restored , * and guard against any threading issues . * @ param username * @ return true if successful */ pub...
if ( securityService == null || username == null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "returning false because user or securityService is null," + " user= " + username + " secsvc= " + securityService ) ; } return false ; } AuthenticationService authenticationService = securityService . getAuthenticati...
public class MedianOfWidestDimension { /** * Splits a node into two based on the median value of the dimension * in which the points have the widest spread . After splitting two * new nodes are created and correctly initialised . And , node . left * and node . right are set appropriately . * @ param node The no...
correctlyInitialized ( ) ; int splitDim = widestDim ( nodeRanges , universe ) ; // In this case median is defined to be either the middle value ( in case of // odd number of values ) or the left of the two middle values ( in case of // even number of values ) . int medianIdxIdx = node . m_Start + ( node . m_End - node ...
public class Inventory { /** * Removes entries whose configurations are unreadable from the inventory . * @ return the list of entries removed from the inventory */ List < File > removeUnreadable ( ) { } }
// List unreadable List < InventoryEntry > unreadable = configs . values ( ) . stream ( ) . filter ( v -> ! v . getConfiguration ( ) . isPresent ( ) ) . collect ( Collectors . toList ( ) ) ; // Remove from inventory unreadable . forEach ( v -> configs . remove ( v . getIdentifier ( ) ) ) ; // Return the list of removed...
public class CmsLogChannelTable { /** * Fills the context menu . < p > * @ param loggerSet Set of logger to open context menu for */ private void fillContextMenu ( final Set < Logger > loggerSet ) { } }
for ( LoggerLevel level : LoggerLevel . values ( ) ) { final LoggerLevel currentLevel = level ; ContextMenuItem item = m_menu . addItem ( level . getLevelStringComplet ( ) ) ; item . setData ( loggerSet ) ; item . addItemClickListener ( new ContextMenuItemClickListener ( ) { public void contextMenuItemClicked ( Context...
public class SharingElectronMechanism { /** * Initiates the process for the given mechanism . The atoms to apply are mapped between * reactants and products . * @ param atomContainerSet * @ param atomList The list of atoms taking part in the mechanism . Only allowed two atoms * @ param bondList The list of bond...
CDKAtomTypeMatcher atMatcher = CDKAtomTypeMatcher . getInstance ( atomContainerSet . getBuilder ( ) ) ; if ( atomContainerSet . getAtomContainerCount ( ) != 1 ) { throw new CDKException ( "SharingElectronMechanism only expects one IAtomContainer" ) ; } if ( atomList . size ( ) != 2 ) { throw new CDKException ( "Sharing...
public class PearsonDistance { /** * Computes the Pearson correlation between two vectors . If one of the vectors is all zeros , the result is undefined . * In cases where both are zero vectors , 1 will be returned to indicate they are the same . In cases where one of the * numerator coefficients is zero , its valu...
final double aMean ; final double bMean ; if ( bothNonZero ) { aMean = a . sum ( ) / a . nnz ( ) ; bMean = b . sum ( ) / b . nnz ( ) ; } else { aMean = a . mean ( ) ; bMean = b . mean ( ) ; } double r = 0 ; double aSqrd = 0 , bSqrd = 0 ; if ( a . isSparse ( ) || b . isSparse ( ) ) { Iterator < IndexValue > aIter = a . ...
public class UpdateEncryptionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateEncryption updateEncryption , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateEncryption == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateEncryption . getAlgorithm ( ) , ALGORITHM_BINDING ) ; protocolMarshaller . marshall ( updateEncryption . getKeyType ( ) , KEYTYPE_BINDING ) ; protocolMarshaller ....
public class AmazonWorkspacesClient { /** * Describes the available AWS Directory Service directories that are registered with Amazon WorkSpaces . * @ param describeWorkspaceDirectoriesRequest * @ return Result of the DescribeWorkspaceDirectories operation returned by the service . * @ throws InvalidParameterValu...
request = beforeClientExecution ( request ) ; return executeDescribeWorkspaceDirectories ( request ) ;
public class InjectProgram { /** * Configures a bean given a class to instantiate . */ final protected < T > T create ( Class < T > type , InjectContext env ) throws ConfigException { } }
try { T value = type . newInstance ( ) ; inject ( value , env ) ; return value ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw ConfigException . wrap ( e ) ; }
public class TypeDesc { /** * Acquire a TypeDesc from a type descriptor . This syntax is described in * section 4.3.2 , Field Descriptors . */ public static TypeDesc forDescriptor ( String desc ) throws IllegalArgumentException { } }
// TODO : Figure out how to cache these . Using a plain IdentityMap poses // a problem . The back reference to the key causes a memory leak . TypeDesc td ; int cursor = 0 ; int dim = 0 ; try { char c ; while ( ( c = desc . charAt ( cursor ++ ) ) == '[' ) { dim ++ ; } switch ( c ) { case 'V' : td = VOID ; break ; case '...
public class GeneralPurposeFFT_F64_2D { /** * Computes 2D inverse DFT of real data leaving the result in < code > a < / code > * . This method computes full real inverse transform , i . e . you will get the * same result as from < code > complexInverse < / code > called with all imaginary * part equal 0 . Because...
// handle special case if ( rows == 1 || columns == 1 ) { if ( rows > 1 ) fftRows . realInverseFull ( a , scale ) ; else fftColumns . realInverseFull ( a , scale ) ; return ; } if ( isPowerOfTwo ) { for ( int r = 0 ; r < rows ; r ++ ) { fftColumns . realInverse2 ( a , r * columns , scale ) ; } cdft2d_sub ( 1 , a , scal...
public class SeleniumComponent { /** * The Selenium - Webdriver element that represents the component HTML of the * simulated page . * @ param element WebElement object */ public final void setElement ( final WebElement element ) { } }
if ( element == null ) { throw new IllegalArgumentException ( String . format ( ErrorMessages . ERROR_TEMPLATE_VARIABLE_NULL , "element" ) ) ; } this . element = element ; validateElementTag ( ) ; validateAttributes ( ) ;
public class FieldAnnotation { /** * Factory method . Class name , field name , and field signatures are taken * from the given visitor , which is visiting the field . * @ param visitor * the visitor which is visiting the field * @ return the FieldAnnotation object */ public static FieldAnnotation fromVisitedFi...
return new FieldAnnotation ( visitor . getDottedClassName ( ) , visitor . getFieldName ( ) , visitor . getFieldSig ( ) , visitor . getFieldIsStatic ( ) ) ;
public class SipResourceAdaptor { /** * ( non - Javadoc ) * @ see javax . sip . SipListener # processDialogTerminated ( javax . sip . DialogTerminatedEvent ) */ public void processDialogTerminated ( DialogTerminatedEvent dte ) { } }
final Dialog d = dte . getDialog ( ) ; if ( d != null ) { DialogWrapper dw = getDialogWrapper ( d ) ; if ( dw != null ) { processDialogTerminated ( dw ) ; } else { if ( tracer . isFineEnabled ( ) ) { tracer . fine ( "DialogTerminatedEvent dropped due to null app data." ) ; } } }
public class IOSPlatform { /** * Registers your application using the supplied configuration . */ public static IOSPlatform register ( UIApplication app , Config config ) { } }
return register ( app , null , config ) ;
public class PrivacyMetric { /** * < code > . google . privacy . dlp . v2 . PrivacyMetric . CategoricalStatsConfig categorical _ stats _ config = 2; * < / code > */ public com . google . privacy . dlp . v2 . PrivacyMetric . CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder ( ) { } }
if ( typeCase_ == 2 ) { return ( com . google . privacy . dlp . v2 . PrivacyMetric . CategoricalStatsConfig ) type_ ; } return com . google . privacy . dlp . v2 . PrivacyMetric . CategoricalStatsConfig . getDefaultInstance ( ) ;
public class Image { /** * Initialise internal data */ protected final void init ( ) { } }
if ( inited ) { return ; } inited = true ; if ( texture != null ) { width = texture . getImageWidth ( ) ; height = texture . getImageHeight ( ) ; textureOffsetX = 0 ; textureOffsetY = 0 ; textureWidth = texture . getWidth ( ) ; textureHeight = texture . getHeight ( ) ; } initImpl ( ) ; centerX = width / 2 ; centerY = h...
public class UnorderedStreamElementQueue { /** * Add the given stream element queue entry to the current last set if it is not a watermark . * If it is a watermark , then stop adding to the current last set , insert the watermark into its * own set and add a new last set . * @ param streamElementQueueEntry to be ...
assert ( lock . isHeldByCurrentThread ( ) ) ; if ( streamElementQueueEntry . isWatermark ( ) ) { lastSet = new HashSet < > ( capacity ) ; if ( firstSet . isEmpty ( ) ) { firstSet . add ( streamElementQueueEntry ) ; } else { Set < StreamElementQueueEntry < ? > > watermarkSet = new HashSet < > ( 1 ) ; watermarkSet . add ...
public class CacheSetUtil { /** * retrial the cached set * @ param cacheConfigBean the datasource configuration * @ param key the key * @ return the value set */ public static Single < Set < String > > values ( CacheConfigBean cacheConfigBean , String key ) { } }
return SingleRxXian . call ( CacheService . CACHE_SERVICE , "cacheSetMembers" , new JSONObject ( ) { { put ( "cacheConfig" , cacheConfigBean ) ; put ( "key" , key ) ; } } ) . map ( unitResponseObject -> { unitResponseObject . throwExceptionIfNotSuccess ( ) ; return Reflection . toTypedSet ( unitResponseObject . getData...
public class EntityUpdatedData { /** * Adds a single change . * @ param name the name * @ param before the before state * @ param after the after state */ public void addChange ( String name , Enum < ? > before , Enum < ? > after ) { } }
String beforeStr = before != null ? before . name ( ) : null ; String afterStr = after != null ? after . name ( ) : null ; addChange ( name , beforeStr , afterStr ) ;
public class ParameterDefinition { /** * return parameter description , applying the configured MarkupFormatter for jenkins instance . * @ since 1.521 */ public String getFormattedDescription ( ) { } }
try { return Jenkins . getInstance ( ) . getMarkupFormatter ( ) . translate ( description ) ; } catch ( IOException e ) { LOGGER . warning ( "failed to translate description using configured markup formatter" ) ; return "" ; }
public class Gabor { /** * 1 - D Gabor function . * @ param x Value . * @ param mean Mean . * @ param amplitude Amplitude . * @ param position Position . * @ param width Width . * @ param phase Phase . * @ param frequency Frequency . * @ return Gabor response . */ public static double Function1D ( doubl...
double envelope = mean + amplitude * Math . exp ( - Math . pow ( ( x - position ) , 2 ) / Math . pow ( ( 2 * width ) , 2 ) ) ; double carry = Math . cos ( 2 * Math . PI * frequency * ( x - position ) + phase ) ; return envelope * carry ;
public class TemplateTypeMap { /** * Returns true if this map contains the specified template key , false * otherwise . */ @ SuppressWarnings ( "ReferenceEquality" ) public boolean hasTemplateKey ( TemplateType templateKey ) { } }
// Note : match by identity , not equality for ( TemplateType entry : templateKeys ) { if ( entry == templateKey ) { return true ; } } return false ;
public class EnvironmentCheck { /** * Report version information about JAXP interfaces . * Currently distinguishes between JAXP 1.0.1 and JAXP 1.1, * and not found ; only tests the interfaces , and does not * check for reference implementation versions . * @ param h Hashtable to put information in */ protected ...
if ( null == h ) h = new Hashtable ( ) ; final Class noArgs [ ] = new Class [ 0 ] ; Class clazz = null ; try { final String JAXP1_CLASS = "javax.xml.parsers.DocumentBuilder" ; final String JAXP11_METHOD = "getDOMImplementation" ; clazz = ObjectFactory . findProviderClass ( JAXP1_CLASS , ObjectFactory . findClassLoader ...
public class CurrencyHelper { /** * Get the passed value rounded to the appropriate number of fraction digits , * based on this currencies default fraction digits . < br > * The default scaling of this currency is used . * @ param eCurrency * The currency it is about . If < code > null < / code > is provided ...
ValueEnforcer . notNull ( aValue , "Value" ) ; final PerCurrencySettings aPCS = getSettings ( eCurrency ) ; return aValue . setScale ( aPCS . getScale ( ) , aPCS . getRoundingMode ( ) ) ;
public class FeatureCollection { /** * Create a new instance of this class by giving the feature collection a single { @ link Feature } . * @ param feature a single feature * @ return a new instance of this class defined by the values passed inside this static factory * method * @ since 3.0.0 */ public static F...
List < Feature > featureList = Arrays . asList ( feature ) ; return new FeatureCollection ( TYPE , null , featureList ) ;
public class ReactiveNetwork { /** * Observes connectivity with the Internet with default settings . It pings remote host * ( www . google . com ) at port 80 every 2 seconds with 2 seconds of timeout . This operation is used * for determining if device is connected to the Internet or not . Please note that this met...
InternetObservingSettings settings = InternetObservingSettings . create ( ) ; return observeInternetConnectivity ( settings . strategy ( ) , settings . initialInterval ( ) , settings . interval ( ) , settings . host ( ) , settings . port ( ) , settings . timeout ( ) , settings . httpResponse ( ) , settings . errorHandl...
public class BaseDateKeyDeserializer { /** * { @ inheritDoc } */ @ Override protected D doDeserialize ( String key , JsonDeserializationContext ctx ) { } }
// TODO could probably find a better way to handle the parsing without try / catch // Default configuration for serializing keys is using ISO - 8601 , we try that one first // in ISO - 8601 try { return deserializeDate ( ISO_8601_FORMAT . parse ( key ) ) ; } catch ( IllegalArgumentException e ) { // can happen if it ' ...
public class KeyVaultClientBaseImpl { /** * Sets the specified certificate issuer . * The SetCertificateIssuer operation adds or updates the specified certificate issuer . This operation requires the certificates / setissuers permission . * @ param vaultBaseUrl The vault name , for example https : / / myvault . vau...
return setCertificateIssuerWithServiceResponseAsync ( vaultBaseUrl , issuerName , provider , credentials , organizationDetails , attributes ) . map ( new Func1 < ServiceResponse < IssuerBundle > , IssuerBundle > ( ) { @ Override public IssuerBundle call ( ServiceResponse < IssuerBundle > response ) { return response . ...
public class ClientBuilderForConnector { /** * Sets SSLConfig from defined credentials id . * @ param credentialsId credentials to find in jenkins * @ return docker - java client */ public ClientBuilderForConnector withCredentialsId ( String credentialsId ) throws UnrecoverableKeyException , NoSuchAlgorithmExceptio...
if ( isNotBlank ( credentialsId ) ) { withCredentials ( lookupSystemCredentials ( credentialsId ) ) ; } else { withSslConfig ( null ) ; } return this ;
public class CrumbFilter { /** * Because servlet containers generally don ' t specify the ordering of the initialization * ( and different implementations indeed do this differently - - - See HUDSON - 3878 ) , * we cannot use Hudson to the CrumbIssuer into CrumbFilter eagerly . */ public CrumbIssuer getCrumbIssuer ...
Jenkins h = Jenkins . getInstanceOrNull ( ) ; if ( h == null ) return null ; // before Jenkins is initialized ? return h . getCrumbIssuer ( ) ;
public class JavacParser { /** * ArgumentsOpt = [ Arguments ] */ JCExpression argumentsOpt ( List < JCExpression > typeArgs , JCExpression t ) { } }
if ( ( mode & EXPR ) != 0 && token . kind == LPAREN || typeArgs != null ) { mode = EXPR ; return arguments ( typeArgs , t ) ; } else { return t ; }
public class VariationDataReader { /** * Performs one read of from a CellBase variation collection . * @ return List of variants . It can be expected to contain only one variant . */ public List < Variant > read ( ) { } }
Variant variant = null ; boolean valid = false ; while ( iterator . hasNext ( ) && ! valid ) { variant = iterator . next ( ) ; valid = isValid ( variant ) ; } if ( valid ) { // New variants in the variation collection created during the update of the frequencies may not have // the variant type set and this might cause...
public class BundleMap { private BundleNodeMap lookupScriptableBundle ( String name ) { } }
BundleNodeMap map = null ; /* check to see if the bundle was explicitly registered */ if ( _registeredBundles != null && _registeredBundles . containsKey ( name ) ) { map = new BundleNodeMap ( name , ( BundleNode ) _registeredBundles . get ( name ) ) ; } else if ( name . equals ( DEFAULT_STRUTS_BUNDLE_NAME ) ) { Messag...
public class ScriptBytecodeAdapter { public static Object invokeMethodOnCurrentN ( Class senderClass , GroovyObject receiver , String messageName , Object [ ] messageArguments ) throws Throwable { } }
Object result = null ; boolean intercepting = receiver instanceof GroovyInterceptable ; try { try { // if it ' s a pure interceptable object ( even intercepting toString ( ) , clone ( ) , . . . ) if ( intercepting ) { result = receiver . invokeMethod ( messageName , messageArguments ) ; } // else if there ' s a statica...
public class AbstractSarlLaunchShortcut { /** * Collect the listing of { @ link ILaunchConfiguration } s that apply to the given element . * @ param projectName the name of the project . * @ param fullyQualifiedName the element . * @ return the list of { @ link ILaunchConfiguration } s or an empty list , never < ...
final ILaunchConfigurationType ctype = getLaunchManager ( ) . getLaunchConfigurationType ( getConfigurationType ( ) ) ; List < ILaunchConfiguration > candidateConfigs = Collections . emptyList ( ) ; final ILaunchConfiguration [ ] configs = getLaunchManager ( ) . getLaunchConfigurations ( ctype ) ; candidateConfigs = ne...
public class WordStemmer { /** * Reads , stems , and prints the trees in the file . * @ param args Usage : WordStemmer file */ public static void main ( String [ ] args ) { } }
Treebank treebank = new DiskTreebank ( ) ; treebank . loadPath ( args [ 0 ] ) ; WordStemmer ls = new WordStemmer ( ) ; for ( Tree tree : treebank ) { ls . visitTree ( tree ) ; System . out . println ( tree ) ; }
public class CheckArg { /** * Check that the map contains the key * @ param argument Map to check * @ param key Key to check for , may be null * @ param name The name of the argument * @ throws IllegalArgumentException If map is null or doesn ' t contain key */ public static void containsKey ( Map < ? , ? > arg...
isNotNull ( argument , name ) ; if ( ! argument . containsKey ( key ) ) { throw new IllegalArgumentException ( CommonI18n . argumentDidNotContainKey . text ( name , getObjectName ( key ) ) ) ; }
public class MesosArtifactServer { /** * Stops the artifact server . * @ throws Exception */ public synchronized void stop ( ) throws Exception { } }
if ( this . serverChannel != null ) { this . serverChannel . close ( ) . awaitUninterruptibly ( ) ; this . serverChannel = null ; } if ( bootstrap != null ) { if ( bootstrap . group ( ) != null ) { bootstrap . group ( ) . shutdownGracefully ( ) ; } bootstrap = null ; }
public class ExternalScriptable { /** * We convert script values to the nearest Java value . * We unwrap wrapped Java objects so that access from * Bindings . get ( ) would return " workable " value for Java . * But , at the same time , we need to make few special cases * and hence the following function is use...
if ( jsObj instanceof Wrapper ) { Wrapper njb = ( Wrapper ) jsObj ; /* importClass feature of ImporterTopLevel puts * NativeJavaClass in global scope . If we unwrap * it , importClass won ' t work . */ if ( njb instanceof NativeJavaClass ) { return njb ; } /* script may use Java primitive wrapper type objects * (...
public class MarshallableTypeHints { /** * Returns whether a type can be serialized . In order for a type to be * considered marshallable , the type must have been marked as marshallable * using the { @ link # markMarshallable ( Class , boolean ) } method earlier , * passing true as parameter . If a type has not ...
MarshallingType marshallingType = typeHints . get ( type ) ; if ( marshallingType != null ) { Boolean marshallable = marshallingType . isMarshallable ; return marshallable != null ? marshallable . booleanValue ( ) : false ; } return false ;
public class LocatorSoapServiceImpl { /** * Unregister the endpoint for given service . * @ param input * UnregisterEndpointRequestType encapsulate name of service and * endpointURL . Must not be < code > null < / code > */ @ Override public void unregisterEndpoint ( QName serviceName , String endpointURL ) throw...
if ( LOG . isLoggable ( Level . FINE ) ) { LOG . fine ( "Unregistering endpoint " + endpointURL + " for service " + serviceName + "..." ) ; } try { initLocator ( ) ; locatorClient . unregister ( serviceName , endpointURL ) ; } catch ( ServiceLocatorException e ) { ServiceLocatorFaultDetail serviceFaultDetail = new Serv...
public class DynamoDBMapperTableModel { /** * Creates a new key map from the specified hash and range key . * @ param < H > The hash key type . * @ param < R > The range key type . * @ param hashKey The hash key . * @ param rangeKey The range key ( optional if not present on table ) . * @ return The key map ....
final Map < String , AttributeValue > key = new LinkedHashMap < String , AttributeValue > ( 4 ) ; final DynamoDBMapperFieldModel < T , H > hk = this . < H > hashKey ( ) ; final AttributeValue hkValue = hashKey == null ? null : hk . convert ( hashKey ) ; if ( hkValue != null ) { key . put ( hk . name ( ) , hkValue ) ; }...
public class ImportNodeData { /** * Factory method * @ param parent NodeData * @ param name InternalQName * @ param primaryTypeName InternalQName * @ param index int * @ param orderNumber int * @ return */ public static ImportNodeData createNodeData ( NodeData parent , InternalQName name , InternalQName pri...
ImportNodeData nodeData = null ; QPath path = QPath . makeChildPath ( parent . getQPath ( ) , name , index ) ; nodeData = new ImportNodeData ( path , IdGenerator . generate ( ) , - 1 , primaryTypeName , new InternalQName [ 0 ] , orderNumber , parent . getIdentifier ( ) , parent . getACL ( ) ) ; return nodeData ;
public class FlowImpl { /** * Returns all < code > split < / code > elements * @ return list of < code > split < / code > */ public List < Split < Flow < T > > > getAllSplit ( ) { } }
List < Split < Flow < T > > > list = new ArrayList < Split < Flow < T > > > ( ) ; List < Node > nodeList = childNode . get ( "split" ) ; for ( Node node : nodeList ) { Split < Flow < T > > type = new SplitImpl < Flow < T > > ( this , "split" , childNode , node ) ; list . add ( type ) ; } return list ;
public class GoyyaSmsService { /** * Returns the message type . * @ param message the message * @ return the message type */ protected String getMessageType ( final String message ) { } }
if ( StringUtils . isBlank ( defaultMessageType ) || MESSAGE_TYPE_TEXT_VALUE . equalsIgnoreCase ( defaultMessageType ) || MESSAGE_TYPE_LONG_TEXT_VALUE . equalsIgnoreCase ( defaultMessageType ) ) { return message . length ( ) > getMaxLengthOfOneSms ( ) ? MESSAGE_TYPE_LONG_TEXT_VALUE : MESSAGE_TYPE_TEXT_VALUE ; } return ...
public class NameUtils { /** * Returns the class name for the given logical name and trailing name . For example " person " and " Controller " would evaluate to " PersonController " . * @ param logicalName The logical name * @ param trailingName The trailing name * @ return The class name */ public static String ...
if ( isBlank ( logicalName ) ) { throw new IllegalArgumentException ( "Argument [logicalName] cannot be null or blank" ) ; } String className = logicalName . substring ( 0 , 1 ) . toUpperCase ( Locale . ENGLISH ) + logicalName . substring ( 1 ) ; if ( trailingName != null ) { className = className + trailingName ; } re...
public class AdminToolUtils { /** * Utility function that fetches partitions . * @ param adminClient An instance of AdminClient points to given cluster * @ return all partitions on cluster */ public static List < Integer > getAllPartitions ( AdminClient adminClient ) { } }
List < Integer > partIds = Lists . newArrayList ( ) ; partIds = Lists . newArrayList ( ) ; for ( Node node : adminClient . getAdminClientCluster ( ) . getNodes ( ) ) { partIds . addAll ( node . getPartitionIds ( ) ) ; } return partIds ;
public class OperationRequestHandler { /** * / * ( non - Javadoc ) * @ see org . jboss . as . cli . CommandHandler # handle ( org . jboss . as . cli . CommandContext ) */ @ Override public void handle ( CommandContext ctx ) throws CommandLineException { } }
ModelControllerClient client = ctx . getModelControllerClient ( ) ; if ( client == null ) { throw new CommandFormatException ( "You are disconnected at the moment." + " Type 'connect' to connect to the server" + " or 'help' for the list of supported commands." ) ; } RequestWithAttachments reqWithAttachments = ( Request...
public class AmazonAlexaForBusinessClient { /** * Searches room profiles and lists the ones that meet a set of filter criteria . * @ param searchProfilesRequest * @ return Result of the SearchProfiles operation returned by the service . * @ sample AmazonAlexaForBusiness . SearchProfiles * @ see < a href = " htt...
request = beforeClientExecution ( request ) ; return executeSearchProfiles ( request ) ;
public class WindDirection { /** * Sets the colordefinition of the second pointer * @ param POINTER2 _ COLOR */ public void setPointer2Color ( final ColorDef POINTER2_COLOR ) { } }
pointer2Color = POINTER2_COLOR ; init ( getInnerBounds ( ) . width , getInnerBounds ( ) . height ) ; repaint ( getInnerBounds ( ) ) ;
public class GenericsResolver { /** * By default returned context set on root class ( but generic types for root class will be resolved from specified * generics bounds ) . To use it switch context to required type from hierarchy : * { @ code returnedContext . type ( SomeTypeFromHierarchy . class ) } . * Note : w...
final Class < ? > notPrimitiveType = TypeUtils . wrapPrimitive ( type ) ; return new GenericsContext ( GenericsInfoFactory . create ( notPrimitiveType , ignoreClasses ) , notPrimitiveType ) ;