signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SessionFailRetryLoop { /** * Convenience utility : creates a " session fail " retry loop calling the given proc * @ param client Zookeeper * @ param mode how to handle session failures * @ param proc procedure to call with retry * @ param < T > return type * @ return procedure result * @ throws...
T result = null ; SessionFailRetryLoop retryLoop = client . newSessionFailRetryLoop ( mode ) ; retryLoop . start ( ) ; try { while ( retryLoop . shouldContinue ( ) ) { try { result = proc . call ( ) ; } catch ( Exception e ) { ThreadUtils . checkInterrupted ( e ) ; retryLoop . takeException ( e ) ; } } } finally { retr...
public class RawPacket { /** * Append a byte array to the end of the packet . This may change the data * buffer of this packet . * @ param data byte array to append * @ param len the number of bytes to append */ public void append ( byte [ ] data , int len ) { } }
if ( data == null || len <= 0 || len > data . length ) { throw new IllegalArgumentException ( "Invalid combination of parameters data and length to append()" ) ; } int oldLimit = buffer . limit ( ) ; // grow buffer if necessary grow ( len ) ; // set positing to begin writing immediately after the last byte of the curre...
public class hqlParser { /** * hql . g : 199:1 : optionalFromTokenFromClause : optionalFromTokenFromClause2 path ( asAlias ) ? - > ^ ( FROM ^ ( RANGE path ( asAlias ) ? ) ) ; */ public final hqlParser . optionalFromTokenFromClause_return optionalFromTokenFromClause ( ) throws RecognitionException { } }
hqlParser . optionalFromTokenFromClause_return retval = new hqlParser . optionalFromTokenFromClause_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; ParserRuleReturnScope optionalFromTokenFromClause223 = null ; ParserRuleReturnScope path24 = null ; ParserRuleReturnScope asAlias25 = null ; Rew...
public class LibraryLoader { /** * Search and load the dynamic library which is fitting the * current operating system ( 32 or 64bits operating system . . . ) . * A 64 bits library is assumed to be named < code > libname64 . dll < / code > * on Windows & reg ; and < code > liblibname64 . so < / code > on Unix . ...
loadPlatformDependentLibrary ( libname , null , path ) ;
public class CustomFunctions { /** * Takes a single parameter ( administrative boundary as a string ) and returns the name of the leaf boundary */ public static String format_location ( EvaluationContext ctx , Object text ) { } }
String _text = Conversions . toString ( text , ctx ) ; String [ ] splits = _text . split ( ">" ) ; return splits [ splits . length - 1 ] . trim ( ) ;
public class PlanExecutor { /** * Creates an executor that runs the plan locally in a multi - threaded environment . * @ return A local executor . * @ see eu . stratosphere . client . LocalExecutor */ public static PlanExecutor createLocalExecutor ( ) { } }
Class < ? extends PlanExecutor > leClass = loadExecutorClass ( LOCAL_EXECUTOR_CLASS ) ; try { return leClass . newInstance ( ) ; } catch ( Throwable t ) { throw new RuntimeException ( "An error occurred while loading the local executor (" + LOCAL_EXECUTOR_CLASS + ")." , t ) ; }
public class Widgets { /** * Creates an image button that changes appearance when you click and hover over it . */ public static PushButton newImageButton ( String style , ClickHandler onClick ) { } }
PushButton button = new PushButton ( ) ; maybeAddClickHandler ( button , onClick ) ; return setStyleNames ( button , style , "actionLabel" ) ;
public class OVSImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . OVS__BYPSIDEN : setBYPSIDEN ( ( Integer ) newValue ) ; return ; case AfplibPackage . OVS__OVERCHAR : setOVERCHAR ( ( Integer ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class PluginProxy { /** * Prints the help related to the plugin to a specified output . * @ param out * the writer where the help should be written */ public void printHelp ( final PrintWriter out ) { } }
HelpFormatter hf = new HelpFormatter ( ) ; StringBuilder sbDivider = new StringBuilder ( "=" ) ; while ( sbDivider . length ( ) < hf . getPageWidth ( ) ) { sbDivider . append ( '=' ) ; } out . println ( sbDivider . toString ( ) ) ; out . println ( "PLUGIN NAME : " + proxyedPluginDefinition . getName ( ) ) ; if ( descri...
public class Clock { public final static String toClockString ( int value ) { } }
if ( value < 10 ) return "0" + Integer . toString ( value ) ; return Integer . toString ( value ) ;
public class DateTimeZone { /** * Gets the millisecond offset to add to UTC to get local time . * @ param instant instant to get the offset for , null means now * @ return the millisecond offset to add to UTC to get local time */ public final int getOffset ( ReadableInstant instant ) { } }
if ( instant == null ) { return getOffset ( DateTimeUtils . currentTimeMillis ( ) ) ; } return getOffset ( instant . getMillis ( ) ) ;
public class HTMLUtil { /** * Restrict HTML except for the specified tags . * @ param allowFormatting enables & lt ; i & gt ; , & lt ; b & gt ; , & lt ; u & gt ; , * & lt ; font & gt ; , & lt ; br & gt ; , & lt ; p & gt ; , and * & lt ; hr & gt ; . * @ param allowImages enabled & lt ; img . . . & gt ; . * @ p...
// TODO : these regexes should probably be checked to make // sure that javascript can ' t live inside a link ArrayList < String > allow = new ArrayList < String > ( ) ; if ( allowFormatting ) { allow . add ( "<b>" ) ; allow . add ( "</b>" ) ; allow . add ( "<i>" ) ; allow . add ( "</i>" ) ; allow . add ( "<u>" ) ; all...
public class CaptureSearchResult { /** * { @ code true } if HTTP response code is either { @ code 4xx } or { @ code 5xx } . * @ return */ public boolean isHttpError ( ) { } }
if ( isRevisitDigest ( ) && ( getDuplicatePayload ( ) != null ) ) { return getDuplicatePayload ( ) . isHttpError ( ) ; } String httpCode = getHttpCode ( ) ; return ( httpCode . startsWith ( "4" ) || httpCode . startsWith ( "5" ) ) ;
public class GrouperEntityGroupStore { /** * / * ( non - Javadoc ) * @ see org . apereo . portal . groups . IEntityGroupStore # contains ( org . apereo . portal . groups . IEntityGroup , org . apereo . portal . groups . IGroupMember ) */ @ Override public boolean contains ( IEntityGroup group , IGroupMember member ) ...
String groupContainerName = group . getLocalKey ( ) ; String groupMemberName = member . getKey ( ) ; if ( ! validKey ( groupContainerName ) || ! validKey ( groupMemberName ) ) { return false ; } GcHasMember gcHasMember = new GcHasMember ( ) ; gcHasMember . assignGroupName ( groupContainerName ) ; gcHasMember . addSubje...
public class AlpineQueryManager { /** * Updates a EventServiceLog . * @ param eventServiceLog the EventServiceLog to update * @ return an updated EventServiceLog */ public EventServiceLog updateEventServiceLog ( EventServiceLog eventServiceLog ) { } }
if ( eventServiceLog != null ) { final EventServiceLog log = getObjectById ( EventServiceLog . class , eventServiceLog . getId ( ) ) ; if ( log != null ) { pm . currentTransaction ( ) . begin ( ) ; log . setCompleted ( new Timestamp ( new Date ( ) . getTime ( ) ) ) ; pm . currentTransaction ( ) . commit ( ) ; return pm...
public class JdbcClient { /** * GetJob helper - String predicates are all created the same way , so this factors some code . */ private String getStringPredicate ( String fieldName , List < String > filterValues , List < Object > prms ) { } }
if ( filterValues != null && ! filterValues . isEmpty ( ) ) { String res = "" ; for ( String filterValue : filterValues ) { if ( filterValue == null ) { continue ; } if ( ! filterValue . isEmpty ( ) ) { prms . add ( filterValue ) ; if ( filterValue . contains ( "%" ) ) { res += String . format ( "(%s LIKE ?) OR " , fie...
public class RedirectFilter { /** * Computes the URI where the request need to be transferred . * @ param request the request * @ return the URI * @ throws java . net . URISyntaxException if the URI cannot be computed */ public URI rewriteURI ( Request request ) throws URISyntaxException { } }
String path = request . path ( ) ; if ( ! path . startsWith ( prefix ) ) { return null ; } StringBuilder uri = new StringBuilder ( redirectTo ) ; if ( redirectTo . endsWith ( "/" ) ) { uri . setLength ( uri . length ( ) - 1 ) ; } String rest = path . substring ( prefix . length ( ) ) ; if ( ! rest . startsWith ( "/" ) ...
public class MutableBkTree { /** * Adds all of the given elements to this tree . * @ param elements elements */ @ SafeVarargs public final void addAll ( E ... elements ) { } }
if ( elements == null ) throw new NullPointerException ( ) ; addAll ( Arrays . asList ( elements ) ) ;
public class XGBoostSetupTask { /** * Finds what nodes actually do carry some of data of a given Frame * @ param fr frame to find nodes for * @ return FrameNodes */ public static FrameNodes findFrameNodes ( Frame fr ) { } }
// Count on how many nodes the data resides boolean [ ] nodesHoldingFrame = new boolean [ H2O . CLOUD . size ( ) ] ; Vec vec = fr . anyVec ( ) ; for ( int chunkNr = 0 ; chunkNr < vec . nChunks ( ) ; chunkNr ++ ) { int home = vec . chunkKey ( chunkNr ) . home_node ( ) . index ( ) ; if ( ! nodesHoldingFrame [ home ] ) no...
public class TopLevel { /** * Get the cached native error constructor from this scope with the * given < code > type < / code > . Returns null if { @ link # cacheBuiltins ( ) } has not * been called on this object . * @ param type the native error type * @ return the native error constructor */ BaseFunction get...
return errors != null ? errors . get ( type ) : null ;
public class HttpChannelPool { /** * Returns an array whose index signifies { @ link SessionProtocol # ordinal ( ) } . Similar to { @ link EnumMap } . */ private static < T > T [ ] newEnumMap ( Class < ? > elementType , Function < SessionProtocol , T > factory , SessionProtocol ... allowedProtocols ) { } }
@ SuppressWarnings ( "unchecked" ) final T [ ] maps = ( T [ ] ) Array . newInstance ( elementType , SessionProtocol . values ( ) . length ) ; // Attempting to access the array with an unallowed protocol will trigger NPE , // which will help us find a bug . for ( SessionProtocol p : allowedProtocols ) { maps [ p . ordin...
public class SimpleClickSupport { /** * Handler click event on item * @ param targetView the view that trigger the click event , not the view respond the cell ! * @ param cell the corresponding cell * @ param eventType click event type , defined by developer . */ public void onClick ( View targetView , BaseCell c...
if ( cell instanceof Cell ) { onClick ( targetView , ( Cell ) cell , eventType ) ; } else { onClick ( targetView , cell , eventType , null ) ; }
public class ModelSerializer { /** * Write a model to an output stream * @ param model the model to save * @ param stream the output stream to write to * @ param saveUpdater whether to save the updater for the model or not * @ throws IOException */ public static void writeModel ( @ NonNull Model model , @ NonNu...
writeModel ( model , stream , saveUpdater , null ) ;
public class BoxIteratorEnterpriseEvents { /** * Gets the next position in the event stream that you should request in order to get the next events . * @ return next position in the event stream to request in order to get the next events . */ public Long getNextStreamPosition ( ) { } }
String longValue = getPropertyAsString ( FIELD_NEXT_STREAM_POSITION ) ; return Long . parseLong ( longValue . replace ( "\"" , "" ) ) ;
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EncodingSchemeIDESidUD createEncodingSchemeIDESidUDFromString ( EDataType eDataType , String initialValue ) { } }
EncodingSchemeIDESidUD result = EncodingSchemeIDESidUD . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class ZWaveWakeUpCommandClass { /** * { @ inheritDoc } */ @ Override public void handleApplicationCommandRequest ( SerialMessage serialMessage , int offset , int endpoint ) { } }
logger . trace ( "Handle Message Wake Up Request" ) ; logger . debug ( String . format ( "Received Wake Up Request for Node ID = %d" , this . getNode ( ) . getNodeId ( ) ) ) ; int command = serialMessage . getMessagePayloadByte ( offset ) ; switch ( command ) { case WAKE_UP_INTERVAL_SET : case WAKE_UP_INTERVAL_GET : ca...
public class HelloSignClient { /** * Retrieves the PDF file backing the Template specified by the provided * Template ID . * @ param templateId String Template ID * @ return File PDF file object * @ throws HelloSignException thrown if there ' s a problem processing the * HTTP request or the JSON response . */...
String url = BASE_URI + TEMPLATE_FILE_URI + "/" + templateId ; String fileName = TEMPLATE_FILE_NAME + "." + TEMPLATE_FILE_EXT ; return httpClient . withAuth ( auth ) . get ( url ) . asFile ( fileName ) ;
public class Bankverbindung { /** * Liefert die einzelnen Attribute einer Bankverbindung als Map . * @ return Attribute als Map */ @ Override public Map < String , Object > toMap ( ) { } }
Map < String , Object > map = new HashMap < > ( ) ; map . put ( "kontoinhaber" , getKontoinhaber ( ) ) ; map . put ( "iban" , getIban ( ) ) ; getBic ( ) . ifPresent ( b -> map . put ( "bic" , b ) ) ; return map ;
public class AbstractTagLibrary { /** * Add a ValidateHandler for the specified validatorId * @ see javax . faces . view . facelets . ValidatorHandler * @ see javax . faces . application . Application # createValidator ( java . lang . String ) * @ param name * name to use , " foo " would be & lt ; my : foo / > ...
_factories . put ( name , new ValidatorHandlerFactory ( validatorId ) ) ;
public class ManagementProtocolHeader { /** * Validate the header signature . * @ param input The input to read the signature from * @ throws IOException If any read problems occur */ protected static void validateSignature ( final DataInput input ) throws IOException { } }
final byte [ ] signatureBytes = new byte [ 4 ] ; input . readFully ( signatureBytes ) ; if ( ! Arrays . equals ( ManagementProtocol . SIGNATURE , signatureBytes ) ) { throw ProtocolLogger . ROOT_LOGGER . invalidSignature ( Arrays . toString ( signatureBytes ) ) ; }
public class StorageDir { /** * Removes a block from this storage dir . * @ param blockMeta the metadata of the block * @ throws BlockDoesNotExistException if no block is found */ public void removeBlockMeta ( BlockMeta blockMeta ) throws BlockDoesNotExistException { } }
Preconditions . checkNotNull ( blockMeta , "blockMeta" ) ; long blockId = blockMeta . getBlockId ( ) ; BlockMeta deletedBlockMeta = mBlockIdToBlockMap . remove ( blockId ) ; if ( deletedBlockMeta == null ) { throw new BlockDoesNotExistException ( ExceptionMessage . BLOCK_META_NOT_FOUND , blockId ) ; } reclaimSpace ( bl...
public class WebSiteManagementClientImpl { /** * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules . * Verifies if this VNET is compatible with an App Service Environment by analyzing the Network Security Group rules . * @ param parameters VNET informa...
return verifyHostingEnvironmentVnetWithServiceResponseAsync ( parameters ) . map ( new Func1 < ServiceResponse < VnetValidationFailureDetailsInner > , VnetValidationFailureDetailsInner > ( ) { @ Override public VnetValidationFailureDetailsInner call ( ServiceResponse < VnetValidationFailureDetailsInner > response ) { r...
public class CommsByteBuffer { /** * Reads some message handles from the buffer . * @ return Returns a array of SIMessageHandle objects */ public synchronized SIMessageHandle [ ] getSIMessageHandles ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSIMessageHandles" ) ; int arrayCount = getInt ( ) ; // BIT32 ArrayCount if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "arrayCount" , arrayCount ) ; SIMessageHandle...
public class StructureTools { /** * Returns the set of intra - chain contacts for the given chain for all non - H * atoms of non - hetatoms , i . e . the contact map . Uses a geometric hashing * algorithm that speeds up the calculation without need of full distance * matrix . The parsing mode * { @ link FilePar...
return getAtomsInContact ( chain , ( String [ ] ) null , cutoff ) ;
public class CmsHtmlImport { /** * Imports all resources from the real file system , stores them into the correct locations * in the OpenCms VFS and modifies all links . This method is called form the JSP to start the * import process . < p > * @ param report StringBuffer for reporting * @ throws Exception if s...
try { m_report = report ; m_report . println ( Messages . get ( ) . container ( Messages . RPT_HTML_IMPORT_BEGIN_0 ) , I_CmsReport . FORMAT_HEADLINE ) ; boolean isStream = ! CmsStringUtil . isEmptyOrWhitespaceOnly ( m_httpDir ) ; File streamFolder = null ; if ( isStream ) { // the input is starting through the HTTP upl...
public class Cron4jNow { @ Override public OptionalThing < Cron4jJob > findJobByKey ( LaJobKey jobKey ) { } }
assertArgumentNotNull ( "jobKey" , jobKey ) ; final Cron4jJob found = jobKeyJobMap . get ( jobKey ) ; return OptionalThing . ofNullable ( found , ( ) -> { String msg = "Not found the job by the key: " + jobKey + " existing=" + jobKeyJobMap . keySet ( ) ; throw new JobNotFoundException ( msg ) ; } ) ;
public class HijriCalendar { /** * / * [ deutsch ] * < p > Subtrahiert die angegebenen Zeiteinheiten von dieser Instanz . < / p > * @ param amount amount to be subtracted ( maybe negative ) * @ param unit calendrical unit * @ return result of subtraction as changed copy , this instance remains unaffected * @ ...
return this . plus ( MathUtils . safeNegate ( amount ) , unit ) ;
public class CancelSpotFleetRequestsRequest { /** * The IDs of the Spot Fleet requests . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setSpotFleetRequestIds ( java . util . Collection ) } or { @ link # withSpotFleetRequestIds ( java . util . Collection ) }...
if ( this . spotFleetRequestIds == null ) { setSpotFleetRequestIds ( new com . amazonaws . internal . SdkInternalList < String > ( spotFleetRequestIds . length ) ) ; } for ( String ele : spotFleetRequestIds ) { this . spotFleetRequestIds . add ( ele ) ; } return this ;
public class GetCampaignsWithAwql { /** * Runs the example . * @ param adWordsServices the services factory . * @ param session the session . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if the API request failed due to other errors . */ public s...
// Get the CampaignService . CampaignServiceInterface campaignService = adWordsServices . get ( session , CampaignServiceInterface . class ) ; ServiceQuery serviceQuery = new ServiceQuery . Builder ( ) . fields ( CampaignField . Id , CampaignField . Name , CampaignField . Status ) . orderBy ( CampaignField . Name ) . l...
public class SubscriptionManager { /** * Note : never returns null ! */ public Collection < Subscription > getSubscriptionsByMessageType ( Class messageType ) { } }
Set < Subscription > subscriptions = new TreeSet < Subscription > ( Subscription . SubscriptionByPriorityDesc ) ; ReadLock readLock = readWriteLock . readLock ( ) ; try { readLock . lock ( ) ; Subscription subscription ; ArrayList < Subscription > subsPerMessage = subscriptionsPerMessage . get ( messageType ) ; if ( su...
public class LimitAsyncOperations { /** * Same as getLastPendingOperation but never return null ( return an unblocked synchronization point instead ) . */ public ISynchronizationPoint < OutputErrorType > flush ( ) { } }
SynchronizationPoint < OutputErrorType > sp = new SynchronizationPoint < > ( ) ; Runnable callback = new Runnable ( ) { @ Override public void run ( ) { AsyncWork < OutputResultType , OutputErrorType > last = null ; synchronized ( waiting ) { if ( error != null ) sp . error ( error ) ; else if ( cancelled != null ) sp ...
public class FluentMatchingR { /** * Sets a { @ link Function } to be run if no match is found . */ public FluentMatchingR < T , R > orElse ( Function < T , R > function ) { } }
patterns . add ( Pattern . of ( t -> true , function :: apply ) ) ; return this ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcAxis1Placement ( ) { } }
if ( ifcAxis1PlacementEClass == null ) { ifcAxis1PlacementEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 31 ) ; } return ifcAxis1PlacementEClass ;
public class CollectionExtensions { /** * Adds all of the specified elements to the specified collection . * @ param collection * the collection into which the { @ code elements } are to be inserted . May not be < code > null < / code > . * @ param elements * the elements to insert into the { @ code collection ...
return collection . addAll ( Arrays . asList ( elements ) ) ;
public class MPEGAudioFrameHeader { /** * Read in all the information found in the mpeg header . * @ param location the location of the header ( found by findFrame ) * @ exception FileNotFoundException if an error occurs * @ exception IOException if an error occurs */ private void readHeader ( RandomAccessInputSt...
byte [ ] head = new byte [ HEADER_SIZE ] ; raf . seek ( location ) ; if ( raf . read ( head ) != HEADER_SIZE ) { throw new IOException ( "Error reading MPEG frame header." ) ; } version = ( head [ 1 ] & 0x18 ) >> 3 ; layer = ( head [ 1 ] & 0x06 ) >> 1 ; crced = ( head [ 1 ] & 0x01 ) == 0 ; bitRate = findBitRate ( ( hea...
public class AWSFMSClient { /** * Disassociates the account that has been set as the AWS Firewall Manager administrator account . To set a different * account as the administrator account , you must submit an < code > AssociateAdminAccount < / code > request . * @ param disassociateAdminAccountRequest * @ return ...
request = beforeClientExecution ( request ) ; return executeDisassociateAdminAccount ( request ) ;
public class VomsProxyDestroy { /** * Get option values from a { @ link CommandLine } object to build a * { @ link ProxyDestroyParams } object containing the parameters for * voms - proxy - destroy . * @ param commandLine * @ return the parameters for the { @ link VomsProxyDestroy } command */ private ProxyDest...
ProxyDestroyParams params = new ProxyDestroyParams ( ) ; if ( commandLineHasOption ( ProxyDestroyOptions . DRY ) ) { params . setDryRun ( true ) ; } if ( commandLineHasOption ( ProxyDestroyOptions . FILE ) ) { params . setProxyFile ( getOptionValue ( ProxyDestroyOptions . FILE ) ) ; } return params ;
public class LWJGFont { /** * Draws the text given by the specified string , using this font instance ' s current color . < br > * Note that the specified destination coordinates is a left point of the rendered string ' s baseline . * @ param text the string to be drawn . * @ param dstX the x coordinate to render...
DrawPoint drawPoint = new DrawPoint ( dstX , dstY , dstZ ) ; MappedCharacter character ; if ( ! LwjgFontUtil . isEmpty ( text ) ) { for ( int i = 0 ; i < text . length ( ) ; i ++ ) { char ch = text . charAt ( i ) ; if ( ch == LineFeed . getCharacter ( ) ) { // LF は改行扱いにする drawPoint . dstX = dstX ; drawPoint . dstY -= g...
public class DoubleConstantRange { /** * Range operations . */ @ Override public boolean isOverlapping ( ConstantRange r ) { } }
if ( ! ( r instanceof DoubleConstantRange ) ) throw new IllegalArgumentException ( ) ; if ( ! isValid ( ) || ! r . isValid ( ) ) return false ; DoubleConstantRange dr = ( DoubleConstantRange ) r ; DoubleConstant rh = dr . high ; boolean rhi = dr . highIncl ; if ( ! low . equals ( NEG_INF ) && ( ( lowIncl && ( ( rhi && ...
public class JDBCCallableStatement { /** * # ifdef JAVA6 */ public synchronized void setClob ( String parameterName , Clob x ) throws SQLException { } }
super . setClob ( findParameterIndex ( parameterName ) , x ) ;
public class XmlRepositoryFactory { /** * Package private function used by { @ link XmlInputOutputHandler } to retrieve query string from repository * @ param inputHandler Xml input / output handler * @ return override values ( if present ) * @ throws MjdbcRuntimeException if query name wasn ' t loaded to reposit...
AssertUtils . assertNotNull ( inputHandler ) ; Overrider result = null ; if ( xmlOverrideMap . containsKey ( inputHandler . getName ( ) ) == false ) { throw new MjdbcRuntimeException ( "Failed to find query by name: " + inputHandler . getName ( ) + ". Please ensure that relevant file was loaded into repository" ) ; } r...
public class SVG { /** * Returns the viewBox attribute of the current SVG document . * @ return the document ' s viewBox attribute as a { @ code android . graphics . RectF } object , or null if not set . * @ throws IllegalArgumentException if there is no current SVG document loaded . */ @ SuppressWarnings ( { } }
"WeakerAccess" , "unused" } ) public RectF getDocumentViewBox ( ) { if ( this . rootElement == null ) throw new IllegalArgumentException ( "SVG document is empty" ) ; if ( this . rootElement . viewBox == null ) return null ; return this . rootElement . viewBox . toRectF ( ) ;
public class OWLObjectSomeValuesFromImpl_CustomFieldSerializer { /** * Serializes the content of the object into the * { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } . * @ param streamWriter the { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } to write...
serialize ( streamWriter , instance ) ;
public class PolynomialOps { /** * TODO try using a linear search alg here */ public static double refineRoot ( Polynomial poly , double root , int maxIterations ) { } }
// for ( int i = 0 ; i < maxIterations ; i + + ) { // double v = poly . c [ poly . size - 1 ] ; // double d = v * ( poly . size - 1 ) ; // for ( int j = poly . size - 1 ; j > 0 ; j - - ) { // v = poly . c [ j ] + v * root ; // d = poly . c [ j ] * j + d * root ; // v = poly . c [ 0 ] + v * root ; // if ( d = = 0 ) // r...
public class SoyExpression { /** * Unboxes this to a { @ link SoyExpression } with a List runtime type . * < p > This method is appropriate when you know ( likely via inspection of the { @ link # soyType ( ) } , * or other means ) that the value does have the appropriate type but you prefer to interact with * it ...
if ( alreadyUnboxed ( List . class ) ) { return this ; } assertBoxed ( List . class ) ; Expression unboxedList ; if ( delegate . isNonNullable ( ) ) { unboxedList = delegate . checkedCast ( SOY_LIST_TYPE ) . invoke ( MethodRef . SOY_LIST_AS_JAVA_LIST ) ; } else { unboxedList = new Expression ( BytecodeUtils . LIST_TYPE...
public class WebsocketClientEndpoint { /** * Close the connection */ @ Override public void close ( ) { } }
if ( userSession == null ) { return ; } try { final CloseReason closeReason = new CloseReason ( CloseCodes . NORMAL_CLOSURE , "Socket closed" ) ; userSession . close ( closeReason ) ; } catch ( Throwable e ) { logger . error ( "Got exception while closing socket" , e ) ; } userSession = null ;
public class ByteUtil { /** * Returns the index ( start position ) of the first occurrence of the specified * { @ code target } within { @ code array } starting at { @ code fromIndex } , or * { @ code - 1 } if there is no such occurrence . * Returns the lowest index { @ code k } such that { @ code k > = fromIndex...
if ( array == null || target == null ) { return - 1 ; } // Target cannot be beyond array boundaries if ( fromIndex < 0 || ( fromIndex > ( array . length - target . length ) ) ) { return - 1 ; } // Empty is assumed to be at the fromIndex of any non - null array ( after // boundary check ) if ( target . length == 0 ) { r...
public class AbstractSingleton { /** * Implementation of { @ link IScopeDestructionAware } . Calls the protected * { @ link # onDestroy ( ) } method . */ @ Override public final void onScopeDestruction ( @ Nonnull final IScope aScopeInDestruction ) throws Exception { } }
if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "onScopeDestruction for '" + toString ( ) + "' in scope " + aScopeInDestruction . toString ( ) ) ; // Check init state if ( isInInstantiation ( ) ) { if ( LOGGER . isWarnEnabled ( ) ) LOGGER . warn ( "Object currently in instantiation is now destroyed: " + toString ( ...
public class RepositoryCreationSynchronizer { /** * Make the current node wait until being released by the coordinator */ private void waitForCoordinator ( ) { } }
LOG . info ( "Waiting to be released by the coordinator" ) ; try { lock . await ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; }
public class Fields { /** * < p > Filters the { @ link Field } s which are annotated with < b > all < / b > the given annotations and returns * a new instance of { @ link Fields } that wrap the filtered collection . < / p > * @ param annotation * the { @ link Field } s annotated with < b > all < / b > these types...
assertNotNull ( annotations , Class [ ] . class ) ; return new Fields ( filter ( new Criterion ( ) { @ Override public boolean evaluate ( Field field ) { boolean hasAllAnnotations = true ; for ( Class < ? extends Annotation > annotation : annotations ) { if ( ! field . isAnnotationPresent ( annotation ) ) { hasAllAnnot...
public class CollectionItemMatcher { /** * { @ inheritDoc } */ public boolean matches ( Iterable < ? extends T > target ) { } }
for ( T value : target ) { if ( matcher . matches ( value ) ) { return true ; } } return false ;
public class Response { /** * Returns the json content from http response * @ return * @ throws ConnectionException */ public String getContent ( ) throws ConnectionException { } }
logger . debug ( "Enter Response::getContent" ) ; if ( content != null ) { logger . debug ( "content already available " ) ; return content ; } BufferedReader rd = new BufferedReader ( new InputStreamReader ( stream ) ) ; StringBuffer result = new StringBuffer ( ) ; String line = "" ; try { while ( ( line = rd . readLi...
public class PUInfoImpl { /** * Private method that takes a list of InMemoryMappingFiles and copies them by assigning a new * id while sharing the same underlying byte array . This method avoids unnecessarily create * identical byte arrays . Once all references to a byte array are deleted , the garbage * collecto...
List < InMemoryMappingFile > immf = new ArrayList < InMemoryMappingFile > ( ) ; for ( InMemoryMappingFile file : copyIMMF ) { immf . add ( new InMemoryMappingFile ( file . getMappingFile ( ) ) ) ; } return immf ;
public class AbstractMaterialDialogBuilder { /** * Obtains the title color from a specific theme . * @ param themeResourceId * The resource id of the theme , the title color should be obtained from , as an { @ link * Integer } value */ private void obtainTitleColor ( @ StyleRes final int themeResourceId ) { } }
TypedArray typedArray = getContext ( ) . getTheme ( ) . obtainStyledAttributes ( themeResourceId , new int [ ] { R . attr . materialDialogTitleColor } ) ; int defaultColor = ThemeUtil . getColor ( getContext ( ) , themeResourceId , android . R . attr . textColorPrimary ) ; setTitleColor ( typedArray . getColor ( 0 , de...
public class A_CmsSelectCell { /** * Adds a new event handler to the widget . < p > * This method is used because we want the select box to register some event handlers on this widget , * but we can ' t use { @ link com . google . gwt . user . client . ui . Widget # addDomHandler } directly , since it ' s both prot...
return addDomHandler ( handler , type ) ;
public class HeapAnotB { /** * Sketch A is either unordered compact or hash table */ private void scanAllAsearchB ( ) { } }
final long [ ] scanAArr = a_ . getCache ( ) ; final int arrLongsIn = scanAArr . length ; cache_ = new long [ arrLongsIn ] ; for ( int i = 0 ; i < arrLongsIn ; i ++ ) { final long hashIn = scanAArr [ i ] ; if ( ( hashIn <= 0L ) || ( hashIn >= thetaLong_ ) ) { continue ; } final int foundIdx = hashSearch ( bHashTable_ , ...
public class OWLAnnotationImpl_CustomFieldSerializer { /** * Deserializes the content of the object from the * { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } . * @ param streamReader the { @ link com . google . gwt . user . client . rpc . SerializationStreamReader } to read the * ...
deserialize ( streamReader , instance ) ;
public class StringUtils { /** * Escape slashes and / or commas in the given value . * @ param value * @ return */ String escapeValue ( String value ) { } }
int start = 0 ; int pos = getNextLocation ( start , value ) ; if ( pos == - 1 ) { return value ; } StringBuilder builder = new StringBuilder ( ) ; while ( pos != - 1 ) { builder . append ( value , start , pos ) ; builder . append ( '\\' ) ; builder . append ( value . charAt ( pos ) ) ; start = pos + 1 ; pos = getNextLo...
public class SourceStreamManager { /** * This method should only be called when the PtoPOutputHandler was created * with an unknown targetCellule and WLM has now told us correct targetCellule . * This can only happen when the SourceStreamManager is owned by a * PtoPOutputHandler within a LinkHandler */ public syn...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "updateTargetCellule" , targetMEUuid ) ; if ( pointTopoint ) { this . targetMEUuid = targetMEUuid ; StreamSet streamSet = getStreamSet ( ) ; // We may not have had any messages yet in which case there // is no streamSet to u...
public class CUresult { /** * Returns the String identifying the given CUresult * @ param result The CUresult value * @ return The String identifying the given CUresult */ public static String stringFor ( int result ) { } }
switch ( result ) { case CUDA_SUCCESS : return "CUDA_SUCCESS" ; case CUDA_ERROR_INVALID_VALUE : return "CUDA_ERROR_INVALID_VALUE" ; case CUDA_ERROR_OUT_OF_MEMORY : return "CUDA_ERROR_OUT_OF_MEMORY" ; case CUDA_ERROR_NOT_INITIALIZED : return "CUDA_ERROR_NOT_INITIALIZED" ; case CUDA_ERROR_DEINITIALIZED : return "CUDA_ERR...
public class A_CmsAttributeAwareApp { /** * Replaces the app ' s main component with the given component . < p > * This also handles the attributes for the component , just as if the given component was returned by an app ' s * getComponentForState method . * @ param comp the component to set as the main componen...
comp . setSizeFull ( ) ; m_rootLayout . setMainContent ( comp ) ; Map < String , Object > attributes = getAttributesForComponent ( comp ) ; updateAppAttributes ( attributes ) ;
public class TrustedAdvisorResourceDetail { /** * Additional information about the identified resource . The exact metadata and its order can be obtained by * inspecting the < a > TrustedAdvisorCheckDescription < / a > object returned by the call to * < a > DescribeTrustedAdvisorChecks < / a > . < b > Metadata < / ...
if ( this . metadata == null ) { setMetadata ( new com . amazonaws . internal . SdkInternalList < String > ( metadata . length ) ) ; } for ( String ele : metadata ) { this . metadata . add ( ele ) ; } return this ;
public class JDBCTableSiteIdentifier { /** * documentation inherited */ public int getSiteId ( String siteString ) { } }
checkReloadSites ( ) ; Site site = _sitesByString . get ( siteString ) ; return ( site == null ) ? _defaultSiteId : site . siteId ;
public class MonthArrayTitleFormatter { /** * { @ inheritDoc } */ @ Override public CharSequence format ( CalendarDay day ) { } }
return new SpannableStringBuilder ( ) . append ( monthLabels [ day . getMonth ( ) - 1 ] ) . append ( " " ) . append ( String . valueOf ( day . getYear ( ) ) ) ;
public class KeyVaultClientBaseImpl { /** * Imports a certificate into a specified key vault . * Imports an existing valid certificate , containing a private key , into Azure Key Vault . The certificate to be imported can be in either PFX or PEM format . If the certificate is in PEM format the PEM file must contain t...
return importCertificateWithServiceResponseAsync ( vaultBaseUrl , certificateName , base64EncodedCertificate ) . map ( new Func1 < ServiceResponse < CertificateBundle > , CertificateBundle > ( ) { @ Override public CertificateBundle call ( ServiceResponse < CertificateBundle > response ) { return response . body ( ) ; ...
public class CmsMessageBundleEditorModel { /** * Saves messages to a propertyvfsbundle file . * @ throws CmsException thrown if writing to the file fails . */ private void saveToPropertyVfsBundle ( ) throws CmsException { } }
for ( Locale l : m_changedTranslations ) { SortedProperties props = m_localizations . get ( l ) ; LockedFile f = m_lockedBundleFiles . get ( l ) ; if ( ( null != props ) && ( null != f ) ) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream ( ) ; Writer writer = new OutputStreamWriter ( outputStream ...
public class CommandLineExecutor { /** * < p > executeAndWait . < / p > * @ throws java . lang . Exception if any . */ public void executeAndWait ( ) throws Exception { } }
Process p = launchProcess ( ) ; checkForErrors ( p ) ; if ( log . isDebugEnabled ( ) ) { // GP - 551 : Keep trace of outputs if ( isNotBlank ( getOutput ( ) ) ) { log . debug ( "System Output during execution : \n" + getOutput ( ) ) ; } if ( gobbler . hasErrors ( ) ) { log . debug ( "System Error Output during executio...
public class Validator { /** * 验证是否相等 , 不相等抛出异常 < br > * @ param t1 对象1 * @ param t2 对象2 * @ param errorMsg 错误信息 * @ return 相同值 * @ throws ValidateException 验证异常 */ public static Object validateEqual ( Object t1 , Object t2 , String errorMsg ) throws ValidateException { } }
if ( false == equal ( t1 , t2 ) ) { throw new ValidateException ( errorMsg ) ; } return t1 ;
public class NodeSupport { /** * Return true if the node is the local framework node . Compares the ( logical ) node names * of the nodes after eliding any embedded ' user @ ' parts . * @ param node the node * @ return true if the node ' s name is the same as the framework ' s node name */ @ Override public boole...
final String fwkNodeName = getFrameworkNodeName ( ) ; return fwkNodeName . equals ( node . getNodename ( ) ) ;
public class JobScheduleUpdateOptions { /** * Set a timestamp indicating the last modified time of the resource known to the client . The operation will be performed only if the resource on the service has not been modified since the specified time . * @ param ifUnmodifiedSince the ifUnmodifiedSince value to set * ...
if ( ifUnmodifiedSince == null ) { this . ifUnmodifiedSince = null ; } else { this . ifUnmodifiedSince = new DateTimeRfc1123 ( ifUnmodifiedSince ) ; } return this ;
public class ForestDBViewStore { /** * Opens the index , specifying ForestDB database flags * in CBLView . m * - ( MapReduceIndex * ) openIndexWithOptions : ( Database : : openFlags ) options */ private View openIndex ( int flags , boolean dryRun ) throws ForestException { } }
if ( _view == null ) { // Flags : if ( _dbStore . getAutoCompact ( ) ) flags |= Database . AutoCompact ; // Encryption : SymmetricKey encryptionKey = _dbStore . getEncryptionKey ( ) ; int enAlgorithm = Database . NoEncryption ; byte [ ] enKey = null ; if ( encryptionKey != null ) { enAlgorithm = Database . AES256Encryp...
public class WebhooksInner { /** * Triggers a ping event to be sent to the webhook . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param webhookName The name of the webhook . * @ param serviceC...
return ServiceFuture . fromResponse ( pingWithServiceResponseAsync ( resourceGroupName , registryName , webhookName ) , serviceCallback ) ;
public class CodedConstant { /** * Gets the filed type . * @ param type the type * @ param isList the is list * @ return the filed type */ public static String getFiledType ( FieldType type , boolean isList ) { } }
if ( ( type == FieldType . STRING || type == FieldType . BYTES ) && ! isList ) { return "com.google.protobuf.ByteString" ; } // add null check String defineType = type . getJavaType ( ) ; if ( isList ) { defineType = "List" ; } return defineType ;
public class CalculateThreads { /** * Calculate optimal threads . If they exceed the specified executorThreads , use optimal threads * instead . Emit appropriate logging * @ param executorThreads executor threads - what the caller wishes to use for size * @ param name client pool name . Used for logging . * @ r...
// For current standard 8 core machines this is 10 regardless . // On Java 10 , you might get less than 8 core reported , but it will still size as if it ' s 8 // Beyond 8 core you MIGHT undersize if running on Docker , but otherwise should be fine . final int optimalThreads = Math . max ( BASE_OPTIMAL_THREADS , ( Runt...
public class Application { /** * Short form for getting an Goolge Guice injected class by * calling getInstance ( . . . ) * @ param clazz The class to retrieve from the injector * @ param < T > JavaDoc requires this ( just ignore it ) * @ return An instance of the requested class */ public static < T > T getIns...
Objects . requireNonNull ( clazz , Required . CLASS . toString ( ) ) ; return injector . getInstance ( clazz ) ;
public class ModulesInner { /** * Retrieve a list of modules . * ServiceResponse < PageImpl < ModuleInner > > * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the PagedList & lt ; Modul...
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . listByAutomationAccountNext ( nextUrl , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . fla...
public class DescribeAvailablePatchesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeAvailablePatchesRequest describeAvailablePatchesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeAvailablePatchesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeAvailablePatchesRequest . getFilters ( ) , FILTERS_BINDING ) ; protocolMarshaller . marshall ( describeAvailablePatchesRequest . getMaxResults ( ...
public class BigDecimalUtil { /** * return a Number formatted or empty string if null . * @ param bd */ public static String percentFormat ( final BigDecimal bd ) { } }
return bd != null ? NUMBER_FORMAT . format ( bd . movePointRight ( 2 ) ) : "" ;
public class UdpClient { /** * Setup a callback called when { @ link io . netty . channel . Channel } is * disconnected . * @ param doOnDisconnected a consumer observing client stop event * @ return a new { @ link UdpClient } */ public final UdpClient doOnDisconnected ( Consumer < ? super Connection > doOnDisconn...
Objects . requireNonNull ( doOnDisconnected , "doOnDisconnected" ) ; return new UdpClientDoOn ( this , null , null , doOnDisconnected ) ;
public class BottouSchedule { /** * Gets the learning rate for the current iteration . * @ param iterCount The current iteration . * @ param i The index of the current model parameter . */ @ Override public double getLearningRate ( int iterCount , int i ) { } }
// We use the learning rate suggested in Leon Bottou ' s ( 2012 ) SGD Tricks paper . // \ gamma _ t = \ frac { \ gamma _ 0 } { ( 1 + \ gamma _ 0 \ lambda t ) ^ p } // For SGD p = 1.0 , for ASGD p = 0.75 if ( prm . power == 1.0 ) { return prm . initialLr / ( 1 + prm . initialLr * prm . lambda * iterCount ) ; } else { re...
public class Environment { /** * Reads the environment variables and stores them in a Properties object . * @ param cmdExec The command to execute to get hold of the environment variables . * @ param properties The Properties object to be populated with the environment variables . * @ return The exit value of the...
// fire up the shell and get echo ' d results on stdout BufferedReader reader = null ; Process process = null ; int exitValue = 99 ; try { String [ ] args = new String [ ] { cmdExec } ; process = startProcess ( args ) ; reader = createReader ( process ) ; processLinesOfEnvironmentVariables ( reader , properties ) ; pro...
public class KeyVaultClientBaseImpl { /** * Recovers the deleted certificate back to its current version under / certificates . * The RecoverDeletedCertificate operation performs the reversal of the Delete operation . The operation is applicable in vaults enabled for soft - delete , and must be issued during the rete...
return ServiceFuture . fromResponse ( recoverDeletedCertificateWithServiceResponseAsync ( vaultBaseUrl , certificateName ) , serviceCallback ) ;
public class ToStringStyle { /** * < p > Sets the content start text . < / p > * < p > < code > null < / code > is accepted , but will be converted to * an empty String . < / p > * @ param contentStart the new content start text */ protected void setContentStart ( String contentStart ) { } }
if ( contentStart == null ) { contentStart = StringUtils . EMPTY ; } this . contentStart = contentStart ;
public class ExecutionContext { /** * Creates an OrFuture that is already completed with a { @ link Bad } . * @ param bad the failure value * @ param < G > the success type * @ return an instance of OrFuture */ public < G , B > OrFuture < G , B > badFuture ( B bad ) { } }
return this . < G , B > promise ( ) . failure ( bad ) . future ( ) ;
public class JDKHttp { /** * 使用POST方式请求目标网站 * @ param bodyString 传输字符串数据 * @ param bodyByteArray 传输byte数据 * 若bodyString已设值 则该参数无效 * @ return * @ author acexy @ thankjava . com * @ date 2016年1月4日 下午5:59:17 * @ version 1.0 */ public static String post ( String url , String bodyString , byte [ ] bodyByteArray ...
BufferedReader in = null ; StringBuilder sb = new StringBuilder ( ) ; try { URL realUrl = new URL ( url ) ; URLConnection connection = realUrl . openConnection ( ) ; if ( head != null && head . length != 0 ) { Map < String , String > header = head [ 0 ] ; for ( Map . Entry < String , String > h : header . entrySet ( ) ...
public class SessionUtil { /** * Renew a session . * Use cases : * - Session and Master tokens are provided . No Id token : * - succeed in getting a new Session token . * - fail and raise SnowflakeReauthenticationRequest because Master * token expires . Since no id token exists , the exception is thrown * t...
try { return tokenRequest ( loginInput , TokenRequestType . RENEW ) ; } catch ( SnowflakeReauthenticationRequest ex ) { if ( Strings . isNullOrEmpty ( loginInput . getIdToken ( ) ) ) { throw ex ; } return tokenRequest ( loginInput , TokenRequestType . ISSUE ) ; }
public class Bytes { /** * Writes a big - endian 8 - byte long at an offset in the given array . * @ param b The array to write to . * @ param offset The offset in the array to start writing at . * @ throws IndexOutOfBoundsException if the byte array is too small . */ public static void setLong ( final byte [ ] b...
b [ offset + 0 ] = ( byte ) ( n >>> 56 ) ; b [ offset + 1 ] = ( byte ) ( n >>> 48 ) ; b [ offset + 2 ] = ( byte ) ( n >>> 40 ) ; b [ offset + 3 ] = ( byte ) ( n >>> 32 ) ; b [ offset + 4 ] = ( byte ) ( n >>> 24 ) ; b [ offset + 5 ] = ( byte ) ( n >>> 16 ) ; b [ offset + 6 ] = ( byte ) ( n >>> 8 ) ; b [ offset + 7 ] = (...
public class ResourceManager { /** * make sure you call this with a graph lock - either read or write */ private void getAllDescendants ( Resource < L > parent , List < Resource < L > > descendants ) { } }
for ( Resource < L > child : getChildren ( parent ) ) { if ( ! descendants . contains ( child ) ) { getAllDescendants ( child , descendants ) ; descendants . add ( child ) ; } } return ;
public class ParserUtils { /** * Gets the url of a page using the meta tags in head * @ param doc the jsoup document to extract the page url from * @ return the url of the document */ static String getSherdogPageUrl ( Document doc ) { } }
String url = Optional . ofNullable ( doc . head ( ) ) . map ( h -> h . select ( "meta" ) ) . map ( es -> es . stream ( ) . filter ( e -> e . attr ( "property" ) . equalsIgnoreCase ( "og:url" ) ) . findFirst ( ) . orElse ( null ) ) . map ( m -> m . attr ( "content" ) ) . orElse ( "" ) ; if ( url . startsWith ( "//" ) ) ...
public class EjbRelationTypeImpl { /** * If not already created , a new < code > ejb - relationship - role < / code > element will be created and returned . * Otherwise , the first existing < code > ejb - relationship - role < / code > element will be returned . * @ return the instance defined for the element < cod...
List < Node > nodeList = childNode . get ( "ejb-relationship-role" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new EjbRelationshipRoleTypeImpl < EjbRelationType < T > > ( this , "ejb-relationship-role" , childNode , nodeList . get ( 0 ) ) ; } return createEjbRelationshipRole ( ) ;