signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class CmsDriverManager { /** * Returns all projects which are owned by the current user or which are manageable * for the group of the user . < p > * @ param dbc the current database context * @ param orgUnit the organizational unit to search project in * @ param includeSubOus if to include sub organizat...
Set < CmsProject > projects = new HashSet < CmsProject > ( ) ; // get the ous where the user has the project manager role List < CmsOrganizationalUnit > ous = getOrgUnitsForRole ( dbc , CmsRole . PROJECT_MANAGER . forOrgUnit ( orgUnit . getName ( ) ) , includeSubOus ) ; // get the groups of the user if needed Set < Cms...
public class ISPNQuotaPersister { /** * { @ inheritDoc } */ public void clearWorkspaceData ( String repositoryName , String workspaceName ) throws BackupException { } }
String workspaceUniqueName = composeWorkspaceUniqueName ( repositoryName , workspaceName ) ; for ( Serializable cacheKey : cache . keySet ( ) ) { if ( cacheKey instanceof WorkspaceBasedKey ) { if ( workspaceUniqueName . equals ( ( ( WorkspaceBasedKey ) cacheKey ) . getWorkspaceUniqueName ( ) ) ) { cache . remove ( cach...
public class Client { /** * Generates an access token for a user * @ param userId * Id of the user * @ param expiresIn * Set the duration of the token in seconds . ( default : 259200 seconds = 72h ) * 72 hours is the max value . * @ param reusable * Defines if the token reusable . ( default : false ) If s...
cleanError ( ) ; prepareToken ( ) ; OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient ( ) ; OAuthClient oAuthClient = new OAuthClient ( httpClient ) ; URIBuilder url = new URIBuilder ( settings . getURL ( Constants . GENERATE_MFA_TOKEN_URL , Long . toString ( userId ) ) ) ; OAuthClientRequest bea...
public class SignMessage { /** * Internal function used in creating a SignMessage object from a byte string . * @ param obj COSE _ Sign encoded object . * @ throws CoseException Errors generated by the COSE module */ @ Override protected void DecodeFromCBORObject ( CBORObject obj ) throws CoseException { } }
if ( obj . size ( ) != 4 ) throw new CoseException ( "Invalid SignMessage structure" ) ; if ( obj . get ( 0 ) . getType ( ) == CBORType . ByteString ) { rgbProtected = obj . get ( 0 ) . GetByteString ( ) ; if ( obj . get ( 0 ) . GetByteString ( ) . length == 0 ) { objProtected = CBORObject . NewMap ( ) ; } else { objPr...
public class CheckerModel { /** * { @ inheritDoc } */ @ Override protected void initModel ( ) { } }
LOGGER . debug ( "Init Sample Model" ) ; // Initialize default values object ( ) . sourcePath ( new File ( ComparisonParameters . sourcePath . get ( ) ) ) . targetPath ( new File ( ComparisonParameters . targetPath . get ( ) ) ) . missing ( false ) . newer ( false ) . upgraded ( false ) . downgraded ( false ) ; this . ...
public class StorePackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getModelMergerPluginConfiguration ( ) { } }
if ( modelMergerPluginConfigurationEClass == null ) { modelMergerPluginConfigurationEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( StorePackage . eNS_URI ) . getEClassifiers ( ) . get ( 52 ) ; } return modelMergerPluginConfigurationEClass ;
public class IconAwesome { /** * Use the free brand font of FontAwesome 5 . As a side effect , every FontAwesome icon on the same page is switched to FontAwesome 5.2.0 . By default , the icon set is the older version 4.7.0 . < P > * Usually this method is called internally by the JSF engine . */ public void setBrand ...
if ( _brand ) { AddResourcesListener . setFontAwesomeVersion ( 5 , this ) ; } getStateHelper ( ) . put ( PropertyKeys . brand , _brand ) ;
public class ModuleAdapterProcessor { /** * Returns a map containing all { @ code @ Provides } methods , indexed by class . */ private Map < String , List < ExecutableElement > > providerMethodsByClass ( RoundEnvironment env ) { } }
Elements elementUtils = processingEnv . getElementUtils ( ) ; Types types = processingEnv . getTypeUtils ( ) ; Map < String , List < ExecutableElement > > result = new HashMap < String , List < ExecutableElement > > ( ) ; provides : for ( Element providerMethod : findProvidesMethods ( env ) ) { switch ( providerMethod ...
public class EmbedVaadinConfig { /** * Build a url for the specified port and context . * If the < tt > httpPort < / tt > is equal to { @ link # PORT _ AUTO } , the * returned url is not used as is because no http port has been * allocated yet . * @ param httpPort the http port to use * @ param context the co...
final StringBuilder sb = new StringBuilder ( ) ; sb . append ( "http://localhost:" ) ; if ( httpPort == PORT_AUTO ) { sb . append ( "[auto]" ) ; } else { sb . append ( httpPort ) ; } sb . append ( context ) ; return sb . toString ( ) ;
public class EDBConverter { /** * Converts an OpenEngSBModel object to an EDBObject ( the version retrieving is not considered here . This is done in * the EDB directly ) . */ public List < EDBObject > convertModelToEDBObject ( Object model , ConnectorInformation info ) { } }
if ( ! OpenEngSBModel . class . isAssignableFrom ( model . getClass ( ) ) ) { throw new IllegalArgumentException ( "This function need to get a model passed" ) ; } List < EDBObject > objects = new ArrayList < > ( ) ; if ( model != null ) { convertSubModel ( ( OpenEngSBModel ) model , objects , info ) ; } return objects...
public class OtpOutputStream { /** * Write an Erlang port to the stream . * @ param node * the nodename . * @ param id * an arbitrary number . Only the low order 28 bits will be used . * @ param creation * another arbitrary number . Only the low order 2 bits will * be used . */ public void write_port ( fi...
write1 ( OtpExternal . portTag ) ; write_atom ( node ) ; write4BE ( id & 0xfffffff ) ; // 28 bits write1 ( creation & 0x3 ) ; // 2 bits
public class Log4JLogger { /** * { @ inheritDoc } */ @ Override public void debug ( String msg , Throwable throwable ) { } }
LOGGER . debug ( msg , throwable ) ;
public class CommerceAccountPersistenceImpl { /** * Returns all the commerce accounts where userId = & # 63 ; and type = & # 63 ; . * @ param userId the user ID * @ param type the type * @ return the matching commerce accounts */ @ Override public List < CommerceAccount > findByU_T ( long userId , int type ) { } ...
return findByU_T ( userId , type , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class TreeInfo { /** * The position of the first statement in a block , or the position of * the block itself if it is empty . */ public static int firstStatPos ( JCTree tree ) { } }
if ( tree . hasTag ( BLOCK ) && ( ( JCBlock ) tree ) . stats . nonEmpty ( ) ) return ( ( JCBlock ) tree ) . stats . head . pos ; else return tree . pos ;
public class RaftSemaphore { /** * Changes the number of permits by adding the given permit value . Permits * are not changed if it is a retry of a previous successful change request * of a session - aware proxy . Permits are changed again if it is a retry of * a successful change request of a sessionless proxy ....
if ( permits == 0 ) { return ReleaseResult . failed ( Collections . < AcquireInvocationKey > emptyList ( ) ) ; } Collection < AcquireInvocationKey > cancelled = cancelWaitKeys ( endpoint , invocationUid ) ; long sessionId = endpoint . sessionId ( ) ; if ( sessionId != NO_SESSION_ID ) { SessionSemaphoreState state = ses...
public class JsonTokenizer { /** * Expect a string literal JSON token . A string literal is a double - quote * delimited UTF - 8 encoded , JSON - escaped string . * @ param message Message to add to exception if there are no more JSON * tokens on the stream . * @ param symbols List of symbol characters to expec...
if ( symbols . length == 0 ) { throw new IllegalArgumentException ( "No symbols to match." ) ; } if ( ! hasNext ( ) ) { if ( symbols . length == 1 ) { throw newParseException ( "Expected %s ('%c'): Got end of file" , message , symbols [ 0 ] ) ; } throw newParseException ( "Expected %s (one of ['%s']): Got end of file" ...
public class DistinctOperator { private static < IN , K > org . apache . flink . api . common . operators . SingleInputOperator < ? , IN , ? > translateSelectorFunctionDistinct ( SelectorFunctionKeys < IN , ? > rawKeys , ReduceFunction < IN > function , TypeInformation < IN > outputType , String name , Operator < IN > ...
@ SuppressWarnings ( "unchecked" ) final SelectorFunctionKeys < IN , K > keys = ( SelectorFunctionKeys < IN , K > ) rawKeys ; TypeInformation < Tuple2 < K , IN > > typeInfoWithKey = KeyFunctions . createTypeWithKey ( keys ) ; Operator < Tuple2 < K , IN > > keyedInput = KeyFunctions . appendKeyExtractor ( input , keys )...
public class ConstructorIntrospector { /** * Finds and returns a method handle for new instance of a Builder class . * @ param clazz * the persistence class * @ return the method handle for the newBuilder / builder method */ public static MethodHandle findNewBuilderMethod ( Class < ? > clazz ) { } }
MethodHandle mh = null ; for ( String methodName : NEW_BUILDER_METHOD_NAMES ) { mh = IntrospectionUtils . findStaticMethod ( clazz , methodName , Object . class ) ; if ( mh != null ) { break ; } } return mh ;
public class TiffImage { /** * Uncompress packbits compressed image data . */ public static void decodePackbits ( byte data [ ] , byte [ ] dst ) { } }
int srcCount = 0 , dstCount = 0 ; byte repeat , b ; try { while ( dstCount < dst . length ) { b = data [ srcCount ++ ] ; if ( b >= 0 && b <= 127 ) { // literal run packet for ( int i = 0 ; i < ( b + 1 ) ; i ++ ) { dst [ dstCount ++ ] = data [ srcCount ++ ] ; } } else if ( b <= - 1 && b >= - 127 ) { // 2 byte encoded ru...
public class Type { /** * Retrieves the SQL character sequence required to ( re ) create the * trigger , as a StringBuffer * @ return the SQL character sequence required to ( re ) create the * trigger */ @ Override public String getSQL ( ) { } }
if ( userTypeModifier == null ) { throw Error . runtimeError ( ErrorCode . U_S0500 , "Type" ) ; } return userTypeModifier . getSQL ( ) ;
public class InstancesCountMarshaller { /** * Marshall the given parameter object . */ public void marshall ( InstancesCount instancesCount , ProtocolMarshaller protocolMarshaller ) { } }
if ( instancesCount == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( instancesCount . getAssigning ( ) , ASSIGNING_BINDING ) ; protocolMarshaller . marshall ( instancesCount . getBooting ( ) , BOOTING_BINDING ) ; protocolMarshaller . marsh...
public class GetDomainDetailRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetDomainDetailRequest getDomainDetailRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getDomainDetailRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDomainDetailRequest . getDomainName ( ) , DOMAINNAME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: ...
public class Snappy { /** * Zero - copy compress using memory addresses . * @ param inputAddr input memory address * @ param inputSize input byte size * @ param destAddr destination address of the compressed data * @ return the compressed data size * @ throws IOException */ public static long rawCompress ( lo...
return impl . rawCompress ( inputAddr , inputSize , destAddr ) ;
public class SipStandardService { /** * Find a sip Connector by it ' s ip address , port and transport * @ param ipAddress ip address of the connector to find * @ param port port of the connector to find * @ param transport transport of the connector to find * @ return the found sip connector or null if noting ...
Connector connectorToRemove = null ; for ( Connector connector : connectors ) { final ProtocolHandler protocolHandler = connector . getProtocolHandler ( ) ; if ( protocolHandler instanceof SipProtocolHandler ) { final SipProtocolHandler sipProtocolHandler = ( SipProtocolHandler ) protocolHandler ; if ( sipProtocolHandl...
public class FileComparer { /** * Removes similar classes in the first cs File * @ throws IOException */ public void removeSimilarClassesFromFile1 ( ) throws IOException { } }
logging . info ( "Start reding cs File" ) ; List < String > linescs1 = getFileLinesAsList ( csFile1 ) ; logging . info ( "Start reding cs File" ) ; List < String > linescs2 = getFileLinesAsList ( csFile2 ) ; logging . info ( "Search classes" ) ; List < String > classNames1 = searchClasses ( linescs1 ) ; logging . info ...
public class sslocspresponder { /** * Use this API to add sslocspresponder resources . */ public static base_responses add ( nitro_service client , sslocspresponder resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { sslocspresponder addresources [ ] = new sslocspresponder [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new sslocspresponder ( ) ; addresources [ i ] . name = resources [ i ] . name ; a...
public class DatabaseStoreService { /** * Declarative Services method for setting the UserTransaction service reference * @ param ref reference to service object ; type of service object is verified */ protected void setUserTransaction ( ServiceReference < UserTransaction > ref ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "setUserTransaction" , "setting " + ref ) ; } userTransactionRef . setReference ( ref ) ;
public class DatePanel { /** * Get days of a month * @ param year value of the year * @ param month value of the month * @ return days array of this month */ private String [ ] getDays ( int year , int month ) { } }
Calendar cal = Calendar . getInstance ( ) ; cal . set ( year , month , 1 ) ; int dayNum = cal . getActualMaximum ( Calendar . DAY_OF_MONTH ) ; String [ ] days = new String [ dayNum ] ; for ( int i = 0 ; i < dayNum ; i ++ ) { days [ i ] = String . valueOf ( i + 1 ) ; } return days ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EEnum getIfcSimplePropertyTemplateTypeEnum ( ) { } }
if ( ifcSimplePropertyTemplateTypeEnumEEnum == null ) { ifcSimplePropertyTemplateTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1063 ) ; } return ifcSimplePropertyTemplateTypeEnumEEnum ;
public class StandardFieldsDialog { /** * Adds a { @ link ZapLabel } field , with the given label and , optionally , the given value , to the tab with the given index . * @ param tabIndex the index of the tab where the read - only text field should be added . * @ param fieldLabel the name of the label of the read -...
addTextComponent ( tabIndex , new ZapLabel ( ) , fieldLabel , value ) ;
public class TimingBufferSource { /** * Try to terminate the VM as soon as possible no matter the method and how abrupt it may be . * @ param msg an error message which may end up being reported . */ private static void commitSuicide ( String msg ) { } }
Thread t = new Thread ( ( ) -> { // halt the JVM immediately unless the security manager prevents this try { System . exit ( - 1 ) ; } catch ( SecurityException ex ) { LOGGER . info ( "SecurityException prevented system exit" , ex ) ; } // log an error stating that the JVM should be manually aborted try { while ( true ...
public class Updater { /** * Check to see if the program should continue by evaluation whether the plugin is already updated , or shouldn ' t be updated */ private boolean versionCheck ( String title ) { } }
if ( this . type != UpdateType . NO_VERSION_CHECK ) { final String version = caller . getPluginVersion ( ) ; final String remoteVersion = title ; // Get the newest file ' s version number if ( this . hasTag ( version ) || version . contains ( remoteVersion ) ) { // We already have the latest version , or this build is ...
public class SpiderTransaction { /** * Add a column to the " _ shards " row for the given shard number and date , indicating * that this shard is being used . The " _ shards " row lives in the table ' s Terms store * and uses the format : * < pre > * _ shards = { { shard 1 } : { date 1 } , { shard 1 } : { date ...
assert tableDef . isSharded ( ) && shardNumber > 0 ; addColumn ( SpiderService . termsStoreName ( tableDef ) , SHARDS_ROW_KEY , Integer . toString ( shardNumber ) , Utils . toBytes ( Long . toString ( startDate . getTime ( ) ) ) ) ;
public class ESigList { /** * Returns true if items exist that the user may sign . * @ param selectedOnly If true , examine only selected items . * @ return True if items exist that the user may sign . */ public boolean canSign ( boolean selectedOnly ) { } }
for ( ESigItem item : items ) { if ( ( ! selectedOnly || item . isSelected ( ) ) && ( item . getSignState ( ) != SignState . FORCED_NO ) ) { return true ; } } return false ;
public class AbstractHibernateCriteriaBuilder { /** * Applies a sql restriction to the results to allow something like : * @ param sqlRestriction the sql restriction * @ param values jdbc parameters * @ return a Criteria instance */ public org . grails . datastore . mapping . query . api . Criteria sqlRestriction...
if ( ! validateSimpleExpression ( ) ) { throwRuntimeException ( new IllegalArgumentException ( "Call to [sqlRestriction] with value [" + sqlRestriction + "] not allowed here." ) ) ; } final int numberOfParameters = values . size ( ) ; final Type [ ] typesArray = new Type [ numberOfParameters ] ; final Object [ ] values...
public class UserImpl { /** * { @ inheritDoc } */ @ Override public void addRole ( final String role ) { } }
try { roles . add ( UserRoleName . valueOf ( role ) ) ; } catch ( Exception e ) { logger . warn ( "Tried to add unrecognized role: " + role ) ; }
public class PubchemFingerprinter { /** * Section 1 : Hierarchic Element Counts - These bs test for the presence or * count of individual chemical atoms represented by their atomic symbol . */ private static void countElements ( byte [ ] fp , IAtomContainer mol ) { } }
int b ; CountElements ce = new CountElements ( mol ) ; b = 0 ; if ( ce . getCount ( "H" ) >= 4 ) fp [ b >> 3 ] |= MASK [ b % 8 ] ; b = 1 ; if ( ce . getCount ( "H" ) >= 8 ) fp [ b >> 3 ] |= MASK [ b % 8 ] ; b = 2 ; if ( ce . getCount ( "H" ) >= 16 ) fp [ b >> 3 ] |= MASK [ b % 8 ] ; b = 3 ; if ( ce . getCount ( "H" ) >...
public class AdminRunner { /** * Main entry point for the Admin Tools Runner . * To speed up setup , create a config . properties file and put the following properties ( at a minimum ) : * pravegaservice . containerCount = { number of containers } * pravegaservice . zkURL = { host : port for ZooKeeper } * bookk...
LoggerContext context = ( LoggerContext ) LoggerFactory . getILoggerFactory ( ) ; context . getLoggerList ( ) . get ( 0 ) . setLevel ( Level . ERROR ) ; System . out . println ( "Pravega Admin Tools.\n" ) ; @ Cleanup AdminCommandState state = new AdminCommandState ( ) ; // Output loaded config . System . out . println ...
public class DelegatedClientAuthenticationAction { /** * Handle the thrown exception . * @ param webContext the web context * @ param client the authentication client * @ param e the thrown exception * @ return the event to trigger */ protected Event handleException ( final J2EContext webContext , final BaseCli...
if ( e instanceof RequestSloException ) { try { webContext . getResponse ( ) . sendRedirect ( "logout" ) ; } catch ( final IOException ioe ) { throw new IllegalArgumentException ( "Unable to call logout" , ioe ) ; } return stopWebflow ( ) ; } val msg = String . format ( "Delegated authentication has failed with client ...
public class JXMapViewer { /** * Set the current zoom level * @ param zoom the new zoom level */ public void setZoom ( int zoom ) { } }
if ( zoom == this . zoomLevel ) { return ; } TileFactoryInfo info = getTileFactory ( ) . getInfo ( ) ; // don ' t repaint if we are out of the valid zoom levels if ( info != null && ( zoom < info . getMinimumZoomLevel ( ) || zoom > info . getMaximumZoomLevel ( ) ) ) { return ; } // if ( zoom > = 0 & & zoom < = 15 & & z...
public class MasterSlaveSQLRewriteEngine { /** * Rewrite SQL . * @ return SQL */ public String rewrite ( ) { } }
if ( sqlTokens . isEmpty ( ) ) { return originalSQL ; } SQLBuilder result = new SQLBuilder ( Collections . emptyList ( ) ) ; int count = 0 ; for ( SQLToken each : sqlTokens ) { if ( 0 == count ) { result . appendLiterals ( originalSQL . substring ( 0 , each . getStartIndex ( ) ) ) ; } if ( each instanceof SchemaToken )...
public class MinimumSwaps { /** * Determine the minimum number of swaps required to transform one binary string into another . * If the transformation isn ' t possible , return a message indicating this . * Examples : * > > > minimumSwaps ( " 1101 " , " 1110 " ) * > > > minimumSwaps ( " 1111 " , " 0100 " ) * ...
int diff_count = 0 ; for ( int i = 0 ; i < binary_str1 . length ( ) ; i ++ ) { if ( binary_str1 . charAt ( i ) != binary_str2 . charAt ( i ) ) { diff_count += 1 ; } } if ( diff_count % 2 == 0 ) { return Integer . toString ( diff_count / 2 ) ; } else { return "Not Possible" ; }
public class Approximation { /** * Calculate Sin using Quadratic curve . * @ param x An angle , in radians . * @ return Result . */ public static double Lowprecision_Sin ( double x ) { } }
// always wrap input angle to - PI . . PI if ( x < - 3.14159265 ) x += 6.28318531 ; else if ( x > 3.14159265 ) x -= 6.28318531 ; // compute sine if ( x < 0 ) return 1.27323954 * x + .405284735 * x * x ; else return 1.27323954 * x - 0.405284735 * x * x ;
public class SourceTableRowProcessingPublisher { /** * Inspects the row processed tables primary keys . If all primary keys are * in the source columns of the AnalysisJob , they will be added to the * physically queried columns . * Adding the primary keys to the query is a trade - off : It helps a lot in * maki...
final List < Column > primaryKeyColumns = getTable ( ) . getPrimaryKeys ( ) ; if ( primaryKeyColumns == null || primaryKeyColumns . isEmpty ( ) ) { logger . info ( "No primary keys defined for table {}, not pre-selecting primary keys" , getTable ( ) . getName ( ) ) ; return ; } final Collection < InputColumn < ? > > so...
public class ExperimentsInner { /** * Gets information about an Experiment . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param workspaceName The name of the workspace . Workspace names can only contain a combination of alphanumeric characters along with dash ( - ) and ...
return ServiceFuture . fromResponse ( getWithServiceResponseAsync ( resourceGroupName , workspaceName , experimentName ) , serviceCallback ) ;
public class UnifiedPushConfig { /** * Validates categories against Google ' s pattern . * @ param categories a group of Strings each will be validated . * @ throws IllegalArgumentException if a category fails to match [ a - zA - Z0-9 - _ . ~ % ] + */ private static void validateCategories ( String ... categories )...
for ( String category : categories ) { if ( ! category . matches ( FCM_TOPIC_PATTERN ) ) { throw new IllegalArgumentException ( String . format ( "%s does not match %s" , category , FCM_TOPIC_PATTERN ) ) ; } }
public class JobVersionsInner { /** * Gets all versions of a job . * @ 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 ...
return listByJobWithServiceResponseAsync ( resourceGroupName , serverName , jobAgentName , jobName ) . map ( new Func1 < ServiceResponse < Page < JobVersionInner > > , Page < JobVersionInner > > ( ) { @ Override public Page < JobVersionInner > call ( ServiceResponse < Page < JobVersionInner > > response ) { return resp...
public class DhtGetPeersReplyAlert { /** * This method creates a new list each time is called . * @ return the list of peers */ public ArrayList < TcpEndpoint > peers ( ) { } }
tcp_endpoint_vector v = alert . peers ( ) ; int size = ( int ) v . size ( ) ; ArrayList < TcpEndpoint > peers = new ArrayList < > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { tcp_endpoint endp = v . get ( i ) ; String ip = new Address ( endp . address ( ) ) . toString ( ) ; // clone peers . add ( new TcpEndpoint ( ...
public class CmsRelationFilter { /** * Returns an extended filter with the given source relation path restriction . < p > * @ param path the source relation path to filter * @ return an extended filter with the given source relation path restriction */ public CmsRelationFilter filterPath ( String path ) { } }
CmsRelationFilter filter = ( CmsRelationFilter ) clone ( ) ; filter . m_path = path ; return filter ;
public class UnixPath { /** * Returns component in { @ code path } at { @ code index } . * @ see java . nio . file . Path # getName ( int ) */ public UnixPath getName ( int index ) { } }
if ( path . isEmpty ( ) ) { return this ; } try { return new UnixPath ( permitEmptyComponents , getParts ( ) . get ( index ) ) ; } catch ( IndexOutOfBoundsException e ) { throw new IllegalArgumentException ( ) ; }
public class OfferRequestProvider { /** * happen anytime soon . */ @ Override public OfferRequestPacket parse ( XmlPullParser parser , int initialDepth , XmlEnvironment xmlEnvironment ) throws XmlPullParserException , IOException , SmackParsingException { } }
int eventType = parser . getEventType ( ) ; String sessionID = null ; int timeout = - 1 ; OfferContent content = null ; boolean done = false ; Map < String , List < String > > metaData = new HashMap < > ( ) ; if ( eventType != XmlPullParser . START_TAG ) { // throw exception } Jid userJID = ParserUtils . getJidAttribut...
public class EnumMapping { /** * generate the field initializer for the map */ void translate ( ) { } }
make . at ( pos . getStartPosition ( ) ) ; JCClassDecl owner = classDef ( ( ClassSymbol ) mapVar . owner ) ; // synthetic static final int [ ] $ SwitchMap $ Color = new int [ Color . values ( ) . length ] ; MethodSymbol valuesMethod = lookupMethod ( pos , names . values , forEnum . type , List . nil ( ) ) ; JCExpressio...
public class AdminSetUserSettingsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AdminSetUserSettingsRequest adminSetUserSettingsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( adminSetUserSettingsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( adminSetUserSettingsRequest . getUserPoolId ( ) , USERPOOLID_BINDING ) ; protocolMarshaller . marshall ( adminSetUserSettingsRequest . getUsername ( ) , USER...
public class AnalyzeDataSourceRiskDetails { /** * < code > * . google . privacy . dlp . v2 . AnalyzeDataSourceRiskDetails . LDiversityResult l _ diversity _ result = 6; * < / code > */ public com . google . privacy . dlp . v2 . AnalyzeDataSourceRiskDetails . LDiversityResult getLDiversityResult ( ) { } }
if ( resultCase_ == 6 ) { return ( com . google . privacy . dlp . v2 . AnalyzeDataSourceRiskDetails . LDiversityResult ) result_ ; } return com . google . privacy . dlp . v2 . AnalyzeDataSourceRiskDetails . LDiversityResult . getDefaultInstance ( ) ;
public class MviBasePresenter { /** * This method creates a decorator around the original view ' s " intent " . This method ensures that * no memory leak by using a { @ link ViewIntentBinder } is caused by the subscription to the original * view ' s intent when the view gets detached . * Typically , this method i...
Subject < I > intentRelay = UnicastSubject . create ( ) ; intentRelaysBinders . add ( new IntentRelayBinderPair < I > ( intentRelay , binder ) ) ; return intentRelay ;
public class Projection3D { /** * Returns the camera coordinates . * @ param xyz the world coordinates . * @ return the camera coordinates . */ public double [ ] project ( double [ ] xyz ) { } }
double [ ] coord = new double [ 3 ] ; coord [ 0 ] = cosTheta * xyz [ 1 ] - sinTheta * xyz [ 0 ] ; coord [ 1 ] = cosPhi * xyz [ 2 ] - sinPhi * cosTheta * xyz [ 0 ] - sinPhi * sinTheta * xyz [ 1 ] ; coord [ 2 ] = cosPhi * sinTheta * xyz [ 1 ] + sinPhi * xyz [ 2 ] + cosPhi * cosTheta * xyz [ 0 ] ; return coord ;
public class WriteClass { /** * GetMethodVariables . */ public String getMethodVariables ( String strMethodInterface ) { } }
int endChar = 0 , startChar = 0 ; String strMethodVariables = "" ; int i = 0 ; boolean bBracketFound = false ; for ( i = 0 ; i < strMethodInterface . length ( ) ; i ++ ) { if ( strMethodInterface . charAt ( i ) == '<' ) bBracketFound = true ; if ( strMethodInterface . charAt ( i ) == '>' ) bBracketFound = false ; if ( ...
public class DiffBuilder { /** * Registers listeners that are notified of each comparison with * outcome other than { @ link ComparisonResult # EQUAL } . * @ see org . xmlunit . diff . DifferenceEngine # addDifferenceListener ( ComparisonListener ) */ @ Override public DiffBuilder withDifferenceListeners ( final Co...
this . differenceListeners . addAll ( Arrays . asList ( comparisonListeners ) ) ; return this ;
public class PutEventsResult { /** * The successfully and unsuccessfully ingested events results . If the ingestion was successful , the entry has the * event ID in it . Otherwise , you can use the error code and error message to identify the problem with the entry . * @ param entries * The successfully and unsuc...
if ( entries == null ) { this . entries = null ; return ; } this . entries = new java . util . ArrayList < PutEventsResultEntry > ( entries ) ;
public class AbstractElementGenerator { /** * { @ inheritDoc } */ public ElementGenerator findAll ( final Constraint constraint ) { } }
return new AbstractElementGenerator ( this ) { public void run ( final Closure closure ) { getWrappedTemplate ( ) . run ( new IfBlock ( constraint , closure ) ) ; } } ;
public class TargetPoolClient { /** * Adds health check URLs to a target pool . * < p > Sample code : * < pre > < code > * try ( TargetPoolClient targetPoolClient = TargetPoolClient . create ( ) ) { * ProjectRegionTargetPoolName targetPool = ProjectRegionTargetPoolName . of ( " [ PROJECT ] " , " [ REGION ] " , ...
AddHealthCheckTargetPoolHttpRequest request = AddHealthCheckTargetPoolHttpRequest . newBuilder ( ) . setTargetPool ( targetPool ) . setTargetPoolsAddHealthCheckRequestResource ( targetPoolsAddHealthCheckRequestResource ) . build ( ) ; return addHealthCheckTargetPool ( request ) ;
public class BucketingSink { /** * Closes the current part file and moves it from the in - progress state to the pending state . */ private void closeCurrentPartFile ( BucketState < T > bucketState ) throws Exception { } }
if ( bucketState . isWriterOpen ) { bucketState . writer . close ( ) ; bucketState . isWriterOpen = false ; } if ( bucketState . currentFile != null ) { Path currentPartPath = new Path ( bucketState . currentFile ) ; Path inProgressPath = getInProgressPathFor ( currentPartPath ) ; Path pendingPath = getPendingPathFor (...
public class FileLock { /** * partial writes of prior lines */ private void logProgress ( String fileOffset , boolean prefixNewLine ) throws IOException { } }
long now = System . currentTimeMillis ( ) ; LogEntry entry = new LogEntry ( now , componentID , fileOffset ) ; String line = entry . toString ( ) ; if ( prefixNewLine ) { lockFileStream . writeBytes ( System . lineSeparator ( ) + line ) ; } else { lockFileStream . writeBytes ( line ) ; } lockFileStream . hflush ( ) ; l...
public class Query { /** * Creates and returns a new Query with the additional filter that documents must contain the * specified field and the value should be less than the specified value . * @ param field The name of the field to compare . * @ param value The value for comparison . * @ return The created Que...
return whereLessThan ( FieldPath . fromDotSeparatedString ( field ) , value ) ;
public class TimeSeries { /** * Add one histogram to the current one . We preserve the width in the current TimeSeries . * @ param other the TimeSeries instance to add */ public void add ( TimeSeries other ) { } }
TreeMap < Long , Integer > otherSeries = other . getSeries ( ) ; for ( Map . Entry < Long , Integer > event : otherSeries . entrySet ( ) ) { record ( event . getKey ( ) + other . getWidthNano ( ) / 2 , event . getValue ( ) ) ; }
public class RedisJobStore { /** * Retrieve the given < code > { @ link org . quartz . Trigger } < / code > . * @ param calName The name of the < code > Calendar < / code > to be retrieved . * @ return The desired < code > Calendar < / code > , or null if there is no * match . */ @ Override public Calendar retrie...
return doWithLock ( new LockCallback < Calendar > ( ) { @ Override public Calendar doWithLock ( JedisCommands jedis ) throws JobPersistenceException { return storage . retrieveCalendar ( calName , jedis ) ; } } , "Could not retrieve calendar." ) ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link NotinType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "notin" ) public JAXBElement < NotinType > createNotin ( NotinType value ) { } }
return new JAXBElement < NotinType > ( _Notin_QNAME , NotinType . class , null , value ) ;
public class ModelHelper { /** * Decodes RetentionPolicy and returns an instance of Retention Policy impl . * @ param policyModel The Retention Policy . * @ return Instance of Retention Policy Impl . */ public static final Controller . RetentionPolicy decode ( final RetentionPolicy policyModel ) { } }
if ( policyModel != null ) { return Controller . RetentionPolicy . newBuilder ( ) . setRetentionType ( Controller . RetentionPolicy . RetentionPolicyType . valueOf ( policyModel . getRetentionType ( ) . name ( ) ) ) . setRetentionParam ( policyModel . getRetentionParam ( ) ) . build ( ) ; } else { return null ; }
public class ExportBackupPlanTemplateRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ExportBackupPlanTemplateRequest exportBackupPlanTemplateRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( exportBackupPlanTemplateRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( exportBackupPlanTemplateRequest . getBackupPlanId ( ) , BACKUPPLANID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to mars...
public class AdHocPlannedStmtBatch { /** * For convenience , serialization is accomplished with this single method , * but deserialization is piecemeal via the static methods userParamsFromBuffer * and planArrayFromBuffer with no dummy " AdHocPlannedStmtBatch receiver " instance required . */ public ByteBuffer flat...
int size = 0 ; // sizeof batch ParameterSet userParamCache = null ; if ( userParamSet == null ) { userParamCache = ParameterSet . emptyParameterSet ( ) ; } else { Object [ ] typedUserParams = new Object [ userParamSet . length ] ; int ii = 0 ; for ( AdHocPlannedStatement cs : plannedStatements ) { for ( VoltType paramT...
public class Requests { /** * Create a new { @ link PublishNotify } instance that is used to publish * metadata on a link between two { @ link Identifier } instances . * @ param i1 the first { @ link Identifier } of the link * @ param i2 the second { @ link Identifier } of the link * @ param md the metadata tha...
if ( md == null ) { throw new NullPointerException ( "md is null" ) ; } List < Document > mdlist = new ArrayList < Document > ( 1 ) ; mdlist . add ( md ) ; return createPublishNotify ( i1 , i2 , mdlist ) ;
public class RDBERule { /** * Create the table with the common oxidation states */ private void createTable ( ) { } }
if ( oxidationStateTable == null ) { oxidationStateTable = new HashMap < String , int [ ] > ( ) ; oxidationStateTable . put ( "H" , new int [ ] { 1 } ) ; // oxidationStateTable . put ( " Li " , 1 ) ; // oxidationStateTable . put ( " Be " , 2 ) ; oxidationStateTable . put ( "B" , new int [ ] { 3 } ) ; oxidationStateTabl...
public class GraphvizMojo { /** * Returns a list with file names of dot files that have been changed since * previous image generation run . Empty if no files changed or * < code > null < / code > if there is no status file to compare against . */ protected Set < String > getChangedDotFiles ( ) { } }
Set < String > generatedFiles = getGeneratedFiles ( ) ; // If there is no status file to compare against or no files are // generated then skip image generation if ( generatedFiles == null || generatedFiles . isEmpty ( ) ) { return null ; } // Check if images for generated dot files are missing or outdated Set < String...
public class AnnotatedElementNameUtil { /** * Returns the value of the { @ link Param } annotation which is specified on the { @ code element } if * the value is not blank . If the value is blank , it returns the name of the specified * { @ code nameRetrievalTarget } object which is an instance of { @ link Paramete...
requireNonNull ( nameRetrievalTarget , "nameRetrievalTarget" ) ; final String value = param . value ( ) ; if ( DefaultValues . isSpecified ( value ) ) { checkArgument ( ! value . isEmpty ( ) , "value is empty" ) ; return value ; } return getName ( nameRetrievalTarget ) ;
public class STTY { /** * Set the current STTY mode , and return the closable switcher to turn back . * @ param mode The STTY mode to set . * @ return The mode switcher . */ public STTYModeSwitcher setSTTYMode ( STTYMode mode ) { } }
try { return new STTYModeSwitcher ( mode , runtime ) ; } catch ( IOException e ) { throw new UncheckedIOException ( e ) ; }
public class SeleniumHelper { /** * Executes Javascript in browser . If statementPattern contains the magic variable ' arguments ' * the parameters will also be passed to the statement . In the latter case the parameters * must be a number , a boolean , a String , WebElement , or a List of any combination of the ab...
Object result ; String script = String . format ( statementPattern , parameters ) ; if ( statementPattern . contains ( "arguments" ) ) { result = executeScript ( script , parameters ) ; } else { result = executeScript ( script ) ; } return result ;
public class RunbooksInner { /** * Retrieve the runbook identified by runbook name . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param runbookName The runbook name . * @ throws IllegalArgumentException thrown if parameter...
return getWithServiceResponseAsync ( resourceGroupName , automationAccountName , runbookName ) . map ( new Func1 < ServiceResponse < RunbookInner > , RunbookInner > ( ) { @ Override public RunbookInner call ( ServiceResponse < RunbookInner > response ) { return response . body ( ) ; } } ) ;
public class MigrateToChatEvent { /** * Gets the Chat that was migrated to that triggered this Event * @ return The Chat that was migrated to that triggred this Event */ @ Override public SuperGroupChat getChat ( ) { } }
return ( SuperGroupChat ) getMessage ( ) . getBotInstance ( ) . getChat ( ( ( MigrateToChatIDContent ) getMessage ( ) . getContent ( ) ) . getContent ( ) ) ;
public class StandardCache { public void put ( final K key , final V value ) { } }
incrementReportEntity ( this . putCount ) ; final CacheEntry < V > entry = new CacheEntry < V > ( value , this . useSoftReferences ) ; // newSize will be - 1 if traceExecution is false final int newSize = this . dataContainer . put ( key , entry ) ; if ( this . traceExecution ) { this . logger . trace ( "[THYMELEAF][{}...
public class SecondaryTableImpl { /** * If not already created , a new < code > index < / code > element will be created and returned . * Otherwise , the first existing < code > index < / code > element will be returned . * @ return the instance defined for the element < code > index < / code > */ public Index < Se...
List < Node > nodeList = childNode . get ( "index" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new IndexImpl < SecondaryTable < T > > ( this , "index" , childNode , nodeList . get ( 0 ) ) ; } return createIndex ( ) ;
public class XmlUtil { /** * Return a QName for the node * @ param nd * @ return boolean true for match */ public static QName fromNode ( final Node nd ) { } }
String ns = nd . getNamespaceURI ( ) ; if ( ns == null ) { /* It appears a node can have a NULL namespace but a QName has a zero length */ ns = "" ; } return new QName ( ns , nd . getLocalName ( ) ) ;
public class AbstractRadial { /** * Returns an image that simulates a glowing ring which could be used to visualize * a state of the gauge by a color . The LED might be too small if you are not in front * of the screen and so one could see the current state more easy . * @ param WIDTH * @ param GLOW _ COLOR *...
switch ( getFrameType ( ) ) { case ROUND : return GLOW_FACTORY . createRadialGlow ( WIDTH , GLOW_COLOR , ON , GAUGE_TYPE , KNOBS , ORIENTATION ) ; case SQUARE : return GLOW_FACTORY . createLinearGlow ( WIDTH , WIDTH , GLOW_COLOR , ON ) ; default : return GLOW_FACTORY . createRadialGlow ( WIDTH , GLOW_COLOR , ON , GAUGE...
public class ApiOvhMe { /** * Get services impacted by this SLA * REST : GET / me / sla / { id } / services * @ param id [ required ] Id of the object */ public ArrayList < OvhSlaOperationService > sla_id_services_GET ( Long id ) throws IOException { } }
String qPath = "/me/sla/{id}/services" ; StringBuilder sb = path ( qPath , id ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t4 ) ;
public class ExtendedPathView { /** * Given the nodes in the previous relation , determine which of the nodes in * the next relation is new and return that . * @ param prev the dependency relation that was previously seen in the path * @ param cur the current dependency relation */ private DependencyTreeNode getN...
return ( prev . headNode ( ) == cur . headNode ( ) || prev . dependentNode ( ) == cur . headNode ( ) ) ? cur . dependentNode ( ) : cur . headNode ( ) ;
public class DescribeRepositoriesRequest { /** * A list of repositories to describe . If this parameter is omitted , then all repositories in a registry are * described . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRepositoryNames ( java . util . Col...
if ( this . repositoryNames == null ) { setRepositoryNames ( new java . util . ArrayList < String > ( repositoryNames . length ) ) ; } for ( String ele : repositoryNames ) { this . repositoryNames . add ( ele ) ; } return this ;
public class WorkbookUtil { /** * 将普通工作簿转换为SXSSFWorkbook * @ param book 工作簿 * @ return SXSSFWorkbook * @ since 4.1.13 */ private static SXSSFWorkbook toSXSSFBook ( Workbook book ) { } }
if ( book instanceof SXSSFWorkbook ) { return ( SXSSFWorkbook ) book ; } if ( book instanceof XSSFWorkbook ) { return new SXSSFWorkbook ( ( XSSFWorkbook ) book ) ; } throw new POIException ( "The input is not a [xlsx] format." ) ;
public class TypeValidator { /** * Expect that the type of an argument matches the type of the parameter that it ' s fulfilling . * @ param t The node traversal . * @ param n The node to issue warnings on . * @ param argType The type of the argument . * @ param paramType The type of the parameter . * @ param ...
if ( ! argType . isSubtypeOf ( paramType ) ) { mismatch ( n , SimpleFormat . format ( "actual parameter %d of %s does not match formal parameter" , ordinal , typeRegistry . getReadableTypeNameNoDeref ( callNode . getFirstChild ( ) ) ) , argType , paramType ) ; } else if ( ! argType . isSubtypeWithoutStructuralTyping ( ...
public class TagAPI { /** * Returns the tags on the given space . This includes both items and * statuses . The tags are ordered firstly by the number of uses , secondly by * the tag text . * @ param spaceId * The id of the space to return tags from * @ return The list of tags with their count */ public List ...
return getResourceFactory ( ) . getApiResource ( "/tag/space/" + spaceId + "/" ) . get ( new GenericType < List < TagCount > > ( ) { } ) ;
public class ApiOvhHostingweb { /** * Alter this object properties * REST : PUT / hosting / web / { serviceName } / cron / { id } * @ param body [ required ] New object properties * @ param serviceName [ required ] The internal name of your hosting * @ param id [ required ] Cron ' s id */ public void serviceNam...
String qPath = "/hosting/web/{serviceName}/cron/{id}" ; StringBuilder sb = path ( qPath , serviceName , id ) ; exec ( qPath , "PUT" , sb . toString ( ) , body ) ;
public class WritingRepository { /** * Erzeugt eine Referenz ( d . h . eine Art Link ) unter dem Name * < code > reference < / code > , welche auf das Blob mit der Id < code > id < / code > * verweist . * @ param reference * Name der Referenz * @ param id * Id des Blobs welches referenziert werden soll * ...
Assert . isNotNull ( reference ) ; Assert . isFalse ( reference . length ( ) == 0 , "Die Referenz darf nicht leer sein" ) ; Assert . isNotNull ( id , "Es muss die Id des Items übergeben werden" ) ; Assert . isTrue ( id . length ( ) > WritingRepositoryStrategy . SUBDIR_POLICY , "Die Id '" + id + "' ist zu kurz, um im Re...
public class TuneInfos { /** * Add the string s as new line to field b */ public void add ( byte b , String s ) { } }
if ( s != null ) { String s2 = get ( b ) ; if ( s2 == null ) s2 = s ; else s2 += lineSeparator + s ; set ( b , s2 ) ; }
public class Int10TripleHashed { /** * Packs given x , y , z coordinates . The coords must represent a point within a 1024 sized cuboid with the base at the ( bx , by , bz ) * @ param x an < code > int < / code > value * @ param y an < code > int < / code > value * @ param z an < code > int < / code > value * @...
return ( ( ( x - bx ) & 0x3FF ) << 22 ) | ( ( ( y - by ) & 0x3FF ) << 11 ) | ( ( z - bz ) & 0x3FF ) ;
public class AdminCoreContext { /** * Used for setting or creating a multiple beans . * We must consider that the operation may include beans that have * references betewen eachother . User provided beans are * prioritized and the storage is secondary for looking up references . */ @ SuppressWarnings ( "unused" )...
Map < BeanId , Bean > userProvided = BeanUtils . uniqueIndex ( beans ) ; for ( Bean bean : beans ) { for ( String name : bean . getReferenceNames ( ) ) { List < BeanId > values = bean . getReference ( name ) ; if ( values == null ) { continue ; } for ( BeanId beanId : values ) { // the does not exist in storage , but m...
public class SarlDocumentationParser { /** * Extract the dynamic name of that from the raw text . * @ param tag the tag to extract for . * @ param name the raw text . * @ param dynamicName the dynamic name . */ protected void extractDynamicName ( Tag tag , CharSequence name , OutParameter < String > dynamicName )...
if ( tag . hasDynamicName ( ) ) { final Pattern pattern = Pattern . compile ( getDynamicNameExtractionPattern ( ) ) ; final Matcher matcher = pattern . matcher ( name ) ; if ( matcher . matches ( ) ) { dynamicName . set ( Strings . nullToEmpty ( matcher . group ( 1 ) ) ) ; return ; } } dynamicName . set ( name . toStri...
public class ConfigurationPropertyRegistry { /** * Register an instance of a property - consuming type ; the registry will use a weak reference to hold on to this instance , so * that it can be discarded if it has a short lifespan * @ param discoveredType * @ param newlyConstructed */ void addInstance ( final Cla...
WeakHashMap < Object , Void > map ; synchronized ( instances ) { map = instances . get ( discoveredType ) ; if ( map == null ) { map = new WeakHashMap < > ( ) ; instances . put ( discoveredType , map ) ; } } synchronized ( map ) { map . put ( newlyConstructed , null ) ; }
public class MultiPartParser { private void parsePreamble ( ByteBuffer buffer ) { } }
if ( _partialBoundary > 0 ) { int partial = _delimiterSearch . startsWith ( buffer . array ( ) , buffer . arrayOffset ( ) + buffer . position ( ) , buffer . remaining ( ) , _partialBoundary ) ; if ( partial > 0 ) { if ( partial == _delimiterSearch . getLength ( ) ) { buffer . position ( buffer . position ( ) + partial ...
public class VaadinForHeroku { /** * Add filter mappings to the server configuration . * A filter with the same name as the one defined in the mapping should also be defined * using { @ link # withFilterDefinition ( FilterDefinitionBuilder . . . ) } * @ param filterMaps the filter mapping ( s ) * @ since 0.3 */...
checkVarArgsArguments ( filterMaps ) ; this . filterMaps . addAll ( Arrays . asList ( filterMaps ) ) ; return self ( ) ;
public class WriteHandler { /** * { @ inheritDoc } */ @ Override public Object doHandleRequest ( MBeanServerConnection server , JmxWriteRequest request ) throws InstanceNotFoundException , AttributeNotFoundException , ReflectionException , MBeanException , IOException { } }
try { return setAttribute ( request , server ) ; } catch ( IntrospectionException exp ) { throw new IllegalArgumentException ( "Cannot get info for MBean " + request . getObjectName ( ) + ": " + exp , exp ) ; } catch ( InvalidAttributeValueException e ) { throw new IllegalArgumentException ( "Invalid value " + request ...
public class HubProxy { /** * Executes a method on the server asynchronously */ @ Override public void Invoke ( final String method , JSONArray args , HubInvokeCallback callback ) { } }
if ( method == null ) { throw new IllegalArgumentException ( "method" ) ; } if ( args == null ) { throw new IllegalArgumentException ( "args" ) ; } final String callbackId = mConnection . RegisterCallback ( callback ) ; HubInvocation hubData = new HubInvocation ( mHubName , method , args , callbackId ) ; String value =...
public class JsJmsTextMessageImpl { /** * Provide an estimate of encoded length of the payload */ int guessPayloadLength ( ) { } }
int length = 0 ; // It is likely that the String length will be the same as the length in bytes // when it has been encoded ( to UTF8 ) plus a small overhead . try { if ( jmo . getPayloadPart ( ) . getChoiceField ( JsPayloadAccess . PAYLOAD ) != JsPayloadAccess . IS_PAYLOAD_EMPTY ) { String payload = ( String ) getPayl...