signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ASrvOrm { /** * < p > Evaluate Where conditions the entity . < / p >
* @ param < T > entity type
* @ param pEntity entity
* @ param pColumnsValues columns values
* @ return where conditions e . g . " itsId = 1 AND itsVersion = 2"
* @ throws Exception an exception */
public final < T > String eval... | if ( pColumnsValues . ifContains ( ISrvOrm . VERSION_NAME ) ) { return evalWhereId ( pEntity , pColumnsValues ) + " and " + ISrvOrm . VERSION_NAME . toUpperCase ( ) + "=" + pColumnsValues . evalSqlValue ( ISrvOrm . VERSIONOLD_NAME ) ; } else { return evalWhereId ( pEntity , pColumnsValues ) ; } |
public class GEPROLImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case AfplibPackage . GEPROL__RES : return getRES ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class ModuleItem { /** * Find an immediate child */
public ModuleItem find ( String name ) { } } | if ( children == null ) return null ; else return ( ModuleItem ) children . get ( name ) ; /* * for ( int i = 0 ; i < children . size ( ) ; i + + )
* ModuleItem item = ( ModuleItem ) children . get ( i ) ;
* if ( item . instance ! = null )
* if ( item . instance . getName ( ) . equals ( name ) )
* return item ;... |
public class IntegerArray { /** * Appends a range of values to the end of this array .
* @ param items
* The values to append .
* @ return A value indicating if the array has changed . */
public boolean addAll ( IntegerArray items ) { } } | ensureCapacity ( size + items . size ) ; for ( int i = 0 ; i < items . size ; i ++ ) { elements [ size ++ ] = items . elements [ i ] ; } return items . size > 0 ; |
public class AspFactoryStopTimer { /** * ( non - Javadoc )
* @ see org . restcomm . protocols . ss7 . m3ua . impl . scheduler . M3UATask # tick ( long ) */
@ Override public void tick ( long now ) { } } | if ( now - this . initiatedTime >= STOP_TIMER_TIMEOUT ) { if ( this . aspFactoryImpl . association . isConnected ( ) ) { logger . warn ( String . format ( "Asp=%s was stopped but underlying Association=%s was not stopped after TIMEOUT=%d ms. Forcing stop now" , this . aspFactoryImpl . getName ( ) , this . aspFactoryImp... |
public class JavaHost { /** * 更新虚拟DNS域名指向 .
* @ param properties
* key为域名 , value为IP地址
* @ return 更新虚拟DNS记录的条数 */
public static int updateVirtualDns ( Properties properties ) { } } | Iterator < Entry < Object , Object > > iterator = properties . entrySet ( ) . iterator ( ) ; int count = 0 ; while ( iterator . hasNext ( ) ) { Entry < Object , Object > entry = iterator . next ( ) ; if ( ! ( entry . getKey ( ) instanceof String ) || ! ( entry . getValue ( ) instanceof String ) ) { continue ; } String ... |
public class CNFContextClassifier { /** * Converts the formula into CNF .
* @ param in the owner of the formula
* @ param formula the formula to convert
* @ return formula in CNF form
* @ throws ContextClassifierException ContextClassifierException */
public static String toCNF ( INode in , String formula ) thr... | PEParser parser = new PEParser ( ) ; CNFTransformer transformer = new CNFTransformer ( ) ; String result = formula ; if ( ( formula . contains ( "&" ) && formula . contains ( "|" ) ) || formula . contains ( "~" ) ) { String tmpFormula = formula ; tmpFormula = tmpFormula . trim ( ) ; tmpFormula = tmpFormula . replace ( ... |
public class MaterialCalendarView { /** * Call by { @ link CalendarPagerView } to indicate that a day was clicked and we should handle it */
protected void onDateClicked ( final DayView dayView ) { } } | final CalendarDay currentDate = getCurrentDate ( ) ; final CalendarDay selectedDate = dayView . getDate ( ) ; final int currentMonth = currentDate . getMonth ( ) ; final int selectedMonth = selectedDate . getMonth ( ) ; if ( calendarMode == CalendarMode . MONTHS && allowClickDaysOutsideCurrentMonth && currentMonth != s... |
public class MacroTransformation { /** * Wrap the output of a macro block with a { @ link MacroMarkerBlock } .
* @ param macroBlockToWrap the block that should be replaced
* @ param newBlocks list of blocks to wrap
* @ return the wrapper */
private Block wrapInMacroMarker ( MacroBlock macroBlockToWrap , List < Bl... | return new MacroMarkerBlock ( macroBlockToWrap . getId ( ) , macroBlockToWrap . getParameters ( ) , macroBlockToWrap . getContent ( ) , newBlocks , macroBlockToWrap . isInline ( ) ) ; |
public class Util { /** * Get the logger .
* @ return The logger . */
public static Logger getLogger ( ) { } } | if ( m_logger == null ) { m_logger = Logger . getLogger ( Constant . ROOT_PACKAGE . substring ( 0 , Constant . ROOT_PACKAGE . length ( ) - 1 ) ) ; try { LogManager logManager = LogManager . getLogManager ( ) ; logManager . reset ( ) ; // removeAllGlobalHandlers ( ) ;
ConsoleHandler fh = new ConsoleHandler ( ) ; fh . se... |
public class ByteBufferOutputStream { public void writeTo ( OutputStream out ) throws IOException { } } | out . write ( _buf , _start , _pos - _start ) ; |
public class NettyServer { /** * print blade start banner text */
private void printBanner ( ) { } } | if ( null != blade . bannerText ( ) ) { System . out . println ( blade . bannerText ( ) ) ; } else { String text = Const . BANNER_TEXT + NEW_LINE + StringKit . padLeft ( " :: Blade :: (v" , Const . BANNER_PADDING - 9 ) + Const . VERSION + ") " + NEW_LINE ; System . out . println ( Ansi . Magenta . format ( text ) ) ; } |
public class HttpStream { /** * Opens a new HTTP stream for reading and writing , i . e . a POST request .
* @ param path the URL for the stream
* @ return the opened stream */
static HttpStreamWrapper openReadWrite ( HttpPath path ) throws IOException { } } | HttpStream stream = createStream ( path ) ; stream . _isPost = true ; return new HttpStreamWrapper ( stream ) ; |
public class HeaderPositionCalculator { /** * Returns the first item currently in the RecyclerView that is not obscured by a header .
* @ param parent Recyclerview containing all the list items
* @ return first item that is fully beneath a header */
private View getFirstViewUnobscuredByHeader ( RecyclerView parent ... | boolean isReverseLayout = mOrientationProvider . isReverseLayout ( parent ) ; int step = isReverseLayout ? - 1 : 1 ; int from = isReverseLayout ? parent . getChildCount ( ) - 1 : 0 ; for ( int i = from ; i >= 0 && i <= parent . getChildCount ( ) - 1 ; i += step ) { View child = parent . getChildAt ( i ) ; if ( ! itemIs... |
public class QuantityFormatter { /** * Gets the SimpleFormatter for a particular variant .
* @ param variant " zero " , " one " , " two " , " few " , " many " , " other "
* @ return the SimpleFormatter */
public SimpleFormatter getByVariant ( CharSequence variant ) { } } | assert isValid ( ) ; int idx = StandardPlural . indexOrOtherIndexFromString ( variant ) ; SimpleFormatter template = templates [ idx ] ; return ( template == null && idx != StandardPlural . OTHER_INDEX ) ? templates [ StandardPlural . OTHER_INDEX ] : template ; |
public class CurationManager { /** * Store the important parts of the request data for later use .
* @ param message
* The JsonSimple message to store
* @ param oid
* The Object to store the message in
* @ throws TransactionException
* If an error occurred */
private void storeRequestData ( JsonSimple messa... | // Get our incoming data to look at
JsonObject toRespond = message . getObject ( "respond" ) ; JSONArray newRelations = message . getArray ( "relationships" ) ; if ( toRespond == null && newRelations == null ) { log . warn ( "This request requires no responses and specifies" + " no relationships." ) ; return ; } // Get... |
public class AmazonKinesisAnalyticsV2Client { /** * Adds a reference data source to an existing SQL - based Amazon Kinesis Data Analytics application .
* Kinesis Data Analytics reads reference data ( that is , an Amazon S3 object ) and creates an in - application table
* within your application . In the request , y... | request = beforeClientExecution ( request ) ; return executeAddApplicationReferenceDataSource ( request ) ; |
public class Metrics { /** * Any provider that may be used for MetricsComponent can be added here . */
@ DefaultVisibilityForTesting static MetricsComponent loadMetricsComponent ( @ Nullable ClassLoader classLoader ) { } } | try { // Call Class . forName with literal string name of the class to help shading tools .
return Provider . createInstance ( Class . forName ( "io.opencensus.impl.metrics.MetricsComponentImpl" , /* initialize = */
true , classLoader ) , MetricsComponent . class ) ; } catch ( ClassNotFoundException e ) { logger . log ... |
public class ListenerPortImpl { /** * Returns the port number associated with this listener port .
* @ see ListenerPort # getPortNumber ( ) */
public int getPortNumber ( ) { } } | if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getPortNumber" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPortNumber" , "" + portNumber ) ; return portNumber ; |
public class MtasSolrResultMerge { /** * Merge responses array list .
* @ param originalList
* the original list
* @ param shardList
* the shard list
* @ throws IOException
* Signals that an I / O exception has occurred . */
@ SuppressWarnings ( "unchecked" ) private void mergeResponsesArrayList ( ArrayList... | // get keys from original
HashMap < String , Object > originalKeyList = new HashMap < > ( ) ; for ( Object item : originalList ) { if ( item instanceof NamedList < ? > ) { NamedList < Object > itemList = ( NamedList < Object > ) item ; Object key = itemList . get ( "key" ) ; if ( ( key != null ) && ( key instanceof Str... |
public class Throttle { /** * Test program which exercises the CPU in an infinite loop , throttled by
* the amount given in args [ 0 ] . On a machine performing no other work , the
* average CPU load should be about the same as the throttled speed .
* @ param args args [ 0 ] - desired speed , 0.0 to 1.0 */
public... | Throttle t = new Throttle ( 50 ) ; double desiredSpeed = Double . parseDouble ( args [ 0 ] ) ; while ( true ) { new java . util . Date ( ) . toString ( ) ; t . throttle ( desiredSpeed , 100 ) ; } |
public class DefaultJsonReader { /** * { @ inheritDoc } */
@ Override public boolean nextBoolean ( ) { } } | int p = peeked ; if ( p == PEEKED_NONE ) { p = doPeek ( ) ; } if ( p == PEEKED_TRUE ) { peeked = PEEKED_NONE ; return true ; } else if ( p == PEEKED_FALSE ) { peeked = PEEKED_NONE ; return false ; } throw new IllegalStateException ( "Expected a boolean but was " + peek ( ) + " at line " + getLineNumber ( ) + " column "... |
public class XPathBuilder { /** * For customize template please see here : See http : / / docs . oracle . com / javase / 7 / docs / api / java / util / Formatter . html # dpos
* @ param key name template
* @ param value template
* @ param < T > the element which calls this method
* @ return this element */
@ Su... | if ( value == null ) { templates . remove ( key ) ; } else { templates . put ( key , value ) ; } return ( T ) this ; |
public class Engine { /** * Create engine with engine name managed by JFinal */
public synchronized static Engine create ( String engineName ) { } } | if ( StrKit . isBlank ( engineName ) ) { throw new IllegalArgumentException ( "Engine name can not be blank" ) ; } engineName = engineName . trim ( ) ; if ( engineMap . containsKey ( engineName ) ) { throw new IllegalArgumentException ( "Engine already exists : " + engineName ) ; } Engine newEngine = new Engine ( engin... |
public class Logger { /** * Messages to be logged in error mode .
* @ param message a string containing the message to be logged . */
public void error ( String message ) { } } | if ( loggingService == null ) { System . err . println ( message ) ; return ; } loggingService . error ( pluginId , loggerName , message ) ; |
public class InternalXbaseParser { /** * $ ANTLR start synpred26 _ InternalXbase */
public final void synpred26_InternalXbase_fragment ( ) throws RecognitionException { } } | // InternalXbase . g : 2983:6 : ( ( ' ( ' ( ( ruleJvmFormalParameter ) ) ' : ' ) )
// InternalXbase . g : 2983:7 : ( ' ( ' ( ( ruleJvmFormalParameter ) ) ' : ' )
{ // InternalXbase . g : 2983:7 : ( ' ( ' ( ( ruleJvmFormalParameter ) ) ' : ' )
// InternalXbase . g : 2984:7 : ' ( ' ( ( ruleJvmFormalParameter ) ) ' : '
{ ... |
public class PhotosInterface { /** * Set the dates for the specified photo .
* This method requires authentication with ' write ' permission .
* @ param photoId
* The photo ID
* @ param datePosted
* The date the photo was posted or null
* @ param dateTaken
* The date the photo was taken or null
* @ para... | Map < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "method" , METHOD_SET_DATES ) ; parameters . put ( "photo_id" , photoId ) ; if ( datePosted != null ) { parameters . put ( "date_posted" , Long . toString ( datePosted . getTime ( ) / 1000 ) ) ; } if ( dateTaken != null ) { pa... |
public class DelaunayTriangle { /** * Update neighbor pointers */
private void markNeighbor ( TriangulationPoint p1 , TriangulationPoint p2 , DelaunayTriangle t ) { } } | if ( ( p1 == points [ 2 ] && p2 == points [ 1 ] ) || ( p1 == points [ 1 ] && p2 == points [ 2 ] ) ) { neighbors [ 0 ] = t ; } else if ( ( p1 == points [ 0 ] && p2 == points [ 2 ] ) || ( p1 == points [ 2 ] && p2 == points [ 0 ] ) ) { neighbors [ 1 ] = t ; } else if ( ( p1 == points [ 0 ] && p2 == points [ 1 ] ) || ( p1 ... |
public class OracleCleaningScipts { /** * { @ inheritDoc } */
protected Collection < String > getTablesRenamingScripts ( ) { } } | Collection < String > scripts = new ArrayList < String > ( ) ; // JCR _ VALUE
scripts . add ( "ALTER TABLE " + valueTableName + " RENAME TO " + valueTableName + "_OLD" ) ; scripts . add ( "ALTER TABLE " + valueTableName + "_OLD" + " RENAME CONSTRAINT JCR_PK_" + valueTableSuffix + " TO JCR_PK_" + valueTableSuffix + "_OL... |
public class StepFunctionBuilder { /** * Binary condition for String greater than comparison .
* @ param variable The JSONPath expression that determines which piece of the input document is used for the comparison .
* @ param expectedValue The expected value for this condition .
* @ see < a href = " https : / / ... | return StringGreaterThanCondition . builder ( ) . variable ( variable ) . expectedValue ( expectedValue ) ; |
public class MenuExtensions { /** * Sets the accelerator for the given menuitem and the given parsable keystroke string .
* @ param jmi
* The JMenuItem .
* @ param parsableKeystrokeString
* the parsable keystroke string */
public static void setAccelerator ( final JMenuItem jmi , final String parsableKeystrokeS... | jmi . setAccelerator ( KeyStroke . getKeyStroke ( parsableKeystrokeString ) ) ; |
public class ZapfDingbatsNumberList { /** * Adds an < CODE > Object < / CODE > to the < CODE > List < / CODE > .
* @ paramothe object to add .
* @ return true if adding the object succeeded */
public boolean add ( Object o ) { } } | if ( o instanceof ListItem ) { ListItem item = ( ListItem ) o ; Chunk chunk = new Chunk ( preSymbol , symbol . getFont ( ) ) ; switch ( type ) { case 0 : chunk . append ( String . valueOf ( ( char ) ( first + list . size ( ) + 171 ) ) ) ; break ; case 1 : chunk . append ( String . valueOf ( ( char ) ( first + list . si... |
public class MethodCallImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case SimpleExpressionsPackage . METHOD_CALL__VALUE : return getValue ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class ObjectAdapterActivity { /** * This method should not normally be overriden . When you override execute ( ) method ,
* you will need to invoke this for any exception caught .
* @ param errorCause
* @ throws ActivityException */
protected void handleAdapterInvocationError ( Throwable errorCause ) throw... | logger . severeException ( getAdapterInvocationErrorMessage ( ) , errorCause ) ; boolean isErrorRetryable ; int errorCode ; if ( errorCause instanceof AdapterException ) { AdapterException adEx = ( AdapterException ) errorCause ; isErrorRetryable = adEx . isRetryable ( ) ; if ( adEx . getCode ( ) != 0 ) { errorCode = a... |
public class BProgramSyncSnapshot { /** * Returns { @ code true } if any of the b - threads at this point is at a " hot "
* sync . Similar to the " hot cut " idiom in LSC .
* @ return { @ code true } is at least one of the b - threads is at a hot sync ; { @ code false } otherwise . */
public boolean isHot ( ) { } } | return getBThreadSnapshots ( ) . stream ( ) . map ( BThreadSyncSnapshot :: getSyncStatement ) . filter ( SyncStatement :: isHot ) . findAny ( ) . isPresent ( ) ; |
public class RestNode { /** * Adds a custom property to this node , meaning a property which is not among the standard JCR properties
* @ param name a { @ code non - null } String , representing the name of the custom property
* @ param value a { @ code non - null } String , representing the value of the custom pro... | customProperties . put ( name , value ) ; return this ; |
public class Expression { /** * Performance optimizer :
* getStatement ( ) in combination with isSingleStatement ( )
* isolates a single statement that can be evaluated immediately .
* @ return the first statement string found */
public String getStatement ( ) { } } | if ( elements . size ( ) == 1 ) { if ( ( elementsArray [ 0 ] instanceof Expression ) ) { return ( ( Expression ) elementsArray [ 0 ] ) . getStatement ( ) ; } else if ( ( elementsArray [ 0 ] instanceof Predicate ) ) { return ( ( Predicate ) elementsArray [ 0 ] ) . getStatement ( ) ; } } return statement ; |
public class ConfigurationBuilder { /** * Get the Environment { @ code TransportsConfiguration }
* Location of the configuration file should be defined in the environment variable ' transports . netty . conf ' .
* If environment variable is not specified , return the default configuration
* @ return TransportsCon... | String nettyTransportsConfigFile = System . getProperty ( NETTY_TRANSPORT_CONF , "conf" + File . separator + "transports" + File . separator + "netty-transports.yml" ) ; return getConfiguration ( nettyTransportsConfigFile ) ; |
public class ThreadPool { /** * Sets the priority given to each thread in the pool .
* @ throws IllegalArgumentException if priority is out of range */
public void setPriority ( int priority ) throws IllegalArgumentException { } } | if ( priority < Thread . MIN_PRIORITY || priority > Thread . MAX_PRIORITY ) { throw new IllegalArgumentException ( "Priority out of range: " + priority ) ; } synchronized ( mPool ) { mPriority = priority ; } |
public class JsonUtil { /** * Returns a field in a Json object as a long .
* @ param object the Json Object
* @ param field the field in the Json object to return
* @ param defaultValue a default value for the field if the field value is null
* @ return the Json field value as a long */
public static long getLo... | final JsonValue value = object . get ( field ) ; if ( value == null || value . isNull ( ) ) { return defaultValue ; } else { return value . asLong ( ) ; } |
public class Data { /** * Filters this data based on a predicate . */
@ CheckResult @ NonNull public final Data < T > filter ( @ NonNull Predicate < ? super T > predicate ) { } } | return new FilterData < > ( this , predicate ) ; |
public class druidGLexer { /** * $ ANTLR start " ARITH _ OPER " */
public final void mARITH_OPER ( ) throws RecognitionException { } } | try { int _type = ARITH_OPER ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 703:13 : ( ( ' * ' | ' + ' | ' / ' | ' - ' ) )
// druidG . g :
{ if ( ( input . LA ( 1 ) >= '*' && input . LA ( 1 ) <= '+' ) || input . LA ( 1 ) == '-' || input . LA ( 1 ) == '/' ) { input . consume ( ) ; } else { MismatchedSetExcepti... |
public class ModelsImpl { /** * Gets information about the hierarchical entity child model .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param hEntityId The hierarchical entity extractor ID .
* @ param hChildId The hierarchical entity extractor child ID .
* @ throws IllegalAr... | return getHierarchicalEntityChildWithServiceResponseAsync ( appId , versionId , hEntityId , hChildId ) . map ( new Func1 < ServiceResponse < HierarchicalChildEntity > , HierarchicalChildEntity > ( ) { @ Override public HierarchicalChildEntity call ( ServiceResponse < HierarchicalChildEntity > response ) { return respon... |
public class Matrix4f { /** * Set this matrix to a rotation transformation about the Z axis to align the local < code > + X < / code > towards < code > ( dirX , dirY ) < / code > .
* The vector < code > ( dirX , dirY ) < / code > must be a unit vector .
* @ param dirX
* the x component of the normalized direction... | if ( ( properties & PROPERTY_IDENTITY ) == 0 ) MemUtil . INSTANCE . identity ( this ) ; this . _m00 ( dirY ) ; this . _m01 ( dirX ) ; this . _m10 ( - dirX ) ; this . _m11 ( dirY ) ; _properties ( PROPERTY_AFFINE | PROPERTY_ORTHONORMAL ) ; return this ; |
public class IfmapJ { /** * Create a { @ link ClockSkewDetector } instance which can be used to
* synchronize the time with the MAPS .
* @ param ssrc
* the { @ link SSRC } instance to be used for synchronization
* @ param dev
* the { @ link Device } used for time synchronization
* @ return */
public static ... | return ClockSkewDetector . newInstance ( ssrc , dev ) ; |
public class HttpBuilder { /** * Executes an asynchronous POST request on the configured URI ( asynchronous alias to ` put ( Class , Consumer ) ` ) , with additional configuration provided
* by the configuration function . The result will be cast to the specified ` type ` .
* This method is generally used for Java ... | return CompletableFuture . supplyAsync ( ( ) -> post ( type , configuration ) , getExecutor ( ) ) ; |
public class Record { /** * Get grouping { @ link Double } value
* @ param label target label
* @ return { @ link Double } value of the label . If it is not null . */
public Double getGroupingDouble ( String label ) { } } | PrimitiveObject o = getPrimitiveObject ( KEY , label , ObjectUtil . DOUBLE , "Double" ) ; if ( o == null ) { return null ; } return ( Double ) o . getObject ( ) ; |
public class CPInstanceLocalServiceUtil { /** * Returns all the cp instances matching the UUID and company .
* @ param uuid the UUID of the cp instances
* @ param companyId the primary key of the company
* @ return the matching cp instances , or an empty list if no matches were found */
public static java . util ... | return getService ( ) . getCPInstancesByUuidAndCompanyId ( uuid , companyId ) ; |
public class AuditLog { /** * < pre >
* The name of the API service performing the operation . For example ,
* ` " datastore . googleapis . com " ` .
* < / pre >
* < code > string service _ name = 7 ; < / code > */
public com . google . protobuf . ByteString getServiceNameBytes ( ) { } } | java . lang . Object ref = serviceName_ ; if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; serviceName_ = b ; return b ; } else { return ( com . google . protobuf . ByteString ) ref ; } |
public class CreateServiceWizard { /** * The worker method . It will find the container , create the
* file if missing or just replace its contents , and open
* the editor on the newly created file .
* @ param inboundTransport
* @ param outboundTransport
* @ param mep */
private void doFinish ( String mavenHo... | monitor . beginTask ( "Creating " + serviceName , 5 ) ; final PrintStream ps = new PrintStream ( new OutputStream ( ) { @ Override public void write ( int b ) throws IOException { // page3 . writeStatusText ( b ) ;
System . err . print ( Character . toString ( ( char ) b ) ) ; } } ) ; IWorkspaceRoot root = ResourcesPlu... |
public class User { /** * Allows a user to be set by a string value . The format is { @ code user : password : groups : realm : true | false } .
* Both username and password are required . Groups can be a comma delimited set of groups .
* @ param value the string user value */
public void set ( final String value )... | // username : password : groups : realm : true | false
if ( value != null ) { final List < String > parts = splitAndTrim ( value , ':' ) ; // User name and password should be required so we need a minimum of 2
switch ( parts . size ( ) ) { case 5 : { applicationUser = Boolean . parseBoolean ( parts . get ( 4 ) ) ; } ca... |
public class KMeansDataGenerator { /** * Main method to generate data for the { @ link KMeans } example program .
* < p > The generator creates to files :
* < ul >
* < li > < code > & lt ; output - path & gt ; / points < / code > for the data points
* < li > < code > & lt ; output - path & gt ; / centers < / co... | // check parameter count
if ( args . length < 2 ) { System . out . println ( "KMeansDataGenerator -points <num> -k <num clusters> [-output <output-path>] [-stddev <relative stddev>] [-range <centroid range>] [-seed <seed>]" ) ; System . exit ( 1 ) ; } // parse parameters
final ParameterTool params = ParameterTool . fro... |
public class ExecutionHelper { /** * Run the given commandline in the given directory and provide the given input to the command .
* Also verify that the tool has the expected exit code and does finish in the timeout .
* Note : The resulting output is stored in memory , running a command
* which prints out a huge... | DefaultExecutor executor = getDefaultExecutor ( dir , expectedExit , timeout ) ; try ( ByteArrayOutputStream outStr = new ByteArrayOutputStream ( ) ) { executor . setStreamHandler ( new PumpStreamHandler ( outStr , outStr , input ) ) ; try { execute ( cmdLine , dir , executor , null ) ; return new ByteArrayInputStream ... |
public class SuperPositions { /** * Use the { @ link SuperPosition # superposeAndTransform ( Point3d [ ] , Point3d [ ] ) }
* method of the default static SuperPosition algorithm contained in this
* Class , assuming that the point arrays are centered at the origin . */
public static Matrix4d superposeAndTransformAtO... | superposer . setCentered ( true ) ; return superposer . superposeAndTransform ( fixed , moved ) ; |
public class CmsLinkManager { /** * Returns the resource root path in the OpenCms VFS for the given target URI link , or < code > null < / code > in
* case the link points to an external site . < p >
* This methods does not support relative target URI links , so the given URI must be an absolute link . < p >
* Se... | return getRootPath ( cms , targetUri , null ) ; |
public class ServiceUnavailableExample { /** * tag : : service - unavailable [ ] */
public boolean addItem ( ) { } } | try ( Session session = driver . session ( ) ) { return session . writeTransaction ( new TransactionWork < Boolean > ( ) { @ Override public Boolean execute ( Transaction tx ) { tx . run ( "CREATE (a:Item)" ) ; return true ; } } ) ; } catch ( ServiceUnavailableException ex ) { return false ; } |
public class Options { /** * Load the options from a command - line , returning the arguments that were
* not option - related ( usually files ) . If help is requested or an error is
* detected , the appropriate status method is invoked and the app terminates .
* @ throws IOException */
public List < String > loa... | setLogLevel ( Level . WARNING ) ; mappings . addJreMappings ( ) ; // Create a temporary directory as the sourcepath ' s first entry , so that
// modified sources will take precedence over regular files .
fileUtil . setSourcePathEntries ( new ArrayList < > ( ) ) ; ArgProcessor processor = new ArgProcessor ( ) ; processo... |
public class RPCParameters { /** * Adds a parameter at the specified index .
* @ param index Index for parameter .
* @ param param Parameter to add . */
public void put ( int index , RPCParameter param ) { } } | expand ( index ) ; if ( index < params . size ( ) ) { params . set ( index , param ) ; } else { params . add ( param ) ; } |
public class ClassInfo { /** * Add this key area description to the Record . */
public KeyArea setupKey ( int iKeyArea ) { } } | KeyArea keyArea = null ; if ( iKeyArea == 0 ) { keyArea = this . makeIndex ( DBConstants . UNIQUE , ID_KEY ) ; keyArea . addKeyField ( ID , DBConstants . ASCENDING ) ; } if ( iKeyArea == 1 ) { keyArea = this . makeIndex ( DBConstants . NOT_UNIQUE , CLASS_NAME_KEY ) ; keyArea . addKeyField ( CLASS_NAME , DBConstants . A... |
public class PDBReader { /** * Creates an < code > Atom < / code > and sets properties to their values from
* the ATOM or HETATM record . If the line is shorter than 80 characters , the
* information past 59 characters is treated as optional . If the line is
* shorter than 59 characters , a < code > RuntimeExcept... | // a line can look like ( two in old format , then two in new format ) :
// 1 2 3 4 5 6 7
// 01234567890123456789012345678901234567890123456789012345678901234567890123456789
// ATOM 1 O5 * C A 1 20.662 36.632 23.475 1.00 10.00 114D 45
// ATOM 1186 1H ALA 1 10.105 5.945 - 6.630 1.00 0.00 1ALE1288
// ATOM 31 CA SER A 3 -... |
public class SOAPHelper { /** * Send message
* @ param endpoint service address
* @ param data
* @ return */
public static SOAPMessage send ( String endpoint , SOAPMessage data ) throws SOAPException { } } | SOAPConnection soapConnection = null ; try { SOAPConnectionFactory soapConnectionFactory = SOAPConnectionFactory . newInstance ( ) ; soapConnection = soapConnectionFactory . createConnection ( ) ; SOAPMessage soapResponse = soapConnection . call ( data , endpoint ) ; if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "Sen... |
public class AlluxioFuse { /** * Parses CLI options .
* @ param args CLI args
* @ return Alluxio - FUSE configuration options */
private static AlluxioFuseOptions parseOptions ( String [ ] args , AlluxioConfiguration alluxioConf ) { } } | final Options opts = new Options ( ) ; final Option mntPoint = Option . builder ( "m" ) . hasArg ( ) . required ( true ) . longOpt ( "mount-point" ) . desc ( "Desired local mount point for alluxio-fuse." ) . build ( ) ; final Option alluxioRoot = Option . builder ( "r" ) . hasArg ( ) . required ( true ) . longOpt ( "al... |
public class MicroProfileClientProxyImpl { /** * Liberty change end */
@ SuppressWarnings ( "unchecked" ) @ Override protected InvocationCallback < Object > checkAsyncCallback ( OperationResourceInfo ori , Map < String , Object > reqContext , Message outMessage ) { } } | InvocationCallback < Object > callback = outMessage . getContent ( InvocationCallback . class ) ; if ( callback == null && CompletionStage . class . equals ( ori . getMethodToInvoke ( ) . getReturnType ( ) ) ) { callback = NO_OP_CALLBACK ; outMessage . setContent ( InvocationCallback . class , callback ) ; } return cal... |
public class dnsaction64 { /** * Use this API to delete dnsaction64 of given name . */
public static base_response delete ( nitro_service client , String actionname ) throws Exception { } } | dnsaction64 deleteresource = new dnsaction64 ( ) ; deleteresource . actionname = actionname ; return deleteresource . delete_resource ( client ) ; |
public class ContentKeyPoliciesInner { /** * Create or update an Content Key Policy .
* Create or update a Content Key Policy in the Media Services account .
* @ param resourceGroupName The name of the resource group within the Azure subscription .
* @ param accountName The Media Services account name .
* @ par... | return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , accountName , contentKeyPolicyName , parameters ) , serviceCallback ) ; |
public class UmaIdTokenGeneratorService { /** * Build jwt claims jwt claims .
* @ param request the request
* @ param accessTokenId the access token id
* @ param timeoutInSeconds the timeout in seconds
* @ param service the service
* @ param profile the profile
* @ param context the context
* @ param resp... | val permissionTicket = ( UmaPermissionTicket ) request . getAttribute ( UmaPermissionTicket . class . getName ( ) ) ; val claims = new JwtClaims ( ) ; claims . setJwtId ( UUID . randomUUID ( ) . toString ( ) ) ; claims . setIssuer ( getConfigurationContext ( ) . getCasProperties ( ) . getAuthn ( ) . getUma ( ) . getIss... |
public class JBossModuleClassLoader { /** * Manually add the compiled classes to this classloader . This method will
* define and resolve the class , binding this classloader to the class .
* @ return the loaded class */
public Class < ? > addClassBytes ( String name , byte [ ] classBytes ) { } } | Class < ? > newClass = defineClass ( name , classBytes , 0 , classBytes . length ) ; resolveClass ( newClass ) ; localClassCache . put ( newClass . getName ( ) , newClass ) ; return newClass ; |
public class CommentAPI { /** * 查看指定文章的评论数据
* @ param access _ token access _ token
* @ param commentList commentList
* @ return CommentListResult CommentListResult */
public static CommentListResult list ( String access_token , CommentList commentList ) { } } | String json = JsonUtil . toJSONString ( commentList ) ; HttpUriRequest httpUriRequest = RequestBuilder . post ( ) . setHeader ( jsonHeader ) . setUri ( BASE_URI + "/cgi-bin/comment/list" ) . addParameter ( PARAM_ACCESS_TOKEN , API . accessToken ( access_token ) ) . setEntity ( new StringEntity ( json , Charset . forNam... |
public class ModifyVpcEndpointRequest { /** * ( Interface endpoint ) One or more subnet IDs in which to serve the endpoint .
* @ return ( Interface endpoint ) One or more subnet IDs in which to serve the endpoint . */
public java . util . List < String > getAddSubnetIds ( ) { } } | if ( addSubnetIds == null ) { addSubnetIds = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return addSubnetIds ; |
public class VersionImpl { /** * { @ inheritDoc } */
public VersionHistoryImpl getContainingHistory ( ) throws RepositoryException { } } | checkValid ( ) ; VersionHistoryImpl vhistory = ( VersionHistoryImpl ) dataManager . getItemByIdentifier ( nodeData ( ) . getParentIdentifier ( ) , true , false ) ; if ( vhistory == null ) { throw new VersionException ( "Version history item is not found for version " + getPath ( ) ) ; } return vhistory ; |
public class DataSegmentWriter { /** * Convert from String to UTF8 byte array . */
static byte [ ] getCodecNameUTF8 ( String compressionCodecName ) { } } | byte [ ] codecNameBytes = CODEC_NAME_CACHE . get ( compressionCodecName ) ; if ( codecNameBytes == null ) { try { codecNameBytes = compressionCodecName . getBytes ( "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } CODEC_NAME_CACHE . put ( compressionCodecName , codecNameByte... |
public class HexUtil { /** * 将字节转换成十六进制字符串
* @ param bytes 数据
* @ param offset 起始位置
* @ param length 从起始位置开始的长度
* @ return */
public static String SimplePrettyHexDump ( byte bytes [ ] , int offset , int length ) { } } | ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; PrintStream ps = new PrintStream ( bos ) ; int rows = length / 16 ; // 打印的行数
int ac = length % 16 ; // 剩余的字节数
for ( int i = 0 ; i < rows ; ++ i ) ps . printf ( "%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%... |
public class DefaultMimeUtility { /** * { @ inheritDoc } */
public MimeType getMimeTypeForExtension ( String extension ) { } } | if ( extension == null ) { return null ; } return extensionToMimeMap . get ( extension ) ; |
public class FileInfo { /** * TODO : validate */
public static boolean isBinary ( File f ) throws IOException { } } | FileInputStream in = new FileInputStream ( f ) ; int size = in . available ( ) ; if ( size > 1024 ) size = 1024 ; byte [ ] data = new byte [ size ] ; in . read ( data ) ; in . close ( ) ; int ascii = 0 ; int other = 0 ; for ( int i = 0 ; i < data . length ; i ++ ) { byte b = data [ i ] ; if ( b < 0x09 ) return true ; i... |
public class IOGroovyMethods { /** * This method reads without a buffer .
* It returns too many empty lines if \ r \ n combinations
* are used . Nothing can be done because we can ' t push
* back the character we have just read . */
private static String readLineFromReaderWithoutMark ( Reader input ) throws IOExc... | int c = input . read ( ) ; if ( c == - 1 ) return null ; StringBuilder line = new StringBuilder ( expectedLineLength ) ; while ( c != EOF && c != '\n' && c != '\r' ) { char ch = ( char ) c ; line . append ( ch ) ; c = input . read ( ) ; } return line . toString ( ) ; |
public class TypesafeConfigModule { /** * Scans the specified packages for annotated classes , and applies Config values to them .
* @ param config the Config to derive values from
* @ return The constructed TypesafeConfigModule . */
public static TypesafeConfigModule fromConfigUsingClasspathScanner ( Config config... | return new TypesafeConfigModule ( config , new FastClasspathScanningReflector ( scannerSpec ) ) ; |
public class FileExtensionFilter { /** * Determines whether the given { @ link File } is accepted by this { @ link FileFilter } based on it ' s extension .
* @ param file { @ link File } to evaluate .
* @ return a boolean value indicating whether the given { @ link File } is accepted by this { @ link FileFilter } .... | Set < String > fileExtensions = getFileExtensions ( ) ; return ( fileExtensions . isEmpty ( ) || fileExtensions . contains ( FileUtils . getExtension ( file ) . toLowerCase ( ) . trim ( ) ) ) ; |
public class AmazonAlexaForBusinessClient { /** * Searches contacts and lists the ones that meet a set of filter and sort criteria .
* @ param searchContactsRequest
* @ return Result of the SearchContacts operation returned by the service .
* @ sample AmazonAlexaForBusiness . SearchContacts
* @ see < a href = "... | request = beforeClientExecution ( request ) ; return executeSearchContacts ( request ) ; |
public class AbstractMethod { /** * Return the relative path associated with this servlet .
* @ param request The servlet request we are processing
* @ return the relative path */
protected String getRelativePath ( HttpServletRequest request ) { } } | // Are we being processed by a RequestDispatcher . include ( ) ?
if ( request . getAttribute ( "javax.servlet.include.request_uri" ) != null ) { String result = ( String ) request . getAttribute ( "javax.servlet.include.path_info" ) ; // if ( result = = null )
// result = ( String ) request
// . getAttribute ( " javax ... |
public class CollectionUtil { /** * < p > filter . < / p >
* @ param collection a { @ link java . lang . Iterable } object .
* @ param predicate a { @ link com . greenpepper . util . CollectionUtil . Predicate } object .
* @ param < T > a T object .
* @ return a { @ link java . util . List } object . */
public ... | List < T > filtered = new ArrayList < T > ( ) ; for ( T element : collection ) { if ( predicate . isVerifiedBy ( element ) ) { filtered . add ( element ) ; } } return filtered ; |
public class HtmlRendererUtils { /** * Renders the hidden form input that is necessary for the autoscroll feature . */
public static void renderAutoScrollHiddenInput ( FacesContext facesContext , ResponseWriter writer ) throws IOException { } } | HtmlJavaScriptUtils . renderAutoScrollHiddenInput ( facesContext , writer ) ; |
public class BrowserUtils { /** * Opens the specified < tt > url < / tt > in the default browser .
* @ param url the url to open */
public static void openBrowser ( String url ) { } } | logger . debug ( "Launching browser at [" + url + "]" ) ; try { if ( ! openBrowserJava6 ( url ) ) { final String [ ] command = getOpenBrowserCommand ( url ) ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Using command " + Arrays . asList ( command ) ) ; } Runtime . getRuntime ( ) . exec ( command ) ; } } catc... |
public class AmazonTranscribeClient { /** * Gets information about a vocabulary .
* @ param getVocabularyRequest
* @ return Result of the GetVocabulary operation returned by the service .
* @ throws NotFoundException
* We can ' t find the requested resource . Check the name and try your request again .
* @ th... | request = beforeClientExecution ( request ) ; return executeGetVocabulary ( request ) ; |
public class MappingAssistantPanel { /** * GEN - LAST : event _ cmdCreateMappingActionPerformed */
private ImmutableList < TargetAtom > prepareTargetQuery ( MapItem predicateSubjectMap , List < MapItem > predicateObjectMapsList ) { } } | // Create the body of the CQ
ImmutableList . Builder < TargetAtom > bodyBuilder = ImmutableList . builder ( ) ; // Store concept in the body , if any
ImmutableTerm subjectTerm = createSubjectTerm ( predicateSubjectMap ) ; if ( ! predicateSubjectMap . getPredicateIRI ( ) . equals ( OWL . THING ) ) { TargetAtom concept =... |
public class PreambleUtil { /** * Returns a human readable string summary of the preamble state of the given Memory .
* Note : other than making sure that the given Memory size is large
* enough for just the preamble , this does not do much value checking of the contents of the
* preamble as this is primarily a t... | final int preLongs = getAndCheckPreLongs ( mem ) ; final ResizeFactor rf = ResizeFactor . getRF ( extractLgResizeFactor ( mem ) ) ; final int serVer = extractSerVer ( mem ) ; final Family family = Family . idToFamily ( extractFamilyID ( mem ) ) ; final int lgNomLongs = extractLgNomLongs ( mem ) ; final int lgArrLongs =... |
public class ZipFileUtil { /** * Unzips a zipfile into the directory it resides in . Skips paths starting with ' . ' or ' _ '
* ( typically hidden paths ) .
* @ param file the file to unzip
* @ return List of Files that got extracted
* @ throws UnzipException if something went wrong */
public static List < File... | return unzip ( file , name -> name . startsWith ( "." ) || name . startsWith ( "_" ) ? null : name ) ; |
public class Resources { /** * Replies the URL of a property resource that is associated to the given class .
* @ param classLoader is the research scope . If < code > null < / code > ,
* the class loader replied by { @ link ClassLoaderFinder } is used .
* @ param classname is the class for which the property res... | final StringBuilder name = new StringBuilder ( ) ; // Localized file
if ( locale != null ) { final String country = locale . getCountry ( ) ; if ( country != null && ! country . isEmpty ( ) ) { name . append ( classname . getSimpleName ( ) ) ; name . append ( "_" ) ; // $ NON - NLS - 1 $
name . append ( country ) ; nam... |
public class KeyVaultClientBaseImpl { /** * Imports an externally created key , stores it , and returns key parameters and attributes to the client .
* The import key operation may be used to import any key type into an Azure Key Vault . If the named key already exists , Azure Key Vault creates a new version of the k... | return ServiceFuture . fromResponse ( importKeyWithServiceResponseAsync ( vaultBaseUrl , keyName , key , hsm , keyAttributes , tags ) , serviceCallback ) ; |
public class LToSrtBiFunctionBuilder { /** * One of ways of creating builder . This might be the only way ( considering all _ functional _ builders ) that might be utilize to specify generic params only once . */
@ Nonnull public static < T1 , T2 > LToSrtBiFunctionBuilder < T1 , T2 > toSrtBiFunction ( Consumer < LToSrt... | return new LToSrtBiFunctionBuilder ( consumer ) ; |
public class VoldemortUtils { /** * Given the comma separated list of properties as a string , splits it
* multiple strings
* @ param paramValue Concatenated string
* @ param type Type of parameter ( to throw exception )
* @ return List of string properties */
public static List < String > getCommaSeparatedStri... | List < String > commaSeparatedProps = Lists . newArrayList ( ) ; for ( String url : Utils . COMMA_SEP . split ( paramValue . trim ( ) ) ) if ( url . trim ( ) . length ( ) > 0 ) commaSeparatedProps . add ( url ) ; if ( commaSeparatedProps . size ( ) == 0 ) { throw new RuntimeException ( "Number of " + type + " should be... |
public class UserInfo { /** * Set up the screen input fields . */
public void setupFields ( ) { } } | FieldInfo field = null ; field = new FieldInfo ( this , ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Integer . class ) ; field . setHidden ( true ) ; field = new FieldInfo ( this , LAST_CHANGED , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setDataClass ( Date . class ) ;... |
public class XWikiSerializer2 { /** * Special case when detected , that there are image thumbnail . Thus it ' s
* possible to insert something like XWiki " LightBox " macro . ( Default
* implementation will set " width : 200px " ) */
protected void onImageThumbnail ( WikiReference ref ) { } } | WikiParameters params = ref . getParameters ( ) ; final WikiParameter oldstyle = params . getParameter ( "style" ) ; if ( oldstyle != null ) { // remove existing
params . remove ( "style" ) ; params = params . addParameter ( "style" , oldstyle . getValue ( ) + ";" + "float: right; width:" + getImageThumbwidth ( ) ) ; }... |
public class Base64Util { /** * XXX : decode ( ) vs decodeIgnoreWhitespace ( ) , check RFC */
public static void decodeIgnoreWhitespace ( Reader r , OutputStream os ) throws IOException { } } | while ( true ) { int ch0 = readNonWhitespace ( r ) ; int ch1 = readNonWhitespace ( r ) ; int ch2 = readNonWhitespace ( r ) ; int ch3 = readNonWhitespace ( r ) ; if ( ch1 < 0 ) break ; if ( ch2 < 0 ) ch2 = '=' ; if ( ch3 < 0 ) ch3 = '=' ; int chunk = ( ( _decode [ ch0 ] << 18 ) + ( _decode [ ch1 ] << 12 ) + ( _decode [ ... |
public class HttpSupport { /** * Returns true if any named request parameter is blank .
* @ param names names of request parameters .
* @ return true if any request parameter is blank . */
protected boolean blank ( String ... names ) { } } | // TODO : write test , move elsewhere - some helper
for ( String name : names ) { if ( Util . blank ( param ( name ) ) ) { return true ; } } return false ; |
public class WfsGetFeatureCommand { /** * Get the total bounds of all features in the collection .
* @ param features
* @ return bounds or null if no features */
protected Bbox getTotalBounds ( List < Feature > features ) { } } | Bbox total = null ; for ( Feature featureDto : features ) { org . geomajas . geometry . Geometry geom = featureDto . getGeometry ( ) ; if ( geom != null ) { Bbox b = GeometryService . getBounds ( geom ) ; if ( total == null ) { total = b ; } else { total = BboxService . union ( total , b ) ; } } } return total ; |
public class ListResourceDefinitionsResult { /** * Information about a definition .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setDefinitions ( java . util . Collection ) } or { @ link # withDefinitions ( java . util . Collection ) } if you want to
* o... | if ( this . definitions == null ) { setDefinitions ( new java . util . ArrayList < DefinitionInformation > ( definitions . length ) ) ; } for ( DefinitionInformation ele : definitions ) { this . definitions . add ( ele ) ; } return this ; |
public class DefaultTemplateBuilder { /** * Creates the largest possible bounding box that fits around the specified bounding box but has a different
* width / height ratio . and the same centerpoint .
* @ param bbox
* @ param newRatio
* width / height ratio
* @ return bbox */
public Bbox createFittingBox ( B... | double oldRatio = bbox . getWidth ( ) / bbox . getHeight ( ) ; double newWidth = bbox . getWidth ( ) ; double newHeight = bbox . getHeight ( ) ; if ( newRatio < oldRatio ) { // Keep width of bbox , decrease height to fullfill newRatio
newHeight = newWidth / newRatio ; } else { // Keep height of bbox , decrease width to... |
public class PolylineMarkers { /** * { @ inheritDoc } */
@ Override public void setZIndex ( float zIndex ) { } } | if ( polyline != null ) { polyline . setZIndex ( zIndex ) ; } for ( Marker marker : markers ) { marker . setZIndex ( zIndex ) ; } |
public class HMModelIM { /** * Get the { @ link GridCoverage2D } in a certain region .
* < p > It might be usefull for faster access to the underlying data to
* extract the raster before creatin the iterator , instead of iterating
* directly .
* < p > This can be done on the returned gridcoverage through :
* ... | GeneralParameterValue [ ] readGeneralParameterValues = CoverageUtilities . createGridGeometryGeneralParameter ( xRes , yRes , north , south , east , west , crs ) ; ImageMosaicReader reader = readers . get ( readerNum ) ; GridCoverage2D readGC = reader . read ( readGeneralParameterValues ) ; return readGC ; |
public class SqlKeywordCompleter { /** * { @ inheritDoc }
* @ see org . jline . reader . Completer # complete ( org . jline . reader . LineReader , org . jline . reader . ParsedLine , java . util . List ) */
@ Override public void complete ( final LineReader reader , final ParsedLine line , final List < Candidate > c... | String buffer = line . line ( ) . substring ( 0 , line . cursor ( ) ) ; String [ ] parts = getLineParts ( buffer ) ; int len = parts . length ; // コード補完する引数の番号を特定 。
int startArgNo = getStartArgNo ( line ) ; // 対象引数が - 1 、 または開始引数にlenが満たない場合は該当なしなのでコード補完しない
if ( ! accept ( startArgNo , buffer , len ) ) { return ; }... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.