signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class TokenCompleteTextView { /** * Collapse the view by removing all the tokens not on the first line . Displays a " + x " token . * Restores the hidden tokens when the view gains focus . * @ param hasFocus boolean indicating whether we have the focus or not . */ public void performCollapse ( boolean hasFocus ) { } }
internalEditInProgress = true ; if ( ! hasFocus ) { // Display + x thingy / ellipse if appropriate final Editable text = getText ( ) ; if ( text != null && hiddenContent == null && lastLayout != null ) { // Ellipsize copies spans , so we need to stop listening to span changes here text . removeSpan ( spanWatcher ) ; CountSpan temp = preventFreeFormText ? countSpan : null ; Spanned ellipsized = SpanUtils . ellipsizeWithSpans ( prefix , temp , getObjects ( ) . size ( ) , lastLayout . getPaint ( ) , text , maxTextWidth ( ) ) ; if ( ellipsized != null ) { hiddenContent = new SpannableStringBuilder ( text ) ; setText ( ellipsized ) ; TextUtils . copySpansFrom ( ellipsized , 0 , ellipsized . length ( ) , TokenImageSpan . class , getText ( ) , 0 ) ; TextUtils . copySpansFrom ( text , 0 , hiddenContent . length ( ) , TokenImageSpan . class , hiddenContent , 0 ) ; hiddenContent . setSpan ( spanWatcher , 0 , hiddenContent . length ( ) , Spanned . SPAN_INCLUSIVE_INCLUSIVE ) ; } else { getText ( ) . setSpan ( spanWatcher , 0 , getText ( ) . length ( ) , Spanned . SPAN_INCLUSIVE_INCLUSIVE ) ; } } } else { if ( hiddenContent != null ) { setText ( hiddenContent ) ; TextUtils . copySpansFrom ( hiddenContent , 0 , hiddenContent . length ( ) , TokenImageSpan . class , getText ( ) , 0 ) ; hiddenContent = null ; if ( hintVisible ) { setSelection ( prefix . length ( ) ) ; } else { post ( new Runnable ( ) { @ Override public void run ( ) { setSelection ( getText ( ) . length ( ) ) ; } } ) ; } TokenSpanWatcher [ ] watchers = getText ( ) . getSpans ( 0 , getText ( ) . length ( ) , TokenSpanWatcher . class ) ; if ( watchers . length == 0 ) { // Span watchers can get removed in setText getText ( ) . setSpan ( spanWatcher , 0 , getText ( ) . length ( ) , Spanned . SPAN_INCLUSIVE_INCLUSIVE ) ; } } } internalEditInProgress = false ;
public class AdHocCommand { /** * Returns the specific condition of the < code > error < / code > or < tt > null < / tt > if the * error doesn ' t have any . * @ param error the error the get the specific condition from . * @ return the specific condition of this error , or null if it doesn ' t have * any . */ public static SpecificErrorCondition getSpecificErrorCondition ( StanzaError error ) { } }
// This method is implemented to provide an easy way of getting a packet // extension of the XMPPError . for ( SpecificErrorCondition condition : SpecificErrorCondition . values ( ) ) { if ( error . getExtension ( condition . toString ( ) , AdHocCommandData . SpecificError . namespace ) != null ) { return condition ; } } return null ;
public class RestController { /** * Creates a new entity from a html form post . */ @ Transactional @ PostMapping ( value = "/{entityTypeId}" , headers = "Content-Type=multipart/form-data" ) public void createFromFormPostMultiPart ( @ PathVariable ( "entityTypeId" ) String entityTypeId , MultipartHttpServletRequest request , HttpServletResponse response ) { } }
Map < String , Object > paramMap = new HashMap < > ( ) ; for ( String param : request . getParameterMap ( ) . keySet ( ) ) { String [ ] values = request . getParameterValues ( param ) ; String value = values != null ? StringUtils . join ( values , ',' ) : null ; if ( StringUtils . isNotBlank ( value ) ) { paramMap . put ( param , value ) ; } } // add files to param map for ( Entry < String , List < MultipartFile > > entry : request . getMultiFileMap ( ) . entrySet ( ) ) { String param = entry . getKey ( ) ; List < MultipartFile > files = entry . getValue ( ) ; if ( files != null && files . size ( ) > 1 ) { throw new IllegalArgumentException ( "Multiple file input not supported" ) ; } paramMap . put ( param , files != null && ! files . isEmpty ( ) ? files . get ( 0 ) : null ) ; } createInternal ( entityTypeId , paramMap , response ) ;
public class Material { /** * Sets the program to be used by this material to shade the models . * @ param program The program to use */ public void setProgram ( Program program ) { } }
if ( program == null ) { throw new IllegalStateException ( "Program cannot be null" ) ; } program . checkCreated ( ) ; this . program = program ;
public class OverrideAnalyzer { /** * Returns the methods overridden by given method declaration * @ param md the method declaration * @ return the methods overridden by given method declaration */ public static List < Method > findOverriddenMethods ( MethodDeclaration md ) { } }
final List < Method > methods = new ArrayList < Method > ( ) ; collectOverriddenMethods ( md , methods ) ; return methods . isEmpty ( ) ? Collections . < Method > emptyList ( ) : Collections . unmodifiableList ( methods ) ;
public class DynamoDBService { /** * - - - - - Package methods */ static String getDDBKey ( Map < String , AttributeValue > key ) { } }
return key . get ( ROW_KEY_ATTR_NAME ) . getS ( ) ;
public class TXTBasedAtomTypeConfigurator { /** * Reads a text based configuration file . * @ param builder IChemObjectBuilder used to construct the IAtomType ' s . * @ throws IOException when a problem occurred with reading from the InputStream * @ return A List with read IAtomType ' s . */ @ Override public List < IAtomType > readAtomTypes ( IChemObjectBuilder builder ) throws IOException { } }
List < IAtomType > atomTypes = new ArrayList < IAtomType > ( ) ; if ( ins == null ) { // trying the default // logger . debug ( " readAtomTypes getResourceAsStream : " // + configFile ) ; ins = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( configFile ) ; } if ( ins == null ) throw new IOException ( "There was a problem getting the default stream: " + configFile ) ; // read the contents from file BufferedReader reader = new BufferedReader ( new InputStreamReader ( ins ) , 1024 ) ; StringTokenizer tokenizer ; String string ; while ( true ) { string = reader . readLine ( ) ; if ( string == null ) { break ; } if ( ! string . startsWith ( "#" ) ) { String name ; String rootType ; int atomicNumber , colorR , colorG , colorB ; double mass , covalent ; tokenizer = new StringTokenizer ( string , "\t ,;" ) ; int tokenCount = tokenizer . countTokens ( ) ; if ( tokenCount == 9 ) { name = tokenizer . nextToken ( ) ; rootType = tokenizer . nextToken ( ) ; String san = tokenizer . nextToken ( ) ; String sam = tokenizer . nextToken ( ) ; tokenizer . nextToken ( ) ; // skip the vdw radius value String scovalent = tokenizer . nextToken ( ) ; String sColorR = tokenizer . nextToken ( ) ; String sColorG = tokenizer . nextToken ( ) ; String sColorB = tokenizer . nextToken ( ) ; try { mass = new Double ( sam ) ; covalent = new Double ( scovalent ) ; atomicNumber = Integer . parseInt ( san ) ; colorR = Integer . parseInt ( sColorR ) ; colorG = Integer . parseInt ( sColorG ) ; colorB = Integer . parseInt ( sColorB ) ; } catch ( NumberFormatException nfe ) { throw new IOException ( "AtomTypeTable.ReadAtypes: " + "Malformed Number" ) ; } IAtomType atomType = builder . newInstance ( IAtomType . class , name , rootType ) ; atomType . setAtomicNumber ( atomicNumber ) ; atomType . setExactMass ( mass ) ; atomType . setCovalentRadius ( covalent ) ; // pack the RGB color space components into a single int . Note we // avoid java . awt . Color ( not available on some JREs ) atomType . setProperty ( "org.openscience.cdk.renderer.color" , ( ( colorR << 16 ) & 0xff0000 ) | ( ( colorG << 8 ) & 0x00ff00 ) | ( colorB & 0x0000ff ) ) ; atomTypes . add ( atomType ) ; } else { throw new IOException ( "AtomTypeTable.ReadAtypes: " + "Wrong Number of fields" ) ; } } } // end while ins . close ( ) ; return atomTypes ;
public class Element { /** * Build a text node or a MessageML element based on the provided DOM node . */ private void buildNode ( MessageMLParser context , org . w3c . dom . Node node ) throws InvalidInputException , ProcessingException { } }
switch ( node . getNodeType ( ) ) { case org . w3c . dom . Node . TEXT_NODE : buildText ( ( Text ) node ) ; break ; case org . w3c . dom . Node . ELEMENT_NODE : buildElement ( context , ( org . w3c . dom . Element ) node ) ; break ; default : throw new InvalidInputException ( "Invalid element \"" + node . getNodeName ( ) + "\"" ) ; }
public class SubWriterHolderWriter { /** * Add the index comment . * @ param member the member being documented * @ param contentTree the content tree to which the comment will be added */ protected void addIndexComment ( Doc member , Content contentTree ) { } }
addIndexComment ( member , member . firstSentenceTags ( ) , contentTree ) ;
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcTransformerTypeEnum createIfcTransformerTypeEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcTransformerTypeEnum result = IfcTransformerTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class InternalPureXbaseParser { /** * InternalPureXbase . g : 3531:1 : ruleXIfExpression returns [ EObject current = null ] : ( ( ) otherlv _ 1 = ' if ' otherlv _ 2 = ' ( ' ( ( lv _ if _ 3_0 = ruleXExpression ) ) otherlv _ 4 = ' ) ' ( ( lv _ then _ 5_0 = ruleXExpression ) ) ( ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) ( ( lv _ else _ 7_0 = ruleXExpression ) ) ) ? ) ; */ public final EObject ruleXIfExpression ( ) throws RecognitionException { } }
EObject current = null ; Token otherlv_1 = null ; Token otherlv_2 = null ; Token otherlv_4 = null ; Token otherlv_6 = null ; EObject lv_if_3_0 = null ; EObject lv_then_5_0 = null ; EObject lv_else_7_0 = null ; enterRule ( ) ; try { // InternalPureXbase . g : 3537:2 : ( ( ( ) otherlv _ 1 = ' if ' otherlv _ 2 = ' ( ' ( ( lv _ if _ 3_0 = ruleXExpression ) ) otherlv _ 4 = ' ) ' ( ( lv _ then _ 5_0 = ruleXExpression ) ) ( ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) ( ( lv _ else _ 7_0 = ruleXExpression ) ) ) ? ) ) // InternalPureXbase . g : 3538:2 : ( ( ) otherlv _ 1 = ' if ' otherlv _ 2 = ' ( ' ( ( lv _ if _ 3_0 = ruleXExpression ) ) otherlv _ 4 = ' ) ' ( ( lv _ then _ 5_0 = ruleXExpression ) ) ( ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) ( ( lv _ else _ 7_0 = ruleXExpression ) ) ) ? ) { // InternalPureXbase . g : 3538:2 : ( ( ) otherlv _ 1 = ' if ' otherlv _ 2 = ' ( ' ( ( lv _ if _ 3_0 = ruleXExpression ) ) otherlv _ 4 = ' ) ' ( ( lv _ then _ 5_0 = ruleXExpression ) ) ( ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) ( ( lv _ else _ 7_0 = ruleXExpression ) ) ) ? ) // InternalPureXbase . g : 3539:3 : ( ) otherlv _ 1 = ' if ' otherlv _ 2 = ' ( ' ( ( lv _ if _ 3_0 = ruleXExpression ) ) otherlv _ 4 = ' ) ' ( ( lv _ then _ 5_0 = ruleXExpression ) ) ( ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) ( ( lv _ else _ 7_0 = ruleXExpression ) ) ) ? { // InternalPureXbase . g : 3539:3 : ( ) // InternalPureXbase . g : 3540:4: { if ( state . backtracking == 0 ) { current = forceCreateModelElement ( grammarAccess . getXIfExpressionAccess ( ) . getXIfExpressionAction_0 ( ) , current ) ; } } otherlv_1 = ( Token ) match ( input , 64 , FOLLOW_49 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_1 , grammarAccess . getXIfExpressionAccess ( ) . getIfKeyword_1 ( ) ) ; } otherlv_2 = ( Token ) match ( input , 15 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_2 , grammarAccess . getXIfExpressionAccess ( ) . getLeftParenthesisKeyword_2 ( ) ) ; } // InternalPureXbase . g : 3554:3 : ( ( lv _ if _ 3_0 = ruleXExpression ) ) // InternalPureXbase . g : 3555:4 : ( lv _ if _ 3_0 = ruleXExpression ) { // InternalPureXbase . g : 3555:4 : ( lv _ if _ 3_0 = ruleXExpression ) // InternalPureXbase . g : 3556:5 : lv _ if _ 3_0 = ruleXExpression { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXIfExpressionAccess ( ) . getIfXExpressionParserRuleCall_3_0 ( ) ) ; } pushFollow ( FOLLOW_8 ) ; lv_if_3_0 = ruleXExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXIfExpressionRule ( ) ) ; } set ( current , "if" , lv_if_3_0 , "org.eclipse.xtext.xbase.Xbase.XExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } otherlv_4 = ( Token ) match ( input , 16 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_4 , grammarAccess . getXIfExpressionAccess ( ) . getRightParenthesisKeyword_4 ( ) ) ; } // InternalPureXbase . g : 3577:3 : ( ( lv _ then _ 5_0 = ruleXExpression ) ) // InternalPureXbase . g : 3578:4 : ( lv _ then _ 5_0 = ruleXExpression ) { // InternalPureXbase . g : 3578:4 : ( lv _ then _ 5_0 = ruleXExpression ) // InternalPureXbase . g : 3579:5 : lv _ then _ 5_0 = ruleXExpression { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXIfExpressionAccess ( ) . getThenXExpressionParserRuleCall_5_0 ( ) ) ; } pushFollow ( FOLLOW_50 ) ; lv_then_5_0 = ruleXExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXIfExpressionRule ( ) ) ; } set ( current , "then" , lv_then_5_0 , "org.eclipse.xtext.xbase.Xbase.XExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } // InternalPureXbase . g : 3596:3 : ( ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) ( ( lv _ else _ 7_0 = ruleXExpression ) ) ) ? int alt64 = 2 ; int LA64_0 = input . LA ( 1 ) ; if ( ( LA64_0 == 65 ) ) { int LA64_1 = input . LA ( 2 ) ; if ( ( synpred33_InternalPureXbase ( ) ) ) { alt64 = 1 ; } } switch ( alt64 ) { case 1 : // InternalPureXbase . g : 3597:4 : ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) ( ( lv _ else _ 7_0 = ruleXExpression ) ) { // InternalPureXbase . g : 3597:4 : ( ( ' else ' ) = > otherlv _ 6 = ' else ' ) // InternalPureXbase . g : 3598:5 : ( ' else ' ) = > otherlv _ 6 = ' else ' { otherlv_6 = ( Token ) match ( input , 65 , FOLLOW_3 ) ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { newLeafNode ( otherlv_6 , grammarAccess . getXIfExpressionAccess ( ) . getElseKeyword_6_0 ( ) ) ; } } // InternalPureXbase . g : 3604:4 : ( ( lv _ else _ 7_0 = ruleXExpression ) ) // InternalPureXbase . g : 3605:5 : ( lv _ else _ 7_0 = ruleXExpression ) { // InternalPureXbase . g : 3605:5 : ( lv _ else _ 7_0 = ruleXExpression ) // InternalPureXbase . g : 3606:6 : lv _ else _ 7_0 = ruleXExpression { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getXIfExpressionAccess ( ) . getElseXExpressionParserRuleCall_6_1_0 ( ) ) ; } pushFollow ( FOLLOW_2 ) ; lv_else_7_0 = ruleXExpression ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { if ( current == null ) { current = createModelElementForParent ( grammarAccess . getXIfExpressionRule ( ) ) ; } set ( current , "else" , lv_else_7_0 , "org.eclipse.xtext.xbase.Xbase.XExpression" ) ; afterParserOrEnumRuleCall ( ) ; } } } } break ; } } } if ( state . backtracking == 0 ) { leaveRule ( ) ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ;
public class Matrix4 { /** * Sets this to a rotation matrix that rotates one vector onto another . * @ return a reference to this matrix , for chaining . */ public Matrix4 setToRotation ( IVector3 from , IVector3 to ) { } }
float angle = from . angle ( to ) ; if ( angle < MathUtil . EPSILON ) { return setToIdentity ( ) ; } if ( angle <= FloatMath . PI - MathUtil . EPSILON ) { return setToRotation ( angle , from . cross ( to ) . normalizeLocal ( ) ) ; } // it ' s a 180 degree rotation ; any axis orthogonal to the from vector will do Vector3 axis = new Vector3 ( 0f , from . z ( ) , - from . y ( ) ) ; float length = axis . length ( ) ; return setToRotation ( FloatMath . PI , length < MathUtil . EPSILON ? axis . set ( - from . z ( ) , 0f , from . x ( ) ) . normalizeLocal ( ) : axis . multLocal ( 1f / length ) ) ;
public class TrainingsImpl { /** * Delete a set of predicted images and their associated prediction results . * @ param projectId The project id * @ param ids The prediction ids . Limited to 64 * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void deletePrediction ( UUID projectId , List < String > ids ) { } }
deletePredictionWithServiceResponseAsync ( projectId , ids ) . toBlocking ( ) . single ( ) . body ( ) ;
public class InterleavedReader { /** * Returns the next value in the stream : either a String , a JsonElement , or * null to indicate the end of the stream . Callers should use instanceof to * inspect the return type . */ public Object read ( ) throws IOException { } }
char [ ] buffer = new char [ BUFFER_LENGTH ] ; reader . mark ( BUFFER_LENGTH ) ; int count = 0 ; int textEnd ; while ( true ) { int r = reader . read ( buffer , count , buffer . length - count ) ; if ( r == - 1 ) { // the input is exhausted ; return the remaining characters textEnd = count ; break ; } count += r ; int possibleMarker = findPossibleMarker ( buffer , count ) ; if ( possibleMarker != 0 ) { // return the characters that precede the marker textEnd = possibleMarker ; break ; } if ( count < marker . length ( ) ) { // the buffer contains only the prefix of a marker so we must read more continue ; } // we ' ve read a marker so return the value that follows reader . reset ( ) ; String json = reader . readLine ( ) . substring ( marker . length ( ) ) ; return jsonParser . parse ( json ) ; } if ( count == 0 ) { return null ; } // return characters reader . reset ( ) ; count = reader . read ( buffer , 0 , textEnd ) ; return new String ( buffer , 0 , count ) ;
public class HyperspaceAnalogueToLanguage { /** * { @ inheritDoc } */ public Vector getVector ( String word ) { } }
Integer index = termToIndex . getDimension ( word ) ; if ( index == null ) return null ; // If the matrix hasn ' t had columns dropped then the returned vector // will be the combination of the word ' s row and column else if ( reduced == null ) { // NOTE : the matrix could be asymmetric if the a word has only // appeared on one side of a context ( its row or column vector would // never have been set ) . Therefore , check the index with the matrix // size first . SparseDoubleVector rowVec = ( index < cooccurrenceMatrix . rows ( ) ) ? cooccurrenceMatrix . getRowVectorUnsafe ( index ) : new CompactSparseVector ( termToIndex . numDimensions ( ) ) ; SparseDoubleVector colVec = ( index < cooccurrenceMatrix . columns ( ) ) ? cooccurrenceMatrix . getColumnVectorUnsafe ( index ) : new CompactSparseVector ( termToIndex . numDimensions ( ) ) ; return new ConcatenatedSparseDoubleVector ( rowVec , colVec ) ; } // The co - occurrence matrix has had columns dropped so the vector is // just the word ' s row return reduced . getRowVector ( index ) ;
public class JsonBuilder { /** * Alternative to using the object ( ) builder that allows you to add { @ link Entry } instances . * @ param fields one or more Entry instances ( use the field method to create them ) . * @ return the JsonObject with the entries added . */ @ SafeVarargs public static @ Nonnull JsonObject object ( Entry < String , JsonElement > ... fields ) { } }
JsonObject object = new JsonObject ( ) ; object . add ( fields ) ; return object ;
public class ManagedSession { /** * Reset the session and the message consumers in cascade . */ void reset ( ) { } }
sessionLock . writeLock ( ) . lock ( ) ; try { LOGGER . debug ( "Resetting managed JMS session {}" , this ) ; session = null ; for ( ManagedMessageConsumer managedMessageConsumer : messageConsumers ) { managedMessageConsumer . reset ( ) ; } } finally { sessionLock . writeLock ( ) . unlock ( ) ; }
public class InternalSARLParser { /** * InternalSARL . g : 8251:1 : entryRuleFullJvmFormalParameter returns [ EObject current = null ] : iv _ ruleFullJvmFormalParameter = ruleFullJvmFormalParameter EOF ; */ public final EObject entryRuleFullJvmFormalParameter ( ) throws RecognitionException { } }
EObject current = null ; EObject iv_ruleFullJvmFormalParameter = null ; try { // InternalSARL . g : 8251:63 : ( iv _ ruleFullJvmFormalParameter = ruleFullJvmFormalParameter EOF ) // InternalSARL . g : 8252:2 : iv _ ruleFullJvmFormalParameter = ruleFullJvmFormalParameter EOF { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getFullJvmFormalParameterRule ( ) ) ; } pushFollow ( FOLLOW_1 ) ; iv_ruleFullJvmFormalParameter = ruleFullJvmFormalParameter ( ) ; state . _fsp -- ; if ( state . failed ) return current ; if ( state . backtracking == 0 ) { current = iv_ruleFullJvmFormalParameter ; } match ( input , EOF , FOLLOW_2 ) ; if ( state . failed ) return current ; } } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ;
public class ExistPolicyIndex { /** * Create a collection given a full path to the collection . The collection path must include * the root collection . Intermediate collections in the path are created if they do not * already exist . * @ param collectionPath * @ param rootCollection * @ return * @ throws PolicyIndexException */ protected Collection createCollectionPath ( String collectionPath , Collection rootCollection ) throws PolicyIndexException { } }
try { if ( rootCollection . getParentCollection ( ) != null ) { throw new PolicyIndexException ( "Collection supplied is not a root collection" ) ; } String rootCollectionName = rootCollection . getName ( ) ; if ( ! collectionPath . startsWith ( rootCollectionName ) ) { throw new PolicyIndexException ( "Collection path " + collectionPath + " does not start from root collection - " + rootCollectionName ) ; } // strip root collection from path , obtain each individual collection name in the path String pathToCreate = collectionPath . substring ( rootCollectionName . length ( ) ) ; String [ ] collections = pathToCreate . split ( "/" ) ; // iterate each and create as necessary Collection nextCollection = rootCollection ; for ( String collectionName : collections ) { Collection childCollection = nextCollection . getChildCollection ( collectionName ) ; if ( childCollection != null ) { // child exists childCollection = nextCollection . getChildCollection ( collectionName ) ; } else { // does not exist , create it CollectionManagementService mgtService = ( CollectionManagementService ) nextCollection . getService ( "CollectionManagementService" , "1.0" ) ; childCollection = mgtService . createCollection ( collectionName ) ; log . debug ( "Created collection " + collectionName ) ; } if ( nextCollection . isOpen ( ) ) { nextCollection . close ( ) ; } nextCollection = childCollection ; } return nextCollection ; } catch ( XMLDBException e ) { log . error ( "Error creating collections from path " + e . getMessage ( ) , e ) ; throw new PolicyIndexException ( "Error creating collections from path " + e . getMessage ( ) , e ) ; }
public class DestinationManager { /** * Lookup a destination by its uuid . * @ param mqLinkUuid * @ param includeInvisible * @ return MQLinkHandler * @ throws SIDestinationNotFoundException The link was not found * @ throws SIMPMQLinkCorruptException */ public MQLinkHandler getMQLinkLocalization ( SIBUuid8 mqLinkUuid , boolean includeInvisible ) throws SIMPMQLinkCorruptException , SINotPossibleInCurrentConfigurationException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMQLinkLocalization" , mqLinkUuid ) ; // Get the destination LinkTypeFilter filter = new LinkTypeFilter ( ) ; filter . MQLINK = Boolean . TRUE ; if ( ! includeInvisible ) filter . VISIBLE = Boolean . TRUE ; MQLinkHandler mqLinkHandler = ( MQLinkHandler ) linkIndex . findByMQLinkUuid ( mqLinkUuid , filter ) ; checkMQLinkExists ( mqLinkHandler != null , mqLinkUuid . toString ( ) ) ; if ( mqLinkHandler . isCorruptOrIndoubt ( ) ) { String message = nls . getFormattedMessage ( "LINK_HANDLER_CORRUPT_ERROR_CWSIP0054" , new Object [ ] { mqLinkHandler . getName ( ) , mqLinkUuid . toString ( ) } , null ) ; SIMPMQLinkCorruptException e = new SIMPMQLinkCorruptException ( message ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . exception ( tc , e ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getMQLinkLocalization" , e ) ; throw e ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getMQLinkLocalization" , mqLinkHandler ) ; return mqLinkHandler ;
public class HttpInputStream { /** * F003449 Start */ public void restart ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { // 306998.15 logger . logp ( Level . FINE , CLASS_NAME , "restart" , "Start re-read of data" ) ; } // Don ' t update length or limit because they were set by setContentLength ( ) and // will not be reset when the data is re - read . total = 0 ; count = 0 ; pos = 0 ; // With F003449 obs should never be null if restart ( ) is called . // However check for null to make code future proof . if ( obs != null ) { obs . alertOpen ( ) ; }
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } * { @ link CmisExtensionType } { @ code > } */ @ XmlElementDecl ( namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/" , name = "extension" , scope = DeleteType . class ) public JAXBElement < CmisExtensionType > createDeleteTypeExtension ( CmisExtensionType value ) { } }
return new JAXBElement < CmisExtensionType > ( _GetPropertiesExtension_QNAME , CmisExtensionType . class , DeleteType . class , value ) ;
public class JsApiMessageImpl { /** * Helper method used by the JMO to rewrite Property data into the * underlying JMF message . * Package level visibility as used by the JMO . * @ param why The reason for the update * @ see com . ibm . ws . sib . mfp . MfpConstants */ @ Override void updateDataFields ( int why ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "updateDataFields" ) ; super . updateDataFields ( why ) ; if ( jmsSystemPropertyMap != null && jmsSystemPropertyMap . isChanged ( ) ) { getApi ( ) . setField ( JsApiAccess . SYSTEMPROPERTY_NAME , jmsSystemPropertyMap . getKeyList ( ) ) ; getApi ( ) . setField ( JsApiAccess . SYSTEMPROPERTY_VALUE , jmsSystemPropertyMap . getValueList ( ) ) ; jmsSystemPropertyMap . setUnChanged ( ) ; // d317373.1 } if ( jmsUserPropertyMap != null && jmsUserPropertyMap . isChanged ( ) ) { getApi ( ) . setField ( JsApiAccess . JMSPROPERTY_NAME , jmsUserPropertyMap . getKeyList ( ) ) ; getApi ( ) . setField ( JsApiAccess . JMSPROPERTY_VALUE , jmsUserPropertyMap . getValueList ( ) ) ; jmsUserPropertyMap . setUnChanged ( ) ; // d317373.1 } if ( otherUserPropertyMap != null && otherUserPropertyMap . isChanged ( ) ) { getApi ( ) . setField ( JsApiAccess . OTHERPROPERTY_NAME , otherUserPropertyMap . getKeyList ( ) ) ; getApi ( ) . setField ( JsApiAccess . OTHERPROPERTY_VALUE , otherUserPropertyMap . getValueList ( ) ) ; otherUserPropertyMap . setUnChanged ( ) ; // d317373.1 } if ( systemContextMap != null && systemContextMap . isChanged ( ) ) { getApi ( ) . setField ( JsApiAccess . SYSTEMCONTEXT_NAME , systemContextMap . getKeyList ( ) ) ; getApi ( ) . setField ( JsApiAccess . SYSTEMCONTEXT_VALUE , systemContextMap . getValueList ( ) ) ; systemContextMap . setUnChanged ( ) ; // d317373.1 } // Slightly different , as we need to set the variant back to empty if these properties have been cleared if ( mqMdSetPropertiesMap != null && mqMdSetPropertiesMap . isChanged ( ) ) { if ( mqMdSetPropertiesMap . size ( ) > 0 ) { getHdr2 ( ) . setField ( JsHdr2Access . MQMDPROPERTIES_MAP_NAME , mqMdSetPropertiesMap . getKeyList ( ) ) ; getHdr2 ( ) . setField ( JsHdr2Access . MQMDPROPERTIES_MAP_VALUE , mqMdSetPropertiesMap . getValueList ( ) ) ; } else { getHdr2 ( ) . setChoiceField ( JsHdr2Access . MQMDPROPERTIES , JsHdr2Access . IS_MQMDPROPERTIES_EMPTY ) ; } mqMdSetPropertiesMap . setUnChanged ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "updateDataFields" ) ;
public class ListApplicationDependenciesResult { /** * An array of application summaries nested in the application . * @ param dependencies * An array of application summaries nested in the application . */ public void setDependencies ( java . util . Collection < ApplicationDependencySummary > dependencies ) { } }
if ( dependencies == null ) { this . dependencies = null ; return ; } this . dependencies = new java . util . ArrayList < ApplicationDependencySummary > ( dependencies ) ;
public class XSLTSchema { /** * This method builds an XSLT " schema " according to http : / / www . w3 . org / TR / xslt # dtd . This * schema provides instructions for building the Xalan Stylesheet ( Templates ) structure . */ void build ( ) { } }
// xsl : import , xsl : include XSLTAttributeDef hrefAttr = new XSLTAttributeDef ( null , "href" , XSLTAttributeDef . T_URL , true , false , XSLTAttributeDef . ERROR ) ; // xsl : preserve - space , xsl : strip - space XSLTAttributeDef elementsAttr = new XSLTAttributeDef ( null , "elements" , XSLTAttributeDef . T_SIMPLEPATTERNLIST , true , false , XSLTAttributeDef . ERROR ) ; // XSLTAttributeDef anyNamespacedAttr = new XSLTAttributeDef ( " * " , " * " , // XSLTAttributeDef . T _ CDATA , false ) ; // xsl : output XSLTAttributeDef methodAttr = new XSLTAttributeDef ( null , "method" , XSLTAttributeDef . T_QNAME , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef versionAttr = new XSLTAttributeDef ( null , "version" , XSLTAttributeDef . T_NMTOKEN , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef encodingAttr = new XSLTAttributeDef ( null , "encoding" , XSLTAttributeDef . T_CDATA , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef omitXmlDeclarationAttr = new XSLTAttributeDef ( null , "omit-xml-declaration" , XSLTAttributeDef . T_YESNO , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef standaloneAttr = new XSLTAttributeDef ( null , "standalone" , XSLTAttributeDef . T_YESNO , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef doctypePublicAttr = new XSLTAttributeDef ( null , "doctype-public" , XSLTAttributeDef . T_CDATA , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef doctypeSystemAttr = new XSLTAttributeDef ( null , "doctype-system" , XSLTAttributeDef . T_CDATA , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef cdataSectionElementsAttr = new XSLTAttributeDef ( null , "cdata-section-elements" , XSLTAttributeDef . T_QNAMES_RESOLVE_NULL , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef indentAttr = new XSLTAttributeDef ( null , "indent" , XSLTAttributeDef . T_YESNO , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef mediaTypeAttr = new XSLTAttributeDef ( null , "media-type" , XSLTAttributeDef . T_CDATA , false , false , XSLTAttributeDef . ERROR ) ; // Required . // It is an error if the name attribute is invalid on any of these elements // xsl : key , xsl : attribute - set , xsl : call - template , xsl : with - param , xsl : variable , xsl : param XSLTAttributeDef nameAttrRequired = new XSLTAttributeDef ( null , "name" , XSLTAttributeDef . T_QNAME , true , false , XSLTAttributeDef . ERROR ) ; // Required . // Support AVT // xsl : element , xsl : attribute XSLTAttributeDef nameAVTRequired = new XSLTAttributeDef ( null , "name" , XSLTAttributeDef . T_AVT_QNAME , true , true , XSLTAttributeDef . WARNING ) ; // Required . // Support AVT // xsl : processing - instruction XSLTAttributeDef nameAVT_NCNAMERequired = new XSLTAttributeDef ( null , "name" , XSLTAttributeDef . T_NCNAME , true , true , XSLTAttributeDef . WARNING ) ; // Optional . // Static error if invalid // xsl : template , xsl : decimal - format XSLTAttributeDef nameAttrOpt_ERROR = new XSLTAttributeDef ( null , "name" , XSLTAttributeDef . T_QNAME , false , false , XSLTAttributeDef . ERROR ) ; // xsl : key XSLTAttributeDef useAttr = new XSLTAttributeDef ( null , "use" , XSLTAttributeDef . T_EXPR , true , false , XSLTAttributeDef . ERROR ) ; // xsl : element , xsl : attribute XSLTAttributeDef namespaceAVTOpt = new XSLTAttributeDef ( null , "namespace" , XSLTAttributeDef . T_URL , false , true , XSLTAttributeDef . WARNING ) ; // xsl : decimal - format XSLTAttributeDef decimalSeparatorAttr = new XSLTAttributeDef ( null , "decimal-separator" , XSLTAttributeDef . T_CHAR , false , XSLTAttributeDef . ERROR , "." ) ; XSLTAttributeDef infinityAttr = new XSLTAttributeDef ( null , "infinity" , XSLTAttributeDef . T_CDATA , false , XSLTAttributeDef . ERROR , "Infinity" ) ; XSLTAttributeDef minusSignAttr = new XSLTAttributeDef ( null , "minus-sign" , XSLTAttributeDef . T_CHAR , false , XSLTAttributeDef . ERROR , "-" ) ; XSLTAttributeDef NaNAttr = new XSLTAttributeDef ( null , "NaN" , XSLTAttributeDef . T_CDATA , false , XSLTAttributeDef . ERROR , "NaN" ) ; XSLTAttributeDef percentAttr = new XSLTAttributeDef ( null , "percent" , XSLTAttributeDef . T_CHAR , false , XSLTAttributeDef . ERROR , "%" ) ; XSLTAttributeDef perMilleAttr = new XSLTAttributeDef ( null , "per-mille" , XSLTAttributeDef . T_CHAR , false , false , XSLTAttributeDef . ERROR /* , " & # x2030 ; " */ ) ; XSLTAttributeDef zeroDigitAttr = new XSLTAttributeDef ( null , "zero-digit" , XSLTAttributeDef . T_CHAR , false , XSLTAttributeDef . ERROR , "0" ) ; XSLTAttributeDef digitAttr = new XSLTAttributeDef ( null , "digit" , XSLTAttributeDef . T_CHAR , false , XSLTAttributeDef . ERROR , "#" ) ; XSLTAttributeDef patternSeparatorAttr = new XSLTAttributeDef ( null , "pattern-separator" , XSLTAttributeDef . T_CHAR , false , XSLTAttributeDef . ERROR , ";" ) ; // xsl : decimal - format XSLTAttributeDef groupingSeparatorAttr = new XSLTAttributeDef ( null , "grouping-separator" , XSLTAttributeDef . T_CHAR , false , XSLTAttributeDef . ERROR , "," ) ; // xsl : element , xsl : attribute - set , xsl : copy XSLTAttributeDef useAttributeSetsAttr = new XSLTAttributeDef ( null , "use-attribute-sets" , XSLTAttributeDef . T_QNAMES , false , false , XSLTAttributeDef . ERROR ) ; // xsl : if , xsl : when XSLTAttributeDef testAttrRequired = new XSLTAttributeDef ( null , "test" , XSLTAttributeDef . T_EXPR , true , false , XSLTAttributeDef . ERROR ) ; // Required . // xsl : value - of , xsl : for - each , xsl : copy - of XSLTAttributeDef selectAttrRequired = new XSLTAttributeDef ( null , "select" , XSLTAttributeDef . T_EXPR , true , false , XSLTAttributeDef . ERROR ) ; // Optional . // xsl : variable , xsl : param , xsl : with - param XSLTAttributeDef selectAttrOpt = new XSLTAttributeDef ( null , "select" , XSLTAttributeDef . T_EXPR , false , false , XSLTAttributeDef . ERROR ) ; // Optional . // Default : " node ( ) " // xsl : apply - templates XSLTAttributeDef selectAttrDefNode = new XSLTAttributeDef ( null , "select" , XSLTAttributeDef . T_EXPR , false , XSLTAttributeDef . ERROR , "node()" ) ; // Optional . // Default : " . " // xsl : sort XSLTAttributeDef selectAttrDefDot = new XSLTAttributeDef ( null , "select" , XSLTAttributeDef . T_EXPR , false , XSLTAttributeDef . ERROR , "." ) ; // xsl : key XSLTAttributeDef matchAttrRequired = new XSLTAttributeDef ( null , "match" , XSLTAttributeDef . T_PATTERN , true , false , XSLTAttributeDef . ERROR ) ; // xsl : template XSLTAttributeDef matchAttrOpt = new XSLTAttributeDef ( null , "match" , XSLTAttributeDef . T_PATTERN , false , false , XSLTAttributeDef . ERROR ) ; // xsl : template XSLTAttributeDef priorityAttr = new XSLTAttributeDef ( null , "priority" , XSLTAttributeDef . T_NUMBER , false , false , XSLTAttributeDef . ERROR ) ; // xsl : template , xsl : apply - templates XSLTAttributeDef modeAttr = new XSLTAttributeDef ( null , "mode" , XSLTAttributeDef . T_QNAME , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef spaceAttr = new XSLTAttributeDef ( Constants . S_XMLNAMESPACEURI , "space" , false , false , false , XSLTAttributeDef . WARNING , "default" , Constants . ATTRVAL_STRIP , "preserve" , Constants . ATTRVAL_PRESERVE ) ; XSLTAttributeDef spaceAttrLiteral = new XSLTAttributeDef ( Constants . S_XMLNAMESPACEURI , "space" , XSLTAttributeDef . T_URL , false , true , XSLTAttributeDef . ERROR ) ; // xsl : namespace - alias XSLTAttributeDef stylesheetPrefixAttr = new XSLTAttributeDef ( null , "stylesheet-prefix" , XSLTAttributeDef . T_CDATA , true , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef resultPrefixAttr = new XSLTAttributeDef ( null , "result-prefix" , XSLTAttributeDef . T_CDATA , true , false , XSLTAttributeDef . ERROR ) ; // xsl : text , xsl : value - of XSLTAttributeDef disableOutputEscapingAttr = new XSLTAttributeDef ( null , "disable-output-escaping" , XSLTAttributeDef . T_YESNO , false , false , XSLTAttributeDef . ERROR ) ; // xsl : number XSLTAttributeDef levelAttr = new XSLTAttributeDef ( null , "level" , false , false , false , XSLTAttributeDef . ERROR , "single" , Constants . NUMBERLEVEL_SINGLE , "multiple" , Constants . NUMBERLEVEL_MULTI , "any" , Constants . NUMBERLEVEL_ANY ) ; levelAttr . setDefault ( "single" ) ; XSLTAttributeDef countAttr = new XSLTAttributeDef ( null , "count" , XSLTAttributeDef . T_PATTERN , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef fromAttr = new XSLTAttributeDef ( null , "from" , XSLTAttributeDef . T_PATTERN , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef valueAttr = new XSLTAttributeDef ( null , "value" , XSLTAttributeDef . T_EXPR , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef formatAttr = new XSLTAttributeDef ( null , "format" , XSLTAttributeDef . T_CDATA , false , true , XSLTAttributeDef . ERROR ) ; formatAttr . setDefault ( "1" ) ; // xsl : number , xsl : sort XSLTAttributeDef langAttr = new XSLTAttributeDef ( null , "lang" , XSLTAttributeDef . T_NMTOKEN , false , true , XSLTAttributeDef . ERROR ) ; // xsl : number XSLTAttributeDef letterValueAttr = new XSLTAttributeDef ( null , "letter-value" , false , true , false , XSLTAttributeDef . ERROR , "alphabetic" , Constants . NUMBERLETTER_ALPHABETIC , "traditional" , Constants . NUMBERLETTER_TRADITIONAL ) ; // xsl : number XSLTAttributeDef groupingSeparatorAVT = new XSLTAttributeDef ( null , "grouping-separator" , XSLTAttributeDef . T_CHAR , false , true , XSLTAttributeDef . ERROR ) ; // xsl : number XSLTAttributeDef groupingSizeAttr = new XSLTAttributeDef ( null , "grouping-size" , XSLTAttributeDef . T_NUMBER , false , true , XSLTAttributeDef . ERROR ) ; // xsl : sort XSLTAttributeDef dataTypeAttr = new XSLTAttributeDef ( null , "data-type" , false , true , true , XSLTAttributeDef . ERROR , "text" , Constants . SORTDATATYPE_TEXT , "number" , Constants . SORTDATATYPE_TEXT ) ; dataTypeAttr . setDefault ( "text" ) ; // xsl : sort XSLTAttributeDef orderAttr = new XSLTAttributeDef ( null , "order" , false , true , false , XSLTAttributeDef . ERROR , "ascending" , Constants . SORTORDER_ASCENDING , "descending" , Constants . SORTORDER_DESCENDING ) ; orderAttr . setDefault ( "ascending" ) ; // xsl : sort XSLTAttributeDef caseOrderAttr = new XSLTAttributeDef ( null , "case-order" , false , true , false , XSLTAttributeDef . ERROR , "upper-first" , Constants . SORTCASEORDER_UPPERFIRST , "lower-first" , Constants . SORTCASEORDER_LOWERFIRST ) ; // xsl : message XSLTAttributeDef terminateAttr = new XSLTAttributeDef ( null , "terminate" , XSLTAttributeDef . T_YESNO , false , false , XSLTAttributeDef . ERROR ) ; terminateAttr . setDefault ( "no" ) ; // top level attributes XSLTAttributeDef xslExcludeResultPrefixesAttr = new XSLTAttributeDef ( Constants . S_XSLNAMESPACEURL , "exclude-result-prefixes" , XSLTAttributeDef . T_PREFIXLIST , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef xslExtensionElementPrefixesAttr = new XSLTAttributeDef ( Constants . S_XSLNAMESPACEURL , "extension-element-prefixes" , XSLTAttributeDef . T_PREFIX_URLLIST , false , false , XSLTAttributeDef . ERROR ) ; // result - element - atts XSLTAttributeDef xslUseAttributeSetsAttr = new XSLTAttributeDef ( Constants . S_XSLNAMESPACEURL , "use-attribute-sets" , XSLTAttributeDef . T_QNAMES , false , false , XSLTAttributeDef . ERROR ) ; XSLTAttributeDef xslVersionAttr = new XSLTAttributeDef ( Constants . S_XSLNAMESPACEURL , "version" , XSLTAttributeDef . T_NMTOKEN , false , false , XSLTAttributeDef . ERROR ) ; XSLTElementDef charData = new XSLTElementDef ( this , null , "text()" , null /* alias */ , null /* elements */ , null , /* attributes */ new ProcessorCharacters ( ) , ElemTextLiteral . class /* class object */ ) ; charData . setType ( XSLTElementDef . T_PCDATA ) ; XSLTElementDef whiteSpaceOnly = new XSLTElementDef ( this , null , "text()" , null /* alias */ , null /* elements */ , null , /* attributes */ null , ElemTextLiteral . class /* should be null ? - sb */ ) ; charData . setType ( XSLTElementDef . T_PCDATA ) ; XSLTAttributeDef resultAttr = new XSLTAttributeDef ( null , "*" , XSLTAttributeDef . T_AVT , false , true , XSLTAttributeDef . WARNING ) ; XSLTAttributeDef xslResultAttr = new XSLTAttributeDef ( Constants . S_XSLNAMESPACEURL , "*" , XSLTAttributeDef . T_CDATA , false , false , XSLTAttributeDef . WARNING ) ; XSLTElementDef [ ] templateElements = new XSLTElementDef [ 23 ] ; XSLTElementDef [ ] templateElementsAndParams = new XSLTElementDef [ 24 ] ; XSLTElementDef [ ] templateElementsAndSort = new XSLTElementDef [ 24 ] ; // exslt XSLTElementDef [ ] exsltFunctionElements = new XSLTElementDef [ 24 ] ; XSLTElementDef [ ] charTemplateElements = new XSLTElementDef [ 15 ] ; XSLTElementDef resultElement = new XSLTElementDef ( this , null , "*" , null /* alias */ , templateElements /* elements */ , new XSLTAttributeDef [ ] { spaceAttrLiteral , // special xslExcludeResultPrefixesAttr , xslExtensionElementPrefixesAttr , xslUseAttributeSetsAttr , xslVersionAttr , xslResultAttr , resultAttr } , new ProcessorLRE ( ) , ElemLiteralResult . class /* class object */ , 20 , true ) ; XSLTElementDef unknownElement = new XSLTElementDef ( this , "*" , "unknown" , null /* alias */ , templateElementsAndParams /* elements */ , new XSLTAttributeDef [ ] { xslExcludeResultPrefixesAttr , xslExtensionElementPrefixesAttr , xslUseAttributeSetsAttr , xslVersionAttr , xslResultAttr , resultAttr } , new ProcessorUnknown ( ) , ElemUnknown . class /* class object */ , 20 , true ) ; XSLTElementDef xslValueOf = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "value-of" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { selectAttrRequired , disableOutputEscapingAttr } , new ProcessorTemplateElem ( ) , ElemValueOf . class /* class object */ , 20 , true ) ; XSLTElementDef xslCopyOf = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "copy-of" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { selectAttrRequired } , new ProcessorTemplateElem ( ) , ElemCopyOf . class /* class object */ , 20 , true ) ; XSLTElementDef xslNumber = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "number" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { levelAttr , countAttr , fromAttr , valueAttr , formatAttr , langAttr , letterValueAttr , groupingSeparatorAVT , groupingSizeAttr } , new ProcessorTemplateElem ( ) , ElemNumber . class /* class object */ , 20 , true ) ; // < ! - - xsl : sort cannot occur after any other elements or // any non - whitespace character - - > XSLTElementDef xslSort = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "sort" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { selectAttrDefDot , langAttr , dataTypeAttr , orderAttr , caseOrderAttr } , new ProcessorTemplateElem ( ) , ElemSort . class /* class object */ , 19 , true ) ; XSLTElementDef xslWithParam = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "with-param" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { nameAttrRequired , selectAttrOpt } , new ProcessorTemplateElem ( ) , ElemWithParam . class /* class object */ , 19 , true ) ; XSLTElementDef xslApplyTemplates = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "apply-templates" , null /* alias */ , new XSLTElementDef [ ] { xslSort , xslWithParam } /* elements */ , new XSLTAttributeDef [ ] { selectAttrDefNode , modeAttr } , new ProcessorTemplateElem ( ) , ElemApplyTemplates . class /* class object */ , 20 , true ) ; XSLTElementDef xslApplyImports = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "apply-imports" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { } , new ProcessorTemplateElem ( ) , ElemApplyImport . class /* class object */ ) ; XSLTElementDef xslForEach = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "for-each" , null /* alias */ , templateElementsAndSort , // ( # PCDATA % instructions ; % result - elements ; | xsl : sort ) * new XSLTAttributeDef [ ] { selectAttrRequired , spaceAttr } , new ProcessorTemplateElem ( ) , ElemForEach . class /* class object */ , true , false , true , 20 , true ) ; XSLTElementDef xslIf = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "if" , null /* alias */ , templateElements /* elements */ , // % template ; new XSLTAttributeDef [ ] { testAttrRequired , spaceAttr } , new ProcessorTemplateElem ( ) , ElemIf . class /* class object */ , 20 , true ) ; XSLTElementDef xslWhen = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "when" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { testAttrRequired , spaceAttr } , new ProcessorTemplateElem ( ) , ElemWhen . class /* class object */ , false , true , 1 , true ) ; XSLTElementDef xslOtherwise = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "otherwise" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { spaceAttr } , new ProcessorTemplateElem ( ) , ElemOtherwise . class /* class object */ , false , false , 2 , false ) ; XSLTElementDef xslChoose = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "choose" , null /* alias */ , new XSLTElementDef [ ] { xslWhen , xslOtherwise } /* elements */ , new XSLTAttributeDef [ ] { spaceAttr } , new ProcessorTemplateElem ( ) , ElemChoose . class /* class object */ , true , false , true , 20 , true ) ; XSLTElementDef xslAttribute = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "attribute" , null /* alias */ , charTemplateElements /* elements */ , // % char - template ; > new XSLTAttributeDef [ ] { nameAVTRequired , namespaceAVTOpt , spaceAttr } , new ProcessorTemplateElem ( ) , ElemAttribute . class /* class object */ , 20 , true ) ; XSLTElementDef xslCallTemplate = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "call-template" , null /* alias */ , new XSLTElementDef [ ] { xslWithParam } /* elements */ , new XSLTAttributeDef [ ] { nameAttrRequired } , new ProcessorTemplateElem ( ) , ElemCallTemplate . class /* class object */ , 20 , true ) ; XSLTElementDef xslVariable = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "variable" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { nameAttrRequired , selectAttrOpt } , new ProcessorTemplateElem ( ) , ElemVariable . class /* class object */ , 20 , true ) ; XSLTElementDef xslParam = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "param" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { nameAttrRequired , selectAttrOpt } , new ProcessorTemplateElem ( ) , ElemParam . class /* class object */ , 19 , true ) ; XSLTElementDef xslText = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "text" , null /* alias */ , new XSLTElementDef [ ] { charData } /* elements */ , new XSLTAttributeDef [ ] { disableOutputEscapingAttr } , new ProcessorText ( ) , ElemText . class /* class object */ , 20 , true ) ; XSLTElementDef xslProcessingInstruction = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "processing-instruction" , null /* alias */ , charTemplateElements /* elements */ , // % char - template ; > new XSLTAttributeDef [ ] { nameAVT_NCNAMERequired , spaceAttr } , new ProcessorTemplateElem ( ) , ElemPI . class /* class object */ , 20 , true ) ; XSLTElementDef xslElement = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "element" , null /* alias */ , templateElements /* elements */ , // % template ; new XSLTAttributeDef [ ] { nameAVTRequired , namespaceAVTOpt , useAttributeSetsAttr , spaceAttr } , new ProcessorTemplateElem ( ) , ElemElement . class /* class object */ , 20 , true ) ; XSLTElementDef xslComment = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "comment" , null /* alias */ , charTemplateElements /* elements */ , // % char - template ; > new XSLTAttributeDef [ ] { spaceAttr } , new ProcessorTemplateElem ( ) , ElemComment . class /* class object */ , 20 , true ) ; XSLTElementDef xslCopy = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "copy" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { spaceAttr , useAttributeSetsAttr } , new ProcessorTemplateElem ( ) , ElemCopy . class /* class object */ , 20 , true ) ; XSLTElementDef xslMessage = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "message" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { terminateAttr } , new ProcessorTemplateElem ( ) , ElemMessage . class /* class object */ , 20 , true ) ; XSLTElementDef xslFallback = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "fallback" , null /* alias */ , templateElements /* elements */ , // % template ; > new XSLTAttributeDef [ ] { spaceAttr } , new ProcessorTemplateElem ( ) , ElemFallback . class /* class object */ , 20 , true ) ; // exslt XSLTElementDef exsltFunction = new XSLTElementDef ( this , Constants . S_EXSLT_FUNCTIONS_URL , "function" , null /* alias */ , exsltFunctionElements /* elements */ , new XSLTAttributeDef [ ] { nameAttrRequired } , new ProcessorExsltFunction ( ) , ElemExsltFunction . class /* class object */ ) ; XSLTElementDef exsltResult = new XSLTElementDef ( this , Constants . S_EXSLT_FUNCTIONS_URL , "result" , null /* alias */ , templateElements /* elements */ , new XSLTAttributeDef [ ] { selectAttrOpt } , new ProcessorExsltFuncResult ( ) , ElemExsltFuncResult . class /* class object */ ) ; int i = 0 ; templateElements [ i ++ ] = charData ; // # PCDATA // char - instructions templateElements [ i ++ ] = xslApplyTemplates ; templateElements [ i ++ ] = xslCallTemplate ; templateElements [ i ++ ] = xslApplyImports ; templateElements [ i ++ ] = xslForEach ; templateElements [ i ++ ] = xslValueOf ; templateElements [ i ++ ] = xslCopyOf ; templateElements [ i ++ ] = xslNumber ; templateElements [ i ++ ] = xslChoose ; templateElements [ i ++ ] = xslIf ; templateElements [ i ++ ] = xslText ; templateElements [ i ++ ] = xslCopy ; templateElements [ i ++ ] = xslVariable ; templateElements [ i ++ ] = xslMessage ; templateElements [ i ++ ] = xslFallback ; // instructions templateElements [ i ++ ] = xslProcessingInstruction ; templateElements [ i ++ ] = xslComment ; templateElements [ i ++ ] = xslElement ; templateElements [ i ++ ] = xslAttribute ; templateElements [ i ++ ] = resultElement ; templateElements [ i ++ ] = unknownElement ; templateElements [ i ++ ] = exsltFunction ; templateElements [ i ++ ] = exsltResult ; System . arraycopy ( templateElements , 0 , templateElementsAndParams , 0 , i ) ; System . arraycopy ( templateElements , 0 , templateElementsAndSort , 0 , i ) ; System . arraycopy ( templateElements , 0 , exsltFunctionElements , 0 , i ) ; templateElementsAndParams [ i ] = xslParam ; templateElementsAndSort [ i ] = xslSort ; exsltFunctionElements [ i ] = xslParam ; i = 0 ; charTemplateElements [ i ++ ] = charData ; // # PCDATA // char - instructions charTemplateElements [ i ++ ] = xslApplyTemplates ; charTemplateElements [ i ++ ] = xslCallTemplate ; charTemplateElements [ i ++ ] = xslApplyImports ; charTemplateElements [ i ++ ] = xslForEach ; charTemplateElements [ i ++ ] = xslValueOf ; charTemplateElements [ i ++ ] = xslCopyOf ; charTemplateElements [ i ++ ] = xslNumber ; charTemplateElements [ i ++ ] = xslChoose ; charTemplateElements [ i ++ ] = xslIf ; charTemplateElements [ i ++ ] = xslText ; charTemplateElements [ i ++ ] = xslCopy ; charTemplateElements [ i ++ ] = xslVariable ; charTemplateElements [ i ++ ] = xslMessage ; charTemplateElements [ i ++ ] = xslFallback ; XSLTElementDef importDef = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "import" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { hrefAttr } , // EMPTY new ProcessorImport ( ) , null /* class object */ , 1 , true ) ; XSLTElementDef includeDef = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "include" , null /* alias */ , null /* elements */ , // EMPTY new XSLTAttributeDef [ ] { hrefAttr } , new ProcessorInclude ( ) , null /* class object */ , 20 , true ) ; XSLTAttributeDef [ ] scriptAttrs = new XSLTAttributeDef [ ] { new XSLTAttributeDef ( null , "lang" , XSLTAttributeDef . T_NMTOKEN , true , false , XSLTAttributeDef . WARNING ) , new XSLTAttributeDef ( null , "src" , XSLTAttributeDef . T_URL , false , false , XSLTAttributeDef . WARNING ) } ; XSLTAttributeDef [ ] componentAttrs = new XSLTAttributeDef [ ] { new XSLTAttributeDef ( null , "prefix" , XSLTAttributeDef . T_NMTOKEN , true , false , XSLTAttributeDef . WARNING ) , new XSLTAttributeDef ( null , "elements" , XSLTAttributeDef . T_STRINGLIST , false , false , XSLTAttributeDef . WARNING ) , new XSLTAttributeDef ( null , "functions" , XSLTAttributeDef . T_STRINGLIST , false , false , XSLTAttributeDef . WARNING ) } ; XSLTElementDef [ ] topLevelElements = new XSLTElementDef [ ] { includeDef , importDef , // resultElement , whiteSpaceOnly , unknownElement , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "strip-space" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { elementsAttr } , new ProcessorStripSpace ( ) , null /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "preserve-space" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { elementsAttr } , new ProcessorPreserveSpace ( ) , null /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "output" , null /* alias */ , null /* elements */ , new XSLTAttributeDef [ ] { methodAttr , versionAttr , encodingAttr , omitXmlDeclarationAttr , standaloneAttr , doctypePublicAttr , doctypeSystemAttr , cdataSectionElementsAttr , indentAttr , mediaTypeAttr , XSLTAttributeDef . m_foreignAttr } , new ProcessorOutputElem ( ) , null /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "key" , null /* alias */ , null /* elements */ , // EMPTY new XSLTAttributeDef [ ] { nameAttrRequired , matchAttrRequired , useAttr } , new ProcessorKey ( ) , null /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "decimal-format" , null /* alias */ , null /* elements */ , // EMPTY new XSLTAttributeDef [ ] { nameAttrOpt_ERROR , decimalSeparatorAttr , groupingSeparatorAttr , infinityAttr , minusSignAttr , NaNAttr , percentAttr , perMilleAttr , zeroDigitAttr , digitAttr , patternSeparatorAttr } , new ProcessorDecimalFormat ( ) , null /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "attribute-set" , null /* alias */ , new XSLTElementDef [ ] { xslAttribute } /* elements */ , new XSLTAttributeDef [ ] { nameAttrRequired , useAttributeSetsAttr } , new ProcessorAttributeSet ( ) , null /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "variable" , null /* alias */ , templateElements /* elements */ , new XSLTAttributeDef [ ] { nameAttrRequired , selectAttrOpt } , new ProcessorGlobalVariableDecl ( ) , ElemVariable . class /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "param" , null /* alias */ , templateElements /* elements */ , new XSLTAttributeDef [ ] { nameAttrRequired , selectAttrOpt } , new ProcessorGlobalParamDecl ( ) , ElemParam . class /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "template" , null /* alias */ , templateElementsAndParams /* elements */ , new XSLTAttributeDef [ ] { matchAttrOpt , nameAttrOpt_ERROR , priorityAttr , modeAttr , spaceAttr } , new ProcessorTemplate ( ) , ElemTemplate . class /* class object */ , true , 20 , true ) , new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "namespace-alias" , null /* alias */ , null /* elements */ , // EMPTY new XSLTAttributeDef [ ] { stylesheetPrefixAttr , resultPrefixAttr } , new ProcessorNamespaceAlias ( ) , null /* class object */ , 20 , true ) , new XSLTElementDef ( this , Constants . S_BUILTIN_EXTENSIONS_URL , "component" , null /* alias */ , new XSLTElementDef [ ] { new XSLTElementDef ( this , Constants . S_BUILTIN_EXTENSIONS_URL , "script" , null /* alias */ , new XSLTElementDef [ ] { charData } /* elements */ , scriptAttrs , new ProcessorLRE ( ) , ElemExtensionScript . class /* class object */ , 20 , true ) } , // EMPTY componentAttrs , new ProcessorLRE ( ) , ElemExtensionDecl . class /* class object */ ) , new XSLTElementDef ( this , Constants . S_BUILTIN_OLD_EXTENSIONS_URL , "component" , null /* alias */ , new XSLTElementDef [ ] { new XSLTElementDef ( this , Constants . S_BUILTIN_OLD_EXTENSIONS_URL , "script" , null /* alias */ , new XSLTElementDef [ ] { charData } /* elements */ , scriptAttrs , new ProcessorLRE ( ) , ElemExtensionScript . class /* class object */ , 20 , true ) } , // EMPTY componentAttrs , new ProcessorLRE ( ) , ElemExtensionDecl . class /* class object */ ) , exsltFunction } /* exslt */ ; // end of topevelElements XSLTAttributeDef excludeResultPrefixesAttr = new XSLTAttributeDef ( null , "exclude-result-prefixes" , XSLTAttributeDef . T_PREFIXLIST , false , false , XSLTAttributeDef . WARNING ) ; XSLTAttributeDef extensionElementPrefixesAttr = new XSLTAttributeDef ( null , "extension-element-prefixes" , XSLTAttributeDef . T_PREFIX_URLLIST , false , false , XSLTAttributeDef . WARNING ) ; XSLTAttributeDef idAttr = new XSLTAttributeDef ( null , "id" , XSLTAttributeDef . T_CDATA , false , false , XSLTAttributeDef . WARNING ) ; XSLTAttributeDef versionAttrRequired = new XSLTAttributeDef ( null , "version" , XSLTAttributeDef . T_NMTOKEN , true , false , XSLTAttributeDef . WARNING ) ; XSLTElementDef stylesheetElemDef = new XSLTElementDef ( this , Constants . S_XSLNAMESPACEURL , "stylesheet" , "transform" , topLevelElements , new XSLTAttributeDef [ ] { extensionElementPrefixesAttr , excludeResultPrefixesAttr , idAttr , versionAttrRequired , spaceAttr } , new ProcessorStylesheetElement ( ) , /* ContentHandler */ null /* class object */ , true , - 1 , false ) ; importDef . setElements ( new XSLTElementDef [ ] { stylesheetElemDef , resultElement , unknownElement } ) ; includeDef . setElements ( new XSLTElementDef [ ] { stylesheetElemDef , resultElement , unknownElement } ) ; build ( null , null , null , new XSLTElementDef [ ] { stylesheetElemDef , whiteSpaceOnly , resultElement , unknownElement } , null , new ProcessorStylesheetDoc ( ) , /* ContentHandler */ null /* class object */ ) ;
public class XPathBuilder { /** * < p > < b > Used for finding element process ( to generate css selectors address ) < / b > < / p > * Once used all other attributes will be ignored . Try using this class to a minimum ! * @ param elCssSelector absolute way ( css selectors ) to identify element * @ param < T > the element which calls this method * @ return this element */ @ SuppressWarnings ( "unchecked" ) public < T extends XPathBuilder > T setElCssSelector ( final String elCssSelector ) { } }
this . elCssSelector = elCssSelector ; return ( T ) this ;
public class TransactionSet { /** * Clear items by IDs from the transaction set and return a snapshot of the items */ public synchronized TransactionItem [ ] clear ( List < String > deliveredMessageIDs ) throws FFMQException { } }
int len = deliveredMessageIDs . size ( ) ; TransactionItem [ ] itemsSnapshot = new TransactionItem [ len ] ; for ( int n = 0 ; n < len ; n ++ ) { String deliveredMessageID = deliveredMessageIDs . get ( len - n - 1 ) ; boolean found = false ; Iterator < TransactionItem > entries = items . iterator ( ) ; while ( entries . hasNext ( ) ) { TransactionItem item = entries . next ( ) ; if ( item . getMessageId ( ) . equals ( deliveredMessageID ) ) { found = true ; itemsSnapshot [ n ] = item ; // Store in snapshot entries . remove ( ) ; break ; } } if ( ! found ) throw new FFMQException ( "Message does not belong to transaction : " + deliveredMessageID , "INTERNAL_ERROR" ) ; } return itemsSnapshot ;
public class SlackBot { /** * Invoked when the bot receives a direct mention ( @ botname : message ) * or a direct message . NOTE : These two event types are added by jbot * to make your task easier , Slack doesn ' t have any direct way to * determine these type of events . * @ param session * @ param event */ @ Controller ( events = { } }
EventType . DIRECT_MENTION , EventType . DIRECT_MESSAGE } ) public void onReceiveDM ( WebSocketSession session , Event event ) { reply ( session , event , "Hi, I am " + slackService . getCurrentUser ( ) . getName ( ) ) ;
public class RamPersistence { /** * { @ inheritDoc } */ public boolean remove ( String name ) { } }
if ( ! objects . containsKey ( name ) ) { return false ; } objects . remove ( name ) ; return true ;
public class ClassTree { /** * Return the set of classes which implement the interface passed . * @ param typeElement interface whose implementing - classes set is required . */ public SortedSet < TypeElement > implementingClasses ( TypeElement typeElement ) { } }
SortedSet < TypeElement > result = get ( implementingClasses , typeElement ) ; SortedSet < TypeElement > intfcs = allSubClasses ( typeElement , false ) ; // If class x implements a subinterface of typeElement , then it follows // that class x implements typeElement . Iterator < TypeElement > subInterfacesIter = intfcs . iterator ( ) ; while ( subInterfacesIter . hasNext ( ) ) { Iterator < TypeElement > implementingClassesIter = implementingClasses ( subInterfacesIter . next ( ) ) . iterator ( ) ; while ( implementingClassesIter . hasNext ( ) ) { TypeElement c = implementingClassesIter . next ( ) ; if ( ! result . contains ( c ) ) { result . add ( c ) ; } } } return result ;
public class RenderFactory { public void init ( Engine engine , Constants constants , ServletContext servletContext ) { } }
this . engine = engine ; this . constants = constants ; this . servletContext = servletContext ; // create mainRenderFactory switch ( constants . getViewType ( ) ) { case JFINAL_TEMPLATE : mainRenderFactory = new MainRenderFactory ( ) ; break ; case FREE_MARKER : mainRenderFactory = new FreeMarkerRenderFactory ( ) ; break ; case JSP : mainRenderFactory = new JspRenderFactory ( ) ; break ; case VELOCITY : mainRenderFactory = new VelocityRenderFactory ( ) ; break ; }
public class MapTransitionExtractor { /** * Get the neighbor group depending if it is a transition tile . * @ param tile The current tile . * @ param neighbor The neighbor tile . * @ return The neighbor group , < code > null < / code > if none . */ private String getNeighborGroup ( Tile tile , Tile neighbor ) { } }
final String neighborGroup ; if ( isTransition ( neighbor ) ) { if ( isTransition ( tile ) ) { neighborGroup = getOtherGroup ( tile , neighbor ) ; } else { neighborGroup = null ; } } else { neighborGroup = mapGroup . getGroup ( neighbor ) ; } return neighborGroup ;
public class ImmutableMatrixFactory { /** * Returns an immutable matrix of the specified size whose elements are all 0. * @ param rows the number of rows * @ param cols the number of columns * @ return a < code > rows < / code > × < code > cols < / code > matrix whose elements are all 0 * @ throws IllegalArgumentException if either argument is non - positive */ public static ImmutableMatrix zeros ( final int rows , final int cols ) { } }
if ( rows <= 0 || cols <= 0 ) throw new IllegalArgumentException ( "Invalid dimensions" ) ; return create ( new ImmutableData ( rows , cols ) { @ Override public double getQuick ( int row , int col ) { return 0 ; } } ) ;
public class MagicEntries { /** * Optimize the magic entries by removing the first - bytes information into their own lists */ public void optimizeFirstBytes ( ) { } }
// now we post process the entries and remove the first byte ones we can optimize for ( MagicEntry entry : entryList ) { byte [ ] startingBytes = entry . getStartsWithByte ( ) ; if ( startingBytes == null || startingBytes . length == 0 ) { continue ; } int index = ( 0xFF & startingBytes [ 0 ] ) ; if ( firstByteEntryLists [ index ] == null ) { firstByteEntryLists [ index ] = new ArrayList < MagicEntry > ( ) ; } firstByteEntryLists [ index ] . add ( entry ) ; /* * We put an entry in the first - byte list but need to leave it in the main list because there may be * optional characters or ! = or > comparisons in the match */ }
public class RequestIdTable { /** * Removes the specified request ID ( and associated data ) from the table . * The ID must already be in the table otherwise a runtime exception * is thrown . * @ param requestId The request ID to remove from the table . */ public synchronized void remove ( int requestId ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "remove" ) ; if ( ! containsId ( requestId ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) debugTraceTable ( "id (" + requestId + ") not in table" ) ; throw new SIErrorException ( nls . getFormattedMessage ( "REQIDTABLE_INTERNAL_SICJ0058" , null , "REQIDTABLE_INTERNAL_SICJ0058" ) ) ; // D226223 } testReqIdTableEntry . requestId = requestId ; table . remove ( testReqIdTableEntry ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "remove" ) ;
public class DaiIngestError { /** * Sets the reason value for this DaiIngestError . * @ param reason * The error associated with the content . */ public void setReason ( com . google . api . ads . admanager . axis . v201805 . DaiIngestErrorReason reason ) { } }
this . reason = reason ;
public class CacheableWorkspaceDataManager { /** * Returns an item from cache by Identifier or null if the item don ' t cached . * @ param identifier * Item id * @ return ItemData * @ throws RepositoryException * error */ protected ItemData getCachedItemData ( String identifier ) throws RepositoryException { } }
return cache . isEnabled ( ) ? cache . get ( identifier ) : null ;
public class CommerceShippingFixedOptionRelPersistenceImpl { /** * Returns an ordered range of all the commerce shipping fixed option rels where commerceShippingMethodId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CommerceShippingFixedOptionRelModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order . * @ param commerceShippingMethodId the commerce shipping method ID * @ param start the lower bound of the range of commerce shipping fixed option rels * @ param end the upper bound of the range of commerce shipping fixed option rels ( not inclusive ) * @ param orderByComparator the comparator to order the results by ( optionally < code > null < / code > ) * @ return the ordered range of matching commerce shipping fixed option rels */ @ Override public List < CommerceShippingFixedOptionRel > findByCommerceShippingMethodId ( long commerceShippingMethodId , int start , int end , OrderByComparator < CommerceShippingFixedOptionRel > orderByComparator ) { } }
return findByCommerceShippingMethodId ( commerceShippingMethodId , start , end , orderByComparator , true ) ;
public class FNLPCorpus { /** * 读分词 / 词性的文件 * 文件格式为 : * word1 / pos1 word2 / pos2 . . . wordn / posn * @ param path * @ param suffix * @ param charset * @ throws IOException */ public void readPOS ( String path , String suffix , String charset ) throws IOException { } }
List < File > files = MyFiles . getAllFiles ( path , suffix ) ; // " . txt " Iterator < File > it = files . iterator ( ) ; while ( it . hasNext ( ) ) { BufferedReader bfr = null ; File file = it . next ( ) ; try { FileInputStream in = new FileInputStream ( file ) ; bfr = new BufferedReader ( new UnicodeReader ( in , charset ) ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } FNLPDoc doc = new FNLPDoc ( ) ; doc . name = file . getName ( ) ; String line = null ; while ( ( line = bfr . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . matches ( "^$" ) ) continue ; FNLPSent sent = new FNLPSent ( ) ; sent . parseTagedLine ( line ) ; doc . add ( sent ) ; } add ( doc ) ; }
public class ShanksAgentBayesianReasoningCapability { /** * Query several states of a set of nodes * @ param bn * @ param queries * in format hashmap of [ node , List of states ] * @ return results in format hashmap of [ node , hashmap ] . The second hashmap * is [ state , probability of the hypothesis ] * @ throws UnknownNodeException * @ throws UnknowkNodeStateException */ public static HashMap < String , HashMap < String , Float > > getHypotheses ( ProbabilisticNetwork bn , HashMap < String , List < String > > queries ) throws ShanksException { } }
HashMap < String , HashMap < String , Float > > result = new HashMap < String , HashMap < String , Float > > ( ) ; for ( Entry < String , List < String > > query : queries . entrySet ( ) ) { HashMap < String , Float > partialResult = ShanksAgentBayesianReasoningCapability . getNodeHypotheses ( bn , query . getKey ( ) , query . getValue ( ) ) ; result . put ( query . getKey ( ) , partialResult ) ; } return result ;
public class AmazonWebServiceClient { /** * Returns the most specific request metric collector , starting from the request level , then * client level , then finally the AWS SDK level . */ private final RequestMetricCollector findRequestMetricCollector ( RequestMetricCollector reqLevelMetricsCollector ) { } }
if ( reqLevelMetricsCollector != null ) { return reqLevelMetricsCollector ; } else if ( getRequestMetricsCollector ( ) != null ) { return getRequestMetricsCollector ( ) ; } else { return AwsSdkMetrics . getRequestMetricCollector ( ) ; }
public class CmsSerialDateView { /** * Handle changes of the series check box . * @ param event the change event . */ @ UiHandler ( "m_seriesCheckBox" ) void onSeriesChange ( ValueChangeEvent < Boolean > event ) { } }
if ( handleChange ( ) ) { m_controller . setIsSeries ( event . getValue ( ) ) ; }
public class DRL6Lexer { /** * $ ANTLR start " QUESTION _ DIV " */ public final void mQUESTION_DIV ( ) throws RecognitionException { } }
try { int _type = QUESTION_DIV ; int _channel = DEFAULT_TOKEN_CHANNEL ; // src / main / resources / org / drools / compiler / lang / DRL6Lexer . g : 339:5 : ( ' ? / ' ) // src / main / resources / org / drools / compiler / lang / DRL6Lexer . g : 339:7 : ' ? / ' { match ( "?/" ) ; if ( state . failed ) return ; } state . type = _type ; state . channel = _channel ; } finally { // do for sure before leaving }
public class CmsAliasTableController { /** * This method is called when the user deletes a set of rows . < p > * @ param rowsToDelete the list of rows which should be deleted */ public void deleteRows ( List < CmsAliasTableRow > rowsToDelete ) { } }
List < CmsAliasTableRow > liveData = m_view . getLiveData ( ) ; for ( CmsAliasTableRow row : liveData ) { CmsUUID structureId = row . getStructureId ( ) ; if ( structureId != null ) { m_deletedIds . add ( row . getStructureId ( ) ) ; } } // prevent selection model from going out of synch m_view . getTable ( ) . getSelectionModel ( ) . clear ( ) ; liveData . removeAll ( rowsToDelete ) ; updateValidationStatus ( ) ;
public class Stopwatch { /** * Creates Stopwatch around passed callable and invokes callable . * @ param callable with invocation time would be measured * @ return */ public static Stopwatch createStarted ( VoidCallable callable ) { } }
Stopwatch stopwatch = new Stopwatch ( ) ; stopwatch . callable = callable ; stopwatch . start ( ) ; return stopwatch ;
public class IncludeAllPaginator { /** * generate the final output path */ private Optional < IncludeAllPageWithOutput > addOutputInformation ( IncludeAllPage pages , FileResource baseResource , Path includeAllBasePath , Locale locale ) { } }
// depth = 0 is the file that has the include - all directive if ( pages . depth == 0 ) { return of ( new IncludeAllPageWithOutput ( pages , pages . files . get ( 0 ) , pages . files . get ( 0 ) . getPath ( ) , locale ) ) ; } Path baseResourceParentPath = baseResource . getPath ( ) . getParent ( ) ; Optional < FileResource > virtualResource = pages . files . stream ( ) . findFirst ( ) . map ( fr -> new VirtualPathFileResource ( baseResourceParentPath . resolve ( includeAllBasePath . relativize ( fr . getPath ( ) ) . toString ( ) ) , fr ) ) ; return virtualResource . map ( vr -> { Path finalOutputPath = outputPathExtractor . apply ( vr ) . normalize ( ) ; return new IncludeAllPageWithOutput ( pages , vr , finalOutputPath , locale ) ; } ) ;
public class MapDataDao { /** * Note that if not logged in , the Changeset for each returned element will be null * @ param nodeIds a collection of node ids to return . * @ throws OsmNotFoundException if < b > any < / b > one of the given nodes does not exist * @ return a list of nodes . */ public List < Node > getNodes ( Collection < Long > nodeIds ) { } }
if ( nodeIds . isEmpty ( ) ) return Collections . emptyList ( ) ; return getSomeElements ( NODE + "s?" + NODE + "s=" + toCommaList ( nodeIds ) , Node . class ) ;
public class RegistryHelper { /** * Gets the UserRegistry object for the given realm . If the realm name is null * returns the active registry . If the realm is not valid , or security is not enabled , * or no registry is configured , returns null . * @ param realmName * @ return UserRegistry object * @ throws WSSecurityException if there is an internal error */ public static UserRegistry getUserRegistry ( String realmName ) throws WSSecurityException { } }
try { WSSecurityService ss = wsSecurityServiceRef . getService ( ) ; if ( ss == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "No WSSecurityService, returning null" ) ; } } else { return ss . getUserRegistry ( realmName ) ; } } catch ( WSSecurityException e ) { String msg = "getUserRegistry for realm " + realmName + " failed due to an internal error: " + e . getMessage ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , msg , e ) ; } throw new WSSecurityException ( msg , e ) ; } return null ;
public class ClassUtil { /** * loads a class from a specified Classloader with given classname * @ param className * @ param cl * @ return matching Class */ private static Class _loadClass ( ClassLoading cl , String className , Class defaultValue , Set < Throwable > exceptions ) { } }
className = className . trim ( ) ; if ( StringUtil . isEmpty ( className ) ) return defaultValue ; Class clazz = checkPrimaryTypesBytecodeDef ( className , null ) ; if ( clazz != null ) return clazz ; // array in the format boolean [ ] or java . lang . String [ ] if ( className . endsWith ( "[]" ) ) { StringBuilder pureCN = new StringBuilder ( className ) ; int dimensions = 0 ; do { pureCN . delete ( pureCN . length ( ) - 2 , pureCN . length ( ) ) ; dimensions ++ ; } while ( pureCN . lastIndexOf ( "[]" ) == pureCN . length ( ) - 2 ) ; clazz = __loadClass ( cl , pureCN . toString ( ) , null , exceptions ) ; if ( clazz != null ) { for ( int i = 0 ; i < dimensions ; i ++ ) clazz = toArrayClass ( clazz ) ; return clazz ; } } // array in the format [ C or [ Ljava . lang . String ; else if ( className . charAt ( 0 ) == '[' ) { StringBuilder pureCN = new StringBuilder ( className ) ; int dimensions = 0 ; do { pureCN . delete ( 0 , 1 ) ; dimensions ++ ; } while ( pureCN . charAt ( 0 ) == '[' ) ; clazz = __loadClass ( cl , pureCN . toString ( ) , null , exceptions ) ; if ( clazz != null ) { for ( int i = 0 ; i < dimensions ; i ++ ) clazz = toArrayClass ( clazz ) ; return clazz ; } } return __loadClass ( cl , className , defaultValue , exceptions ) ;
public class FindbugsPlugin { /** * Get the FindBugs core preferences for given project . This method can * return workspace preferences if project preferences are not created yet * or they are disabled . * @ param project * the project ( if null , workspace settings are used ) * @ param forceRead * true to enforce reading properties from disk * @ return the preferences for the project or prefs from workspace */ public static UserPreferences getCorePreferences ( @ CheckForNull IProject project , boolean forceRead ) { } }
if ( project == null || ! isProjectSettingsEnabled ( project ) ) { // read workspace ( user ) settings from instance area return getWorkspacePreferences ( ) ; } // use project settings return getProjectPreferences ( project , forceRead ) ;
public class Matrix4x3d { /** * Set this matrix to be a simple translation matrix . * The resulting matrix can be multiplied against another transformation * matrix to obtain an additional translation . * @ param offset * the offsets in x , y and z to translate * @ return this */ public Matrix4x3d translation ( Vector3dc offset ) { } }
return translation ( offset . x ( ) , offset . y ( ) , offset . z ( ) ) ;
public class LogFilePatternReceiver { /** * Helper method that will convert timestamp format to a pattern * @ return string */ private String convertTimestamp ( ) { } }
// some locales ( for example , French ) generate timestamp text with characters not included in \ w - // now using \ S ( all non - whitespace characters ) instead of / w String result = timestampFormat . replaceAll ( VALID_DATEFORMAT_CHAR_PATTERN + "+" , "\\\\S+" ) ; // make sure dots in timestamp are escaped result = result . replaceAll ( Pattern . quote ( "." ) , "\\\\." ) ; return result ;
public class StrSubstitutor { /** * Replaces all the occurrences of variables within the given source * builder with their matching values from the resolver . * Only the specified portion of the builder will be processed . * The rest of the builder is not processed , but it is not deleted . * @ param source the builder to replace in , null returns zero * @ param offset the start offset within the array , must be valid * @ param length the length within the builder to be processed , must be valid * @ return true if altered */ public boolean replaceIn ( final StrBuilder source , final int offset , final int length ) { } }
if ( source == null ) { return false ; } return substitute ( source , offset , length ) ;
public class ComposableFutures { /** * creates new cold observable , given future provider , * on each subscribe will consume the provided future * and repeat until stop criteria will exists * each result will be emitted to the stream * @ param futureProvider the future provider * @ param < T > the stream type * @ return the stream */ public static < T > Observable < T > toColdObservable ( final RecursiveFutureProvider < T > futureProvider ) { } }
return Observable . create ( new Observable . OnSubscribe < T > ( ) { @ Override public void call ( final Subscriber < ? super T > subscriber ) { recursiveChain ( subscriber , futureProvider . createStopCriteria ( ) ) ; } private void recursiveChain ( final Subscriber < ? super T > subscriber , final Predicate < T > stopCriteria ) { futureProvider . provide ( ) . consume ( result -> { if ( result . isSuccess ( ) ) { final T value = result . getValue ( ) ; subscriber . onNext ( value ) ; if ( stopCriteria . apply ( value ) ) { subscriber . onCompleted ( ) ; } else { recursiveChain ( subscriber , stopCriteria ) ; } } else { subscriber . onError ( result . getError ( ) ) ; } } ) ; } } ) ;
public class AppServiceEnvironmentsInner { /** * Get available SKUs for scaling a multi - role pool . * Get available SKUs for scaling a multi - role pool . * ServiceResponse < PageImpl < SkuInfoInner > > * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the PagedList & lt ; SkuInfoInner & gt ; object wrapped in { @ link ServiceResponse } if successful . */ public Observable < ServiceResponse < Page < SkuInfoInner > > > listMultiRolePoolSkusNextSinglePageAsync ( final String nextPageLink ) { } }
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . listMultiRolePoolSkusNext ( nextUrl , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < Page < SkuInfoInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < SkuInfoInner > > > call ( Response < ResponseBody > response ) { try { ServiceResponse < PageImpl < SkuInfoInner > > result = listMultiRolePoolSkusNextDelegate ( response ) ; return Observable . just ( new ServiceResponse < Page < SkuInfoInner > > ( result . body ( ) , result . response ( ) ) ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ;
public class LimesurveyRC { /** * Complete a response . * @ param surveyId the survey id of the survey you want to complete the response * @ param responseId the response id of the response you want to complete * @ param date the date where the response will be completed ( submitdate ) * @ return true if the response was successfuly completed * @ throws LimesurveyRCException the limesurvey rc exception */ public boolean completeResponse ( int surveyId , int responseId , LocalDateTime date ) throws LimesurveyRCException { } }
Map < String , String > responseData = new HashMap < > ( ) ; responseData . put ( "submitdate" , date . format ( DateTimeFormatter . ISO_LOCAL_DATE ) + " " + date . format ( DateTimeFormatter . ISO_LOCAL_TIME ) ) ; JsonElement result = updateResponse ( surveyId , responseId , responseData ) ; if ( ! result . getAsBoolean ( ) ) { throw new LimesurveyRCException ( result . getAsString ( ) ) ; } return true ;
public class ParserEvaluate { /** * Evaluate and print precision , recall and F measure . * @ throws IOException * if test corpus not loaded */ public final void evaluate ( ) throws IOException { } }
final ParserEvaluator evaluator = new ParserEvaluator ( this . parser ) ; evaluator . evaluate ( this . testSamples ) ; System . out . println ( evaluator . getFMeasure ( ) ) ;
public class FilterCriteriaType { /** * Register { @ link FilterCriteriaType } * @ param type { @ link FilterCriteriaType } for register * @ throws IllegalStateException if { @ link FilterCriteriaType } with current name if already registered */ public static void register ( FilterCriteriaType type ) { } }
if ( REGISTRY . containsKey ( type . getName ( ) ) ) throw new IllegalStateException ( String . format ( "FilterCriteriaType with name %s is already registered!" , type . getName ( ) ) ) ; REGISTRY . put ( type . getName ( ) , type ) ;
public class FunctionExpression { /** * Implements the format function " % " * @ param formatter the current formation context */ private void format ( CssFormatter formatter ) { } }
String fmt = get ( 0 ) . stringValue ( formatter ) ; int idx = 1 ; for ( int i = 0 ; i < fmt . length ( ) ; i ++ ) { char ch = fmt . charAt ( i ) ; if ( ch == '%' ) { ch = fmt . charAt ( ++ i ) ; switch ( ch ) { case '%' : formatter . append ( ch ) ; break ; case 'a' : case 'd' : get ( idx ++ ) . appendTo ( formatter ) ; break ; case 'A' : case 'D' : String str = get ( idx ++ ) . stringValue ( formatter ) ; try { str = new URI ( null , null , str , null ) . getRawPath ( ) ; } catch ( URISyntaxException e ) { e . printStackTrace ( ) ; } formatter . append ( str ) ; break ; case 's' : formatter . setInlineMode ( true ) ; get ( idx ++ ) . appendTo ( formatter ) ; formatter . setInlineMode ( false ) ; break ; case 'S' : formatter . setInlineMode ( true ) ; str = get ( idx ++ ) . stringValue ( formatter ) ; try { str = new URI ( null , null , str , null ) . getRawPath ( ) ; } catch ( URISyntaxException e ) { e . printStackTrace ( ) ; } formatter . append ( str ) ; formatter . setInlineMode ( false ) ; break ; default : formatter . append ( ch ) ; } } else { formatter . append ( ch ) ; } }
public class TIFFField { /** * Returns data in TIFF _ BYTE , TIFF _ SBYTE , TIFF _ UNDEFINED , TIFF _ SHORT , * TIFF _ SSHORT , or TIFF _ SLONG format as an int . * < p > TIFF _ BYTE and TIFF _ UNDEFINED data are treated as unsigned ; * that is , no sign extension will take place and the returned * value will be in the range [ 0 , 255 ] . TIFF _ SBYTE data will * be returned in the range [ - 128 , 127 ] . * < p > A ClassCastException will be thrown if the field is not of * type TIFF _ BYTE , TIFF _ SBYTE , TIFF _ UNDEFINED , TIFF _ SHORT , * TIFF _ SSHORT , or TIFF _ SLONG . */ public int getAsInt ( int index ) { } }
switch ( type ) { case TIFF_BYTE : case TIFF_UNDEFINED : return ( ( byte [ ] ) data ) [ index ] & 0xff ; case TIFF_SBYTE : return ( ( byte [ ] ) data ) [ index ] ; case TIFF_SHORT : return ( ( char [ ] ) data ) [ index ] & 0xffff ; case TIFF_SSHORT : return ( ( short [ ] ) data ) [ index ] ; case TIFF_SLONG : return ( ( int [ ] ) data ) [ index ] ; default : throw new ClassCastException ( ) ; }
public class SVSConsumerAuditor { /** * Audits an ITI - 48 Retrieve Value Set event for SVS Consumer actors . * @ param eventOutcome The event outcome indicator * @ param repositoryEndpointUri The Web service endpoint URI for the SVS repository * @ param valueSetUniqueId unique id ( OID ) of the returned value set * @ param valueSetName name associated with the unique id ( OID ) of the returned value set * @ param valueSetVersion version of the returned value set * @ param purposesOfUse purpose of use codes ( may be taken from XUA token ) * @ param userRoles roles of the human user ( may be taken from XUA token ) */ public void auditRetrieveValueSetEvent ( RFC3881EventOutcomeCodes eventOutcome , String repositoryEndpointUri , String valueSetUniqueId , String valueSetName , String valueSetVersion , List < CodedValueType > purposesOfUse , List < CodedValueType > userRoles ) { } }
if ( ! isAuditorEnabled ( ) ) { return ; } ImportEvent importEvent = new ImportEvent ( false , eventOutcome , new IHETransactionEventTypeCodes . RetrieveValueSet ( ) , purposesOfUse ) ; importEvent . setAuditSourceId ( getAuditSourceId ( ) , getAuditEnterpriseSiteId ( ) ) ; importEvent . addSourceActiveParticipant ( EventUtils . getAddressForUrl ( repositoryEndpointUri , false ) , null , null , EventUtils . getAddressForUrl ( repositoryEndpointUri , false ) , false ) ; importEvent . addDestinationActiveParticipant ( getSystemUserId ( ) , getSystemAltUserId ( ) , getSystemUserName ( ) , getSystemNetworkId ( ) , true ) ; if ( ! EventUtils . isEmptyOrNull ( getHumanRequestor ( ) ) ) { importEvent . addHumanRequestorActiveParticipant ( getHumanRequestor ( ) , null , null , userRoles ) ; } importEvent . addValueSetParticipantObject ( valueSetUniqueId , valueSetName , valueSetVersion ) ; audit ( importEvent ) ;
public class DSetImpl { /** * Determine whether this set is a proper subset of the set referenced by * < code > otherSet < / code > . * @ paramotherSetAnother set . * @ return True if this set is a proper subset of the set referenced by * < code > otherSet < / code > , otherwise false . */ public boolean properSubsetOf ( org . odmg . DSet otherSet ) { } }
return ( this . size ( ) > 0 && this . size ( ) < otherSet . size ( ) && this . subsetOf ( otherSet ) ) ;
public class vlan { /** * Use this API to fetch filtered set of vlan resources . * filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */ public static vlan [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
vlan obj = new vlan ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; vlan [ ] response = ( vlan [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class AlphabeticIndex { /** * Return the string with interspersed CGJs . Input must have more than 2 codepoints . * < p > This is used to test whether contractions sort differently from their components . */ private String separated ( String item ) { } }
StringBuilder result = new StringBuilder ( ) ; // add a CGJ except within surrogates char last = item . charAt ( 0 ) ; result . append ( last ) ; for ( int i = 1 ; i < item . length ( ) ; ++ i ) { char ch = item . charAt ( i ) ; if ( ! UCharacter . isHighSurrogate ( last ) || ! UCharacter . isLowSurrogate ( ch ) ) { result . append ( CGJ ) ; } result . append ( ch ) ; last = ch ; } return result . toString ( ) ;
public class InterconnectMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Interconnect interconnect , ProtocolMarshaller protocolMarshaller ) { } }
if ( interconnect == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( interconnect . getInterconnectId ( ) , INTERCONNECTID_BINDING ) ; protocolMarshaller . marshall ( interconnect . getInterconnectName ( ) , INTERCONNECTNAME_BINDING ) ; protocolMarshaller . marshall ( interconnect . getInterconnectState ( ) , INTERCONNECTSTATE_BINDING ) ; protocolMarshaller . marshall ( interconnect . getRegion ( ) , REGION_BINDING ) ; protocolMarshaller . marshall ( interconnect . getLocation ( ) , LOCATION_BINDING ) ; protocolMarshaller . marshall ( interconnect . getBandwidth ( ) , BANDWIDTH_BINDING ) ; protocolMarshaller . marshall ( interconnect . getLoaIssueTime ( ) , LOAISSUETIME_BINDING ) ; protocolMarshaller . marshall ( interconnect . getLagId ( ) , LAGID_BINDING ) ; protocolMarshaller . marshall ( interconnect . getAwsDevice ( ) , AWSDEVICE_BINDING ) ; protocolMarshaller . marshall ( interconnect . getJumboFrameCapable ( ) , JUMBOFRAMECAPABLE_BINDING ) ; protocolMarshaller . marshall ( interconnect . getAwsDeviceV2 ( ) , AWSDEVICEV2_BINDING ) ; protocolMarshaller . marshall ( interconnect . getHasLogicalRedundancy ( ) , HASLOGICALREDUNDANCY_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class BufferUtil { /** * 读取剩余部分bytes < br > * @ param buffer ByteBuffer * @ return bytes */ public static byte [ ] readBytes ( ByteBuffer buffer ) { } }
final int remaining = buffer . remaining ( ) ; byte [ ] ab = new byte [ remaining ] ; buffer . get ( ab ) ; return ab ;
public class JobAgentsInner { /** * Creates or updates a job agent . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal . * @ param serverName The name of the server . * @ param jobAgentName The name of the job agent to be created or updated . * @ param parameters The requested job agent resource state . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < JobAgentInner > createOrUpdateAsync ( String resourceGroupName , String serverName , String jobAgentName , JobAgentInner parameters , final ServiceCallback < JobAgentInner > serviceCallback ) { } }
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , jobAgentName , parameters ) , serviceCallback ) ;
public class ProtobufHelper { /** * 加载protobuf接口里方法的参数和返回值类型到缓存 , 不需要传递 * @ param key 缓存的key * @ param clazz 接口名 * @ param methodName 方法名 */ private void loadProtoClassToCache ( String key , Class clazz , String methodName ) { } }
Method pbMethod = null ; Method [ ] methods = clazz . getMethods ( ) ; for ( Method method : methods ) { if ( methodName . equals ( method . getName ( ) ) ) { pbMethod = method ; break ; } } if ( pbMethod == null ) { throw new SofaRpcRuntimeException ( "Cannot found protobuf method: " + clazz . getName ( ) + "." + methodName ) ; } Class [ ] parameterTypes = pbMethod . getParameterTypes ( ) ; if ( parameterTypes == null || parameterTypes . length != 1 || isProtoBufMessageObject ( parameterTypes [ 0 ] ) ) { throw new SofaRpcRuntimeException ( "class based protobuf: " + clazz . getName ( ) + ", only support one protobuf parameter!" ) ; } Class reqClass = parameterTypes [ 0 ] ; requestClassCache . put ( key , reqClass ) ; Class resClass = pbMethod . getReturnType ( ) ; if ( resClass == void . class || ! isProtoBufMessageClass ( resClass ) ) { throw new SofaRpcRuntimeException ( "class based protobuf: " + clazz . getName ( ) + ", only support return protobuf message!" ) ; } responseClassCache . put ( key , resClass ) ;
public class GetDocumentRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetDocumentRequest getDocumentRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getDocumentRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDocumentRequest . getAuthenticationToken ( ) , AUTHENTICATIONTOKEN_BINDING ) ; protocolMarshaller . marshall ( getDocumentRequest . getDocumentId ( ) , DOCUMENTID_BINDING ) ; protocolMarshaller . marshall ( getDocumentRequest . getIncludeCustomMetadata ( ) , INCLUDECUSTOMMETADATA_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class ZWaveController { /** * Handles incoming Send Data Request . Send Data request are used * to acknowledge or cancel failed messages . * @ param incomingMessage the request message to process . */ private void handleSendDataRequest ( SerialMessage incomingMessage ) { } }
logger . trace ( "Handle Message Send Data Request" ) ; int callbackId = incomingMessage . getMessagePayloadByte ( 0 ) ; TransmissionState status = TransmissionState . getTransmissionState ( incomingMessage . getMessagePayloadByte ( 1 ) ) ; SerialMessage originalMessage = this . lastSentMessage ; if ( status == null ) { logger . warn ( "Transmission state not found, ignoring." ) ; return ; } logger . debug ( "CallBack ID = {}" , callbackId ) ; logger . debug ( String . format ( "Status = %s (0x%02x)" , status . getLabel ( ) , status . getKey ( ) ) ) ; if ( originalMessage == null || originalMessage . getCallbackId ( ) != callbackId ) { logger . warn ( "Already processed another send data request for this callback Id, ignoring." ) ; return ; } switch ( status ) { case COMPLETE_OK : ZWaveNode node = this . getNode ( originalMessage . getMessageNode ( ) ) ; node . resetResendCount ( ) ; // in case we received a ping response and the node is alive , we proceed with the next node stage for this node . if ( node != null && node . getNodeStage ( ) == NodeStage . NODEBUILDINFO_PING ) { node . advanceNodeStage ( ) ; } if ( incomingMessage . getMessageClass ( ) == originalMessage . getExpectedReply ( ) && ! incomingMessage . isTransActionCanceled ( ) ) { notifyEventListeners ( new ZWaveEvent ( ZWaveEventType . TRANSACTION_COMPLETED_EVENT , this . lastSentMessage . getMessageNode ( ) , 1 , this . lastSentMessage ) ) ; transactionCompleted . release ( ) ; logger . trace ( "Released. Transaction completed permit count -> {}" , transactionCompleted . availablePermits ( ) ) ; } return ; case COMPLETE_NO_ACK : case COMPLETE_FAIL : case COMPLETE_NOT_IDLE : case COMPLETE_NOROUTE : try { handleFailedSendDataRequest ( originalMessage ) ; } finally { transactionCompleted . release ( ) ; logger . trace ( "Released. Transaction completed permit count -> {}" , transactionCompleted . availablePermits ( ) ) ; } default : }
public class JavaDocAnalyzer { /** * This is a best - effort approach combining only the simple types . * @ see JavaDocParserVisitor # calculateMethodIdentifier ( MethodDeclaration ) */ private boolean equalsSimpleTypeNames ( MethodIdentifier identifier , MethodResult methodResult ) { } }
MethodIdentifier originalIdentifier = methodResult . getOriginalMethodSignature ( ) ; return originalIdentifier . getMethodName ( ) . equals ( identifier . getMethodName ( ) ) && matchesTypeBestEffort ( originalIdentifier . getReturnType ( ) , identifier . getReturnType ( ) ) && parameterMatch ( originalIdentifier . getParameters ( ) , identifier . getParameters ( ) ) ;
public class JBBPUtils { /** * Remove trailing zeros from string . * @ param str the string to be trimmed * @ return the result string without left extra zeros , or null if argument is * null * @ since 1.1 */ public static String removeTrailingZeros ( final String str ) { } }
String result = str ; if ( str != null && str . length ( ) != 0 ) { int endIndex = str . length ( ) ; while ( endIndex > 1 ) { final char ch = str . charAt ( endIndex - 1 ) ; if ( ch != '0' ) { break ; } endIndex -- ; } if ( endIndex < str . length ( ) ) { result = str . substring ( 0 , endIndex ) ; } } return result ;
public class CommercePriceListUserSegmentEntryRelUtil { /** * Returns the last commerce price list user segment entry rel in the ordered set where uuid = & # 63 ; . * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching commerce price list user segment entry rel , or < code > null < / code > if a matching commerce price list user segment entry rel could not be found */ public static CommercePriceListUserSegmentEntryRel fetchByUuid_Last ( String uuid , OrderByComparator < CommercePriceListUserSegmentEntryRel > orderByComparator ) { } }
return getPersistence ( ) . fetchByUuid_Last ( uuid , orderByComparator ) ;
public class ConcurrentStack { /** * peek at the top of the stack * @ return N - the object at the top of the stack */ @ Override public final N peek ( ) { } }
// read the current cursor int spin = 0 ; for ( ; ; ) { final long readLock = seqLock . readLock ( ) ; final int stackTop = this . stackTop . get ( ) ; if ( stackTop > 0 ) { final N n = stack . get ( stackTop - 1 ) ; if ( seqLock . readLockHeld ( readLock ) ) { return n ; } // else loop again } else { return null ; } spin = Condition . progressiveYield ( spin ) ; }
public class Computer { /** * @ deprecated Implementation of CLI command " offline - node " moved to { @ link hudson . cli . OfflineNodeCommand } . * @ param cause * Record the note about why you are disconnecting this node */ @ Deprecated public void cliOffline ( String cause ) throws ExecutionException , InterruptedException { } }
checkPermission ( DISCONNECT ) ; setTemporarilyOffline ( true , new ByCLI ( cause ) ) ;
public class MaybeT { /** * { @ inheritDoc } */ @ Override public < B > MaybeT < M , B > zip ( Applicative < Function < ? super A , ? extends B > , MonadT < M , Maybe < ? > , ? > > appFn ) { } }
return MonadT . super . zip ( appFn ) . coerce ( ) ;
public class RequireUtil { /** * Determines if this class may be used in the current runtime environment . * Fathom settings are considered as well as runtime modes . * @ param settings * @ param aClass * @ return true if the class may be used */ public static boolean allowClass ( Settings settings , Class < ? > aClass ) { } }
// Settings - based class exclusions / inclusions if ( aClass . isAnnotationPresent ( RequireSettings . class ) ) { // multiple keys required RequireSetting [ ] requireSettings = aClass . getAnnotation ( RequireSettings . class ) . value ( ) ; StringJoiner joiner = new StringJoiner ( ", " ) ; Arrays . asList ( requireSettings ) . forEach ( ( require ) -> { if ( ! settings . hasSetting ( require . value ( ) ) ) { joiner . add ( require . value ( ) ) ; } } ) ; String requiredSettings = joiner . toString ( ) ; if ( ! requiredSettings . isEmpty ( ) ) { log . warn ( "skipping {}, it requires the following {} mode settings: {}" , aClass . getName ( ) , settings . getMode ( ) , requiredSettings ) ; return false ; }
public class RuleUtils { /** * Gets the string representation of an element . * @ param element * the element to be planified to a string * @ return the element as a string */ public static String getElementAsString ( Element element ) { } }
StringBuilder sb = new StringBuilder ( ) ; if ( element . isNegated ( ) != null && element . isNegated ( ) . booleanValue ( ) ) { sb . append ( "~" ) ; } int masks = element . getMask ( ) . size ( ) ; if ( masks > 1 ) { sb . append ( "(" ) ; } int maskCounter = 0 ; for ( Mask mask : element . getMask ( ) ) { // Encloses lexemes between quotes . if ( mask . getLexemeMask ( ) != null ) { sb . append ( "\"" ) . append ( mask . getLexemeMask ( ) ) . append ( "\"" ) ; } else if ( mask . getPrimitiveMask ( ) != null ) { // Primitives are enclosed between curly brackets . sb . append ( "{" ) . append ( mask . getPrimitiveMask ( ) ) . append ( "}" ) ; } else if ( mask . getTagMask ( ) != null ) { sb . append ( getTagMaskAsString ( mask . getTagMask ( ) ) ) ; } else if ( mask . getTagReference ( ) != null ) { sb . append ( getTagReferenceAsString ( mask . getTagReference ( ) ) ) ; } if ( maskCounter < masks - 1 ) { sb . append ( "|" ) ; } maskCounter ++ ; } if ( masks > 1 ) { sb . append ( ")" ) ; } return sb . toString ( ) ;
public class SemEvalContextExtractor { /** * { @ inheritDoc } */ public void processDocument ( BufferedReader document , Wordsi wordsi ) { } }
Queue < String > prevWords = new ArrayDeque < String > ( ) ; Queue < String > nextWords = new ArrayDeque < String > ( ) ; Iterator < String > it = IteratorFactory . tokenizeOrdered ( document ) ; // Skip empty documents . if ( ! it . hasNext ( ) ) return ; String instanceId = it . next ( ) ; // Fill up the words after the context so that when the real processing // starts , the context is fully prepared . for ( int i = 0 ; it . hasNext ( ) ; ++ i ) { String term = it . next ( ) ; if ( term . equals ( separator ) ) break ; prevWords . offer ( term . intern ( ) ) ; } // Eliminate the first set of words that we don ' t want to inspect . while ( prevWords . size ( ) > windowSize ) prevWords . remove ( ) ; // It ' s possible that the SenseEval / SemEval parser failed to find the // focus word . For these cases , skip the context . if ( ! it . hasNext ( ) ) return ; String focusWord = it . next ( ) . intern ( ) ; // Extract the set of words to consider after the focus word . while ( it . hasNext ( ) && nextWords . size ( ) < windowSize ) nextWords . offer ( it . next ( ) . intern ( ) ) ; // Create the context vector and have wordsi handle it . SparseDoubleVector contextVector = generator . generateContext ( prevWords , nextWords ) ; wordsi . handleContextVector ( focusWord , instanceId , contextVector ) ;
public class Schedulers { /** * Schedule . * @ param trigger the trigger * @ param task the task * @ return the string */ public String schedule ( Trigger trigger , Runnable task ) { } }
ScheduledFuture < ? > future = getCurrentScheduler ( ) . schedule ( task , trigger ) ; String id = Schedulers . getUUID ( ) ; runningSchedullers . put ( id , future ) ; Schedulers . increaseNoOfRunningSchedullers ( ) ; setCurrentScheduler ( null ) ; return id ;
public class EntityBeanTypeImpl { /** * If not already created , a new < code > message - destination - ref < / code > element will be created and returned . * Otherwise , the first existing < code > message - destination - ref < / code > element will be returned . * @ return the instance defined for the element < code > message - destination - ref < / code > */ public MessageDestinationRefType < EntityBeanType < T > > getOrCreateMessageDestinationRef ( ) { } }
List < Node > nodeList = childNode . get ( "message-destination-ref" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new MessageDestinationRefTypeImpl < EntityBeanType < T > > ( this , "message-destination-ref" , childNode , nodeList . get ( 0 ) ) ; } return createMessageDestinationRef ( ) ;
public class SchemaToJava { /** * Create the output file for the generated code along with all intervening directories */ private static File makeOutputFile ( String outputDir , String packageName , String className ) throws IOException { } }
// Convert the package name to a path Pattern pattern = Pattern . compile ( "\\." ) ; Matcher matcher = pattern . matcher ( packageName ) ; String sepToUse = File . separator ; if ( sepToUse . equals ( "\\" ) ) { sepToUse = "\\\\" ; } // Try to create the necessary directories String directoryPath = outputDir + File . separator + matcher . replaceAll ( sepToUse ) ; File directory = new File ( directoryPath ) ; File outputFile = new File ( directory , className + ".java" ) ; LOG . debug ( String . format ( "Attempting to create output file at %1$s" , outputFile . getAbsolutePath ( ) ) ) ; try { directory . mkdirs ( ) ; outputFile . createNewFile ( ) ; } catch ( SecurityException se ) { throw new IOException ( String . format ( "Can't write to output file %1$s" , outputFile . getAbsoluteFile ( ) ) , se ) ; } catch ( IOException ioe ) { throw new IOException ( String . format ( "Can't write to output file %1$s" , outputFile . getAbsoluteFile ( ) ) , ioe ) ; } return outputFile ;
public class StructrLicenseManager { /** * - - - - - private static methods - - - - - */ public static String collectLicenseFieldsForSignature ( final Map < String , String > properties ) { } }
final StringBuilder buf = new StringBuilder ( ) ; buf . append ( properties . get ( NameKey ) ) ; buf . append ( properties . get ( DateKey ) ) ; buf . append ( properties . get ( StartKey ) ) ; buf . append ( properties . get ( EndKey ) ) ; buf . append ( properties . get ( EditionKey ) ) ; buf . append ( properties . get ( ModulesKey ) ) ; buf . append ( properties . get ( MachineKey ) ) ; // optional values final String servers = properties . get ( ServersKey ) ; if ( StringUtils . isNotBlank ( servers ) ) { buf . append ( servers ) ; } final String users = properties . get ( UsersKey ) ; if ( StringUtils . isNotBlank ( users ) ) { buf . append ( users ) ; } return buf . toString ( ) ;
public class ProvFactory { /** * ( non - Javadoc ) * @ see org . openprovenance . prov . model . ModelConstructor # newWasInfluencedBy ( org . openprovenance . prov . model . QualifiedName , org . openprovenance . prov . model . QualifiedName , org . openprovenance . prov . model . QualifiedName , java . util . Collection ) */ public WasInfluencedBy newWasInfluencedBy ( QualifiedName id , QualifiedName influencee , QualifiedName influencer , Collection < Attribute > attributes ) { } }
WasInfluencedBy res = newWasInfluencedBy ( id , influencee , influencer ) ; setAttributes ( res , attributes ) ; return res ;
public class Query { /** * < pre > * { field : < field > , op : < op > , rvalue : < value > } * { field : < field > , op : < op > , values : [ values ] } * < / pre > */ public static Query withValue ( String expression ) { } }
String [ ] parts = split ( expression ) ; if ( parts != null ) { String field = parts [ 0 ] ; String operator = parts [ 1 ] ; String value = parts [ 2 ] ; BinOp binOp = BinOp . getOp ( operator ) ; if ( binOp != null ) { return withValue ( field , binOp , value ) ; } NaryOp naryOp = NaryOp . getOp ( operator ) ; if ( naryOp != null ) { Literal [ ] values = Literal . values ( value . substring ( 1 , value . length ( ) - 1 ) . split ( "\\s*,\\s*" ) ) ; return withValues ( field , naryOp , values ) ; } } throw new IllegalArgumentException ( "'" + expression + "' is incorrect" ) ;
public class ProviderConfigurationSupport { /** * Creates a BeanDefinition for a provider connection factory . * Although most providers will not need to override this method , it does allow for overriding to address any provider - specific needs . * @ param appId The application ' s App ID * @ param appSecret The application ' s App Secret * @ param allAttributes All attributes available on the configuration element . Useful for provider - specific configuration . * @ return a BeanDefinition for the provider ' s connection factory bean . */ protected BeanDefinition getConnectionFactoryBeanDefinition ( String appId , String appSecret , Map < String , Object > allAttributes ) { } }
return BeanDefinitionBuilder . genericBeanDefinition ( connectionFactoryClass ) . addConstructorArgValue ( appId ) . addConstructorArgValue ( appSecret ) . getBeanDefinition ( ) ;
public class DefaultDiscoveryService { /** * ~ Methods * * * * * */ @ Override public List < MetricSchemaRecord > filterRecords ( SchemaQuery query ) { } }
requireNotDisposed ( ) ; _logger . debug ( query . toString ( ) ) ; if ( query instanceof MetricSchemaRecordQuery ) { long start = System . nanoTime ( ) ; List < MetricSchemaRecord > result = _schemaService . get ( MetricSchemaRecordQuery . class . cast ( query ) ) ; _logger . debug ( "Time to filter records in ms: " + ( System . nanoTime ( ) - start ) / 1000000 ) ; return result ; } else { long start = System . nanoTime ( ) ; List < MetricSchemaRecord > result = _schemaService . keywordSearch ( KeywordQuery . class . cast ( query ) ) ; _logger . debug ( "Time to filter records in ms: " + ( System . nanoTime ( ) - start ) / 1000000 ) ; return result ; }
public class StateDP { /** * iteration not synchronized */ private void checkGAs ( List l ) { } }
for ( final Iterator i = l . iterator ( ) ; i . hasNext ( ) ; ) if ( ! ( i . next ( ) instanceof GroupAddress ) ) throw new KNXIllegalArgumentException ( "not a group address list" ) ;
public class CmsToolbarElementInfoButton { /** * Changes the " changed " state of the button . < p > * @ param changed the new value for the " changed " state */ public void setChanged ( boolean changed ) { } }
m_changedStyleVar . setValue ( changed ? I_CmsToolbarButtonLayoutBundle . INSTANCE . toolbarButtonCss ( ) . elementInfoChanged ( ) : I_CmsToolbarButtonLayoutBundle . INSTANCE . toolbarButtonCss ( ) . elementInfoUnchanged ( ) ) ;
public class CmsADEConfigData { /** * Returns all available display formatters . < p > * @ param cms the cms context * @ return the available display formatters */ public List < I_CmsFormatterBean > getDisplayFormatters ( CmsObject cms ) { } }
List < I_CmsFormatterBean > result = new ArrayList < I_CmsFormatterBean > ( ) ; for ( I_CmsFormatterBean formatter : getCachedFormatters ( ) . getFormatters ( ) . values ( ) ) { if ( formatter . isDisplayFormatter ( ) ) { result . add ( formatter ) ; } } return result ;
public class CustomButton { /** * 初始化左右角设定 */ private void initCorner ( ) { } }
switch ( mCornerSide ) { case CORNER_NONE : mRightCorner = CORNER_NONE ; mLeftCorner = CORNER_NONE ; mBottomCorner = CORNER_NONE ; mTopCorner = CORNER_NONE ; break ; case CORNER_LEFT : // 只设定了左边角时 , 右边角为none mRightCorner = CORNER_NONE ; mBottomCorner = CORNER_NONE ; mTopCorner = CORNER_NONE ; break ; case CORNER_RIGHT : // 只设定了右边角时 , 左边角为none mLeftCorner = CORNER_NONE ; mBottomCorner = CORNER_NONE ; mTopCorner = CORNER_NONE ; break ; case CORNER_LEFT_RIGHT : mBottomCorner = CORNER_NONE ; mTopCorner = CORNER_NONE ; break ; case CORNER_BOTTOM : mLeftCorner = CORNER_NONE ; mRightCorner = CORNER_NONE ; mTopCorner = CORNER_NONE ; break ; case CORNER_TOP : mBottomCorner = CORNER_NONE ; mLeftCorner = CORNER_NONE ; mRightCorner = CORNER_NONE ; break ; }
public class NullAway { /** * Returns the computed nullness information from an expression . If none is available , it returns * Nullable . * < p > Computed information can be added by handlers or by the core , and should supersede that * comming from annotations . * < p > The default value of an expression without additional computed nullness information is * always Nullable , since this method should only be called when the fact that the expression is * NonNull is not clear from looking at annotations . * @ param e an expression * @ return computed nullness for e , if any , else Nullable */ public Nullness getComputedNullness ( ExpressionTree e ) { } }
if ( computedNullnessMap . containsKey ( e ) ) { return computedNullnessMap . get ( e ) ; } else { return Nullness . NULLABLE ; }
public class AllianceApi { /** * Get alliance information ( asynchronously ) Public information about an * alliance - - - This route is cached for up to 3600 seconds * @ param allianceId * An EVE alliance ID ( required ) * @ param datasource * The server name you would like data from ( optional , default to * tranquility ) * @ param ifNoneMatch * ETag from a previous request . A 304 will be returned if this * matches the current ETag ( optional ) * @ param callback * The callback to be executed when the API call finishes * @ return The request call * @ throws ApiException * If fail to process the API call , e . g . serializing the request * body object */ public com . squareup . okhttp . Call getAlliancesAllianceIdAsync ( Integer allianceId , String datasource , String ifNoneMatch , final ApiCallback < AllianceResponse > callback ) throws ApiException { } }
com . squareup . okhttp . Call call = getAlliancesAllianceIdValidateBeforeCall ( allianceId , datasource , ifNoneMatch , callback ) ; Type localVarReturnType = new TypeToken < AllianceResponse > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return call ;
public class EditableNamespaceContext { /** * Gets the namespace bindings . */ @ Override public Set < java . util . Map . Entry < String , String > > entrySet ( ) { } }
return bindings . entrySet ( ) ;
public class ProxyConfiguration { /** * The set of network configuration parameters to provide the Container Network Interface ( CNI ) plugin , specified as * key - value pairs . * < ul > * < li > * < code > IgnoredUID < / code > - ( Required ) The user ID ( UID ) of the proxy container as defined by the < code > user < / code > * parameter in a container definition . This is used to ensure the proxy ignores its own traffic . If * < code > IgnoredGID < / code > is specified , this field can be empty . * < / li > * < li > * < code > IgnoredGID < / code > - ( Required ) The group ID ( GID ) of the proxy container as defined by the * < code > user < / code > parameter in a container definition . This is used to ensure the proxy ignores its own traffic . * If < code > IgnoredGID < / code > is specified , this field can be empty . * < / li > * < li > * < code > AppPorts < / code > - ( Required ) The list of ports that the application uses . Network traffic to these ports is * forwarded to the < code > ProxyIngressPort < / code > and < code > ProxyEgressPort < / code > . * < / li > * < li > * < code > ProxyIngressPort < / code > - ( Required ) Specifies the port that incoming traffic to the < code > AppPorts < / code > * is directed to . * < / li > * < li > * < code > ProxyEgressPort < / code > - ( Required ) Specifies the port that outgoing traffic from the < code > AppPorts < / code > * is directed to . * < / li > * < li > * < code > EgressIgnoredPorts < / code > - ( Required ) The egress traffic going to the specified ports is ignored and not * redirected to the < code > ProxyEgressPort < / code > . It can be an empty list . * < / li > * < li > * < code > EgressIgnoredIPs < / code > - ( Required ) The egress traffic going to the specified IP addresses is ignored and * not redirected to the < code > ProxyEgressPort < / code > . It can be an empty list . * < / li > * < / ul > * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setProperties ( java . util . Collection ) } or { @ link # withProperties ( java . util . Collection ) } if you want to * override the existing values . * @ param properties * The set of network configuration parameters to provide the Container Network Interface ( CNI ) plugin , * specified as key - value pairs . < / p > * < ul > * < li > * < code > IgnoredUID < / code > - ( Required ) The user ID ( UID ) of the proxy container as defined by the * < code > user < / code > parameter in a container definition . This is used to ensure the proxy ignores its own * traffic . If < code > IgnoredGID < / code > is specified , this field can be empty . * < / li > * < li > * < code > IgnoredGID < / code > - ( Required ) The group ID ( GID ) of the proxy container as defined by the * < code > user < / code > parameter in a container definition . This is used to ensure the proxy ignores its own * traffic . If < code > IgnoredGID < / code > is specified , this field can be empty . * < / li > * < li > * < code > AppPorts < / code > - ( Required ) The list of ports that the application uses . Network traffic to these * ports is forwarded to the < code > ProxyIngressPort < / code > and < code > ProxyEgressPort < / code > . * < / li > * < li > * < code > ProxyIngressPort < / code > - ( Required ) Specifies the port that incoming traffic to the * < code > AppPorts < / code > is directed to . * < / li > * < li > * < code > ProxyEgressPort < / code > - ( Required ) Specifies the port that outgoing traffic from the * < code > AppPorts < / code > is directed to . * < / li > * < li > * < code > EgressIgnoredPorts < / code > - ( Required ) The egress traffic going to the specified ports is ignored * and not redirected to the < code > ProxyEgressPort < / code > . It can be an empty list . * < / li > * < li > * < code > EgressIgnoredIPs < / code > - ( Required ) The egress traffic going to the specified IP addresses is * ignored and not redirected to the < code > ProxyEgressPort < / code > . It can be an empty list . * < / li > * @ return Returns a reference to this object so that method calls can be chained together . */ public ProxyConfiguration withProperties ( KeyValuePair ... properties ) { } }
if ( this . properties == null ) { setProperties ( new com . amazonaws . internal . SdkInternalList < KeyValuePair > ( properties . length ) ) ; } for ( KeyValuePair ele : properties ) { this . properties . add ( ele ) ; } return this ;
public class VoldemortBuildAndPushJob { /** * Check if all cluster objects in the list are congruent . * @ param clusterUrls of cluster objects * @ return */ private void allClustersEqual ( final List < String > clusterUrls ) { } }
Validate . notEmpty ( clusterUrls , "clusterUrls cannot be null" ) ; // If only one clusterUrl return immediately if ( clusterUrls . size ( ) == 1 ) return ; AdminClient adminClientLhs = adminClientPerCluster . get ( clusterUrls . get ( 0 ) ) ; Cluster clusterLhs = adminClientLhs . getAdminClientCluster ( ) ; for ( int index = 1 ; index < clusterUrls . size ( ) ; index ++ ) { AdminClient adminClientRhs = adminClientPerCluster . get ( clusterUrls . get ( index ) ) ; Cluster clusterRhs = adminClientRhs . getAdminClientCluster ( ) ; if ( ! areTwoClustersEqual ( clusterLhs , clusterRhs ) ) throw new VoldemortException ( "Cluster " + clusterLhs . getName ( ) + " is not the same as " + clusterRhs . getName ( ) ) ; }
public class DirectMetaProperty { /** * Factory to create a write - only meta - property avoiding duplicate generics . * @ param < P > the property type * @ param metaBean the meta - bean , not null * @ param propertyName the property name , not empty * @ param declaringType the type declaring the property , not null * @ param propertyType the property type , not null * @ return the property , not null */ public static < P > DirectMetaProperty < P > ofWriteOnly ( MetaBean metaBean , String propertyName , Class < ? > declaringType , Class < P > propertyType ) { } }
Field field = findField ( metaBean , propertyName ) ; return new DirectMetaProperty < > ( metaBean , propertyName , declaringType , propertyType , PropertyStyle . WRITE_ONLY , field ) ;
public class SSLServerSocketChannel { /** * Creates and binds SSLServerSocketChannel using given SSLContext . * @ param port * @ param sslContext * @ return * @ throws IOException */ public static SSLServerSocketChannel open ( int port , SSLContext sslContext ) throws IOException { } }
return open ( new InetSocketAddress ( port ) , sslContext ) ;
public class InvocationContext { /** * Don ' t use this method . It is terribly unsafe and was written by a lazy engineer . */ @ Deprecated public void putAllParameters ( ) { } }
Enumeration < ? > e = _req . getParameterNames ( ) ; while ( e . hasMoreElements ( ) ) { String param = ( String ) e . nextElement ( ) ; put ( param , _req . getParameter ( param ) ) ; }
public class CommerceSubscriptionEntryPersistenceImpl { /** * Returns the commerce subscription entries before and after the current commerce subscription entry in the ordered set where subscriptionStatus = & # 63 ; . * @ param commerceSubscriptionEntryId the primary key of the current commerce subscription entry * @ param subscriptionStatus the subscription status * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the previous , current , and next commerce subscription entry * @ throws NoSuchSubscriptionEntryException if a commerce subscription entry with the primary key could not be found */ @ Override public CommerceSubscriptionEntry [ ] findBySubscriptionStatus_PrevAndNext ( long commerceSubscriptionEntryId , int subscriptionStatus , OrderByComparator < CommerceSubscriptionEntry > orderByComparator ) throws NoSuchSubscriptionEntryException { } }
CommerceSubscriptionEntry commerceSubscriptionEntry = findByPrimaryKey ( commerceSubscriptionEntryId ) ; Session session = null ; try { session = openSession ( ) ; CommerceSubscriptionEntry [ ] array = new CommerceSubscriptionEntryImpl [ 3 ] ; array [ 0 ] = getBySubscriptionStatus_PrevAndNext ( session , commerceSubscriptionEntry , subscriptionStatus , orderByComparator , true ) ; array [ 1 ] = commerceSubscriptionEntry ; array [ 2 ] = getBySubscriptionStatus_PrevAndNext ( session , commerceSubscriptionEntry , subscriptionStatus , orderByComparator , false ) ; return array ; } catch ( Exception e ) { throw processException ( e ) ; } finally { closeSession ( session ) ; }