signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class IQRCode { /** * 从二维码图片读取二维码信息 * @ param image 图片信息 * @ return 二维码文本信息 * @ throws NotFoundException 当图像文件中没有二维码信息 ( 图像 ) 时抛出该异常 */ private static String read ( BufferedImage image ) throws NotFoundException { } }
LuminanceSource source = new BufferedImageLuminanceSource ( image ) ; Binarizer binarizer = new HybridBinarizer ( source ) ; BinaryBitmap binaryBitmap = new BinaryBitmap ( binarizer ) ; Result result = new MultiFormatReader ( ) . decode ( binaryBitmap ) ; return result . getText ( ) ;
public class ExtensionAlert { /** * This method is intended for internal use only , and should only * be called by other classes for unit testing . */ protected void applyOverrides ( Alert alert ) { } }
if ( this . alertOverrides . isEmpty ( ) ) { // Nothing to do return ; } String changedName = this . alertOverrides . getProperty ( alert . getPluginId ( ) + ".name" ) ; if ( changedName != null ) { alert . setName ( applyOverride ( alert . getName ( ) , changedName ) ) ; } String changedDesc = this . alertOverrides . ...
public class ResourceGroovyMethods { /** * Write a Byte Order Mark at the beginning of the file * @ param stream the FileOutputStream to write the BOM to * @ param bigEndian true if UTF 16 Big Endian or false if Low Endian * @ throws IOException if an IOException occurs . * @ since 1.0 */ private static void wr...
if ( bigEndian ) { stream . write ( - 2 ) ; stream . write ( - 1 ) ; } else { stream . write ( - 1 ) ; stream . write ( - 2 ) ; }
public class OldConvolution { /** * Implement column formatted images * @ param img the image to process * @ param kh the kernel height * @ param kw the kernel width * @ param sy the stride along y * @ param sx the stride along x * @ param ph the padding width * @ param pw the padding height * @ param p...
// number of images long n = img . size ( 0 ) ; // number of channels ( depth ) long c = img . size ( 1 ) ; // image height long h = img . size ( 2 ) ; // image width long w = img . size ( 3 ) ; long outHeight = outSize ( h , kh , sy , ph , coverAll ) ; long outWidth = outSize ( w , kw , sx , pw , coverAll ) ; INDArray...
public class Broker { /** * Hand in the object to share . */ public void handIn ( String key , V obj ) { } }
if ( ! retrieveSharedQueue ( key ) . offer ( obj ) ) { throw new RuntimeException ( "Could not register the given element, broker slot is already occupied." ) ; }
public class Flowable { /** * Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer up to * a given amount of items until they can be emitted . The resulting Publisher will signal * a { @ code BufferOverflowException } via { @ code onError } as soon as the buffer ' s cap...
ObjectHelper . requireNonNull ( onOverflow , "onOverflow is null" ) ; ObjectHelper . verifyPositive ( capacity , "capacity" ) ; return RxJavaPlugins . onAssembly ( new FlowableOnBackpressureBuffer < T > ( this , capacity , unbounded , delayError , onOverflow ) ) ;
public class CmsGalleryController { /** * Converts categories tree to a list of info beans . < p > * @ param categoryList the category list * @ param entries the tree entries */ private void categoryTreeToList ( List < CmsCategoryBean > categoryList , List < CmsCategoryTreeEntry > entries ) { } }
if ( entries == null ) { return ; } // skipping the root tree entry where the path property is empty for ( CmsCategoryTreeEntry entry : entries ) { CmsCategoryBean bean = new CmsCategoryBean ( entry ) ; categoryList . add ( bean ) ; categoryTreeToList ( categoryList , entry . getChildren ( ) ) ; }
public class CmsJspImageBean { /** * Returns a variation of the current image scaled with the given scaler . < p > * It is always the original image which is used as a base , never a scaled version . * So for example if the image has been cropped by the user , the cropping are is ignored . < p > * @ param targetS...
CmsJspImageBean result = new CmsJspImageBean ( ) ; result . setCmsObject ( getCmsObject ( ) ) ; result . setResource ( getCmsObject ( ) , getResource ( ) ) ; result . setOriginalScaler ( getOriginalScaler ( ) ) ; result . setBaseScaler ( getBaseScaler ( ) ) ; result . setVfsUri ( getVfsUri ( ) ) ; result . setScaler ( ...
public class GraphGenerator { /** * On assigning node link properties * @ param node * node * @ param relation * relation * @ param childNode * child node */ private void assignNodeLinkProperty ( Node node , Relation relation , Node childNode ) { } }
// Construct Node Link for this relationship NodeLink nodeLink = new NodeLink ( node . getNodeId ( ) , childNode . getNodeId ( ) ) ; setLink ( node , relation , childNode , nodeLink ) ;
public class ListArtifactsResult { /** * Information about the artifacts . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setArtifacts ( java . util . Collection ) } or { @ link # withArtifacts ( java . util . Collection ) } if you want to * override the e...
if ( this . artifacts == null ) { setArtifacts ( new java . util . ArrayList < Artifact > ( artifacts . length ) ) ; } for ( Artifact ele : artifacts ) { this . artifacts . add ( ele ) ; } return this ;
public class AWSElasticsearchClient { /** * Modifies the cluster configuration of the specified Elasticsearch domain , setting as setting the instance type * and the number of instances . * @ param updateElasticsearchDomainConfigRequest * Container for the parameters to the < code > < a > UpdateElasticsearchDomai...
request = beforeClientExecution ( request ) ; return executeUpdateElasticsearchDomainConfig ( request ) ;
public class SparseBitmap { /** * Computes the bit - wise logical exclusive or with another bitmap . * @ param o * another bitmap * @ return the result of the bti - wise logical exclusive or */ public SparseBitmap xor ( SparseBitmap o ) { } }
SparseBitmap a = new SparseBitmap ( ) ; xor2by2 ( a , this , o ) ; return a ;
public class Util { /** * WAS classic encodes the GSSToken containing the encoded LTPA token inside another GSSToken . * This code detects if there is another GSSToken inside the GSSToken , * obtains the internal LTPA token bytes , and decodes them . * @ param codec The codec to do the encoding of the Any . * @...
byte [ ] ltpaTokenBytes = null ; try { byte [ ] data = readGSSTokenData ( LTPAMech . LTPA_OID . substring ( 4 ) , token_arr ) ; if ( data != null ) { // Check if it is double - encoded WAS classic token and get the encoded ltpa token bytes if ( isGSSToken ( LTPAMech . LTPA_OID . substring ( 4 ) , data ) ) { data = read...
public class TypeLexer { /** * $ ANTLR start " WS " */ public final void mWS ( ) throws RecognitionException { } }
try { int _type = WS ; int _channel = DEFAULT_TOKEN_CHANNEL ; // org / javaruntype / type / parser / Type . g : 124:5 : ( ( ' ' ) + ) // org / javaruntype / type / parser / Type . g : 124:7 : ( ' ' ) + { // org / javaruntype / type / parser / Type . g : 124:7 : ( ' ' ) + int cnt2 = 0 ; loop2 : do { int alt2 = 2 ; int L...
public class ManagedExecutorServiceImpl { /** * { @ inheritDoc } */ @ Override public Object createResource ( final ResourceInfo ref ) throws Exception { } }
ComponentMetaData cData = ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) . getComponentMetaData ( ) ; if ( cData != null ) applications . add ( cData . getJ2EEName ( ) . getApplication ( ) ) ; return this ;
public class NameSpace { /** * Get the specified variable in this namespace . * @ param name the name * @ param recurse If recurse is true then we recursively search through * parent namespaces for the variable . * Note : this method is primarily intended for use internally . If you * use this method outside ...
final Variable var = this . getVariableImpl ( name , recurse ) ; return this . unwrapVariable ( var ) ;
public class ClusterServiceImpl { /** * should be called under lock */ void setMasterAddress ( Address master ) { } }
assert lock . isHeldByCurrentThread ( ) : "Called without holding cluster service lock!" ; if ( logger . isFineEnabled ( ) ) { logger . fine ( "Setting master address to " + master ) ; } masterAddress = master ;
public class SchemaValidator { /** * Validate the given value against the given model schema . * @ param value The value to validate * @ param schema The model schema to validate the value against * @ param config The config model for some validator * @ return A status containing error code and description */ p...
return doValidate ( value , schema , config ) ;
public class ImageBuilderMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ImageBuilder imageBuilder , ProtocolMarshaller protocolMarshaller ) { } }
if ( imageBuilder == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( imageBuilder . getName ( ) , NAME_BINDING ) ; protocolMarshaller . marshall ( imageBuilder . getArn ( ) , ARN_BINDING ) ; protocolMarshaller . marshall ( imageBuilder . get...
public class JavaAnnotation { /** * Returns the value of the property with the given name , i . e . the result of the method with the property name * of the represented { @ link java . lang . annotation . Annotation } . E . g . for * < pre > < code > { @ literal @ } SomeAnnotation ( value = " someString " , types =...
return Optional . fromNullable ( values . get ( property ) ) ;
public class AnnotationMetadataWriter { /** * Accept an { @ link ClassWriterOutputVisitor } to write all generated classes . * @ param outputVisitor The { @ link ClassWriterOutputVisitor } * @ throws IOException If an error occurs */ public void accept ( ClassWriterOutputVisitor outputVisitor ) throws IOException {...
try ( OutputStream outputStream = outputVisitor . visitClass ( className ) ) { ClassWriter classWriter = generateClassBytes ( ) ; outputStream . write ( classWriter . toByteArray ( ) ) ; }
public class MutableArray { /** * Sets a Blob object at the given index . * @ param index the index . This value must not exceed the bounds of the array . * @ param value the Blob object * @ return The self object */ @ NonNull @ Override public MutableArray setBlob ( int index , Blob value ) { } }
return setValue ( index , value ) ;
public class IndexingMetadata { /** * Retrieves the value of the ' indexed _ by _ default ' protobuf option from the schema file defining the given * message descriptor . */ public static boolean isLegacyIndexingEnabled ( Descriptor messageDescriptor ) { } }
boolean isLegacyIndexingEnabled = true ; for ( Option o : messageDescriptor . getFileDescriptor ( ) . getOptions ( ) ) { if ( o . getName ( ) . equals ( INDEXED_BY_DEFAULT_OPTION ) ) { isLegacyIndexingEnabled = Boolean . valueOf ( ( String ) o . getValue ( ) ) ; break ; } } return isLegacyIndexingEnabled ;
public class Conversions { /** * Tries conversion of any value to an integer */ public static int toInteger ( Object value , EvaluationContext ctx ) { } }
if ( value instanceof Boolean ) { return ( ( Boolean ) value ) ? 1 : 0 ; } else if ( value instanceof Integer ) { return ( Integer ) value ; } else if ( value instanceof BigDecimal ) { try { return ( ( BigDecimal ) value ) . setScale ( 0 , RoundingMode . HALF_UP ) . intValueExact ( ) ; } catch ( ArithmeticException ex ...
public class JmsFactoryFactoryImpl { /** * For use by the JCA resource adaptor . */ @ Override public TopicConnectionFactory createTopicConnectionFactory ( JmsJcaConnectionFactory jcaConnectionFactory , JmsJcaManagedTopicConnectionFactory jcaManagedTopicConnectionFactory ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createTopicConnectionFactory" , new Object [ ] { jcaConnectionFactory , jcaManagedTopicConnectionFactory } ) ; TopicConnectionFactory tcf = new JmsTopicConnectionFactoryImpl ( jcaConnectionFactory , jcaManagedTopicCo...
public class CmsContextMenuHandler { /** * Loads the context menu . < p > * @ param structureId the resource structure id * @ param context the context * @ param menuButton the menu button */ public void loadContextMenu ( final CmsUUID structureId , final AdeContext context , final CmsContextMenuButton menuButton...
CmsRpcAction < List < CmsContextMenuEntryBean > > action = new CmsRpcAction < List < CmsContextMenuEntryBean > > ( ) { @ Override public void execute ( ) { CmsCoreProvider . getService ( ) . getContextMenuEntries ( structureId , context , this ) ; } @ Override protected void onResponse ( List < CmsContextMenuEntryBean ...
public class MappingRuleMarshaller { /** * Marshall the given parameter object . */ public void marshall ( MappingRule mappingRule , ProtocolMarshaller protocolMarshaller ) { } }
if ( mappingRule == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( mappingRule . getClaim ( ) , CLAIM_BINDING ) ; protocolMarshaller . marshall ( mappingRule . getMatchType ( ) , MATCHTYPE_BINDING ) ; protocolMarshaller . marshall ( mapping...
public class ModelsImpl { /** * Adds a customizable prebuilt domain along with all of its models to this application . * @ param appId The application ID . * @ param versionId The version ID . * @ param addCustomPrebuiltDomainOptionalParameter the object representing the optional parameters to be set before calli...
return addCustomPrebuiltDomainWithServiceResponseAsync ( appId , versionId , addCustomPrebuiltDomainOptionalParameter ) . map ( new Func1 < ServiceResponse < List < UUID > > , List < UUID > > ( ) { @ Override public List < UUID > call ( ServiceResponse < List < UUID > > response ) { return response . body ( ) ; } } ) ;
public class Graphics { /** * Draw a line with a gradient between the two points . * @ param x1 * The starting x position to draw the line * @ param y1 * The starting y position to draw the line * @ param Color1 * The starting position ' s color * @ param x2 * The ending x position to draw the line * ...
predraw ( ) ; TextureImpl . bindNone ( ) ; GL . glBegin ( SGL . GL_LINES ) ; Color1 . bind ( ) ; GL . glVertex2f ( x1 , y1 ) ; Color2 . bind ( ) ; GL . glVertex2f ( x2 , y2 ) ; GL . glEnd ( ) ; postdraw ( ) ;
public class AmazonComprehendClient { /** * Starts an asynchronous document classification job . Use the operation to track the progress of the job . * @ param startDocumentClassificationJobRequest * @ return Result of the StartDocumentClassificationJob operation returned by the service . * @ throws InvalidReques...
request = beforeClientExecution ( request ) ; return executeStartDocumentClassificationJob ( request ) ;
public class ByteArrayUtil { /** * Retrieves the long value of a subarray of bytes . * The values are considered little endian . The subarray is determined by * offset and length . If bytes length is not large enough for given offset * and length the values are considered 0. * This should be used for file forma...
assert length <= 8 && length >= 0 && bytes != null ; byte [ ] value = new byte [ length ] ; if ( offset + length > bytes . length ) { logger . warn ( "byte array not large enough for given offset + length" ) ; } for ( int i = 0 ; offset + i < bytes . length && i < length ; i ++ ) { value [ i ] = bytes [ offset + i ] ; ...
public class JdbcUtils { /** * Check if the named table exists , if it does drop it , calling the preDropCallback first * @ param jdbcOperations { @ link JdbcOperations } used to check if the table exists and execute * the drop * @ param table The name of the table to drop , case insensitive * @ param preDropCa...
LOGGER . info ( "Dropping table: " + table ) ; final boolean tableExists = doesTableExist ( jdbcOperations , table ) ; if ( tableExists ) { final T ret = preDropCallback . apply ( jdbcOperations ) ; jdbcOperations . execute ( "DROP TABLE " + table ) ; return ret ; } return null ;
public class LibraryLoader { /** * Replies the data model of the current operating system : 32 or 64 bits . * @ return the integer which is corresponding to the data model , or < code > 0 < / code > if * it could not be determined . */ @ Pure static int getOperatingSystemArchitectureDataModel ( ) { } }
final String arch = System . getProperty ( "sun.arch.data.model" ) ; // $ NON - NLS - 1 $ if ( arch != null ) { try { return Integer . parseInt ( arch ) ; } catch ( AssertionError e ) { throw e ; } catch ( Throwable exception ) { } } return 0 ;
public class ContractMethodSignatures { /** * Extracts the method signature field named { @ code field } , with the * type { @ code clazz } , from the annotations of * { @ code contractMethod } . * @ param contractMethod the annotated method node * @ param field the name of the field to retrieve * @ param cla...
"contractMethod != null" , "field != null" , "clazz != null" } ) @ SuppressWarnings ( "unchecked" ) static < T > T getMetaData ( MethodNode contractMethod , String field , Class < T > clazz ) { List < AnnotationNode > annotations = contractMethod . invisibleAnnotations ; if ( annotations == null ) { return null ; } for...
public class WorkflowClient { /** * Retrieve a workflow by workflow id * @ param workflowId the id of the workflow * @ param includeTasks specify if the tasks in the workflow need to be returned * @ return the requested workflow */ public Workflow getWorkflow ( String workflowId , boolean includeTasks ) { } }
Preconditions . checkArgument ( StringUtils . isNotBlank ( workflowId ) , "workflow id cannot be blank" ) ; Workflow workflow = getForEntity ( "workflow/{workflowId}" , new Object [ ] { "includeTasks" , includeTasks } , Workflow . class , workflowId ) ; populateWorkflowOutput ( workflow ) ; return workflow ;
public class XAResourceWrapperStatImpl { /** * { @ inheritDoc } */ public void rollback ( Xid xid ) throws XAException { } }
long l1 = System . currentTimeMillis ( ) ; try { super . rollback ( xid ) ; } finally { xastat . deltaRollback ( System . currentTimeMillis ( ) - l1 ) ; }
public class GetDataSourceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetDataSourceRequest getDataSourceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getDataSourceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDataSourceRequest . getDataSourceId ( ) , DATASOURCEID_BINDING ) ; protocolMarshaller . marshall ( getDataSourceRequest . getVerbose ( ) , VERBOSE_BINDING ) ; } ...
public class Project { /** * Make the given filename absolute relative to the current working * directory candidates . * If the given filename exists in more than one of the working directories , * a list of these existing absolute paths is returned . * The returned list is guaranteed to be non - empty . The re...
List < String > candidates = new ArrayList < > ( ) ; boolean hasProtocol = ( URLClassPath . getURLProtocol ( fileName ) != null ) ; if ( hasProtocol ) { candidates . add ( fileName ) ; return candidates ; } if ( new File ( fileName ) . isAbsolute ( ) ) { candidates . add ( fileName ) ; return candidates ; } for ( File ...
public class Envelope2D { /** * Returns True if the envelope contains the other envelope ( boundary * exclusive ) . * @ param other The other envelope * @ return True if this contains the other , boundary exclusive . */ boolean containsExclusive ( Envelope2D other ) { } }
// Note : This will return False , if either envelope is empty , thus no // need to call is _ empty ( ) . return other . xmin > xmin && other . xmax < xmax && other . ymin > ymin && other . ymax < ymax ;
public class DalvikPurgeableDecoder { /** * Creates a bitmap from encoded bytes . * @ param encodedImage the encoded image with reference to the encoded bytes * @ param bitmapConfig the { @ link android . graphics . Bitmap . Config } used to create the decoded * Bitmap * @ param regionToDecode optional image re...
BitmapFactory . Options options = getBitmapFactoryOptions ( encodedImage . getSampleSize ( ) , bitmapConfig ) ; if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . O ) { OreoUtils . setColorSpace ( options , colorSpace ) ; } CloseableReference < PooledByteBuffer > bytesRef = encodedImage . getByteBufferRef ( ) ; ...
public class ApiOvhConnectivity { /** * Search for active and inactive lines at an address . It will search for active lines only if the owner name is specified * REST : POST / connectivity / eligibility / search / lines * @ param ownerName [ required ] Owner name , at least the first three chars * @ param street...
String qPath = "/connectivity/eligibility/search/lines" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "ownerName" , ownerName ) ; addBody ( o , "streetCode" , streetCode ) ; addBody ( o , "streetNumber" , streetNumber ) ; String resp = execN ( ...
public class WebUtil { /** * failure a cookie */ public static void failureCookie ( HttpServletRequest request , HttpServletResponse response , String name , String domain , String contextPath ) { } }
if ( request != null && response != null ) { addCookie ( request , response , name , null , domain , contextPath , 0 , true ) ; }
public class TableIterator { /** * Gets the next { @ link TableBucket } in the iteration . This will either be served directly from the cached batch * of { @ link TableBucket } s or a new invocation to the underlying indexHashIterator will be performed to fetch the next * { @ link TableBucket } . */ private Complet...
val fromBatch = getNextBucketFromExistingBatch ( ) ; if ( fromBatch != null ) { return CompletableFuture . completedFuture ( fromBatch ) ; } val canContinue = new AtomicBoolean ( true ) ; return Futures . loop ( canContinue :: get , this :: fetchNextTableBuckets , canContinue :: set , this . executor ) . thenApply ( v ...
public class ParameterProperty { /** * Set whether or not a parameter might be non - null . * @ param param * the parameter index * @ param hasProperty * true if the parameter might be non - null , false otherwise */ public void setParamWithProperty ( int param , boolean hasProperty ) { } }
if ( param < 0 || param > 31 ) { return ; } if ( hasProperty ) { bits |= ( 1 << param ) ; } else { bits &= ~ ( 1 << param ) ; }
public class Scaler { /** * Returns minimum level where number of markers is not less that minMarkers * and less than maxMarkers . If both cannot be met , maxMarkers is stronger . * @ param minMarkers * @ param maxMarkers * @ return */ public ScaleLevel level ( int minMarkers , int maxMarkers ) { } }
Iterator < ScaleLevel > iterator = scale . iterator ( min , max ) ; ScaleLevel level = iterator . next ( ) ; ScaleLevel prev = null ; while ( iterator . hasNext ( ) && minMarkers > level . count ( min , max ) ) { prev = level ; level = iterator . next ( ) ; } if ( maxMarkers < level . count ( min , max ) ) { return pre...
public class Feature { /** * Create a new instance of this class by passing in a formatted valid JSON String . If you are * creating a Feature object from scratch it is better to use one of the other provided static * factory methods such as { @ link # fromGeometry ( Geometry ) } . * @ param json a formatted vali...
GsonBuilder gson = new GsonBuilder ( ) ; gson . registerTypeAdapterFactory ( GeoJsonAdapterFactory . create ( ) ) ; gson . registerTypeAdapterFactory ( GeometryAdapterFactory . create ( ) ) ; Feature feature = gson . create ( ) . fromJson ( json , Feature . class ) ; // Even thought properties are Nullable , // Feature...
public class BaseGridScreen { /** * Display this screen in html input format . * @ return true if default params were found for this form . * @ param out The http output stream . * @ exception DBException File exception . */ public boolean printData ( PrintWriter out , int iPrintOptions ) { } }
boolean bFieldsFound = false ; iPrintOptions = this . printStartGridScreenData ( out , iPrintOptions ) ; Record record = this . getMainRecord ( ) ; if ( record == null ) return bFieldsFound ; int iNumCols = this . getSFieldCount ( ) ; int iLimit = DEFAULT_LIMIT ; String strParamLimit = this . getProperty ( LIMIT_PARAM ...
public class GSECOLImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public boolean eIsSet ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . GSECOL__COLOR : return COLOR_EDEFAULT == null ? color != null : ! COLOR_EDEFAULT . equals ( color ) ; } return super . eIsSet ( featureID ) ;
public class ComponentSupport { /** * Marks all direct children and Facets with an attribute for deletion . * @ deprecated use FaceletCompositionContext . markForDeletion * @ see # finalizeForDeletion ( UIComponent ) * @ param component * UIComponent to mark */ @ Deprecated public static void markForDeletion ( ...
// flag this component as deleted component . getAttributes ( ) . put ( MARK_DELETED , Boolean . TRUE ) ; Iterator < UIComponent > iter = component . getFacetsAndChildren ( ) ; while ( iter . hasNext ( ) ) { UIComponent child = iter . next ( ) ; if ( child . getAttributes ( ) . containsKey ( MARK_CREATED ) ) { child . ...
public class ProcessUtils { /** * Kills the Operating System ( OS ) process identified by the process ID ( PID ) . * @ param processId ID of the process to kill . * @ return a boolean value indicating whether the process identified by the process ID ( ID ) * was successfully terminated . * @ see Runtime # exec ...
String killCommand = String . format ( "%s %d" , ( SystemUtils . isWindows ( ) ? WINDOWS_KILL_COMMAND : UNIX_KILL_COMMAND ) , processId ) ; try { Process killProcess = Runtime . getRuntime ( ) . exec ( killCommand ) ; return killProcess . waitFor ( KILL_WAIT_TIMEOUT , KILL_WAIT_TIME_UNIT ) ; } catch ( Throwable ignore ...
public class RevisionDataOutputStream { /** * { @ inheritDoc } * Encodes the given UUID as a sequence of 2 Longs , withe the Most Significant Bits first , followed by Least * Significant bits . * @ param uuid The value to encode . */ @ Override public void writeUUID ( UUID uuid ) throws IOException { } }
writeLong ( uuid . getMostSignificantBits ( ) ) ; writeLong ( uuid . getLeastSignificantBits ( ) ) ;
public class FactoryInterpolation { /** * Returns { @ link InterpolatePixelS } of the specified type . * @ param min Minimum possible pixel value . Inclusive . * @ param max Maximum possible pixel value . Inclusive . * @ param type Type of interpolation . * @ param dataType Type of gray - scale image * @ retu...
Class t = ImageDataType . typeToSingleClass ( dataType ) ; return createPixelS ( min , max , type , borderType , t ) ;
public class SSLComponent { /** * Protected so it can be called via unit test . * @ return */ Map < String , WSKeyStore > getKeyStores ( ) { } }
Map < String , WSKeyStore > ret = new HashMap < String , WSKeyStore > ( keystoreIdMap ) ; ret . putAll ( keystorePidMap ) ; return ret ;
public class RecurlyClient { /** * Delete an existing shipping address * @ param accountCode recurly account id * @ param shippingAddressId the shipping address id to delete */ public void deleteShippingAddress ( final String accountCode , final long shippingAddressId ) { } }
doDELETE ( Accounts . ACCOUNTS_RESOURCE + "/" + accountCode + ShippingAddresses . SHIPPING_ADDRESSES_RESOURCE + "/" + shippingAddressId ) ;
public class DefaultConnectionManager { /** * { @ inheritDoc } * @ see jp . co . future . uroborosql . connection . ConnectionManager # getConnection ( java . lang . String ) */ @ Override public Connection getConnection ( final String alias ) { } }
if ( conn == null ) { conn = connectionSupplier . getConnection ( alias ) ; } return conn ;
public class Intersectiond { /** * Determine the closest point on the triangle with the vertices < code > v0 < / code > , < code > v1 < / code > , < code > v2 < / code > * between that triangle and the given point < code > p < / code > and store that point into the given < code > result < / code > . * Additionally ...
return findClosestPointOnTriangle ( v0 . x ( ) , v0 . y ( ) , v1 . x ( ) , v1 . y ( ) , v2 . x ( ) , v2 . y ( ) , p . x ( ) , p . y ( ) , result ) ;
public class ExtensionIndexService { /** * { @ inheritDoc } */ public synchronized void addDeployedExtension ( ModuleIdentifier identifier , ExtensionInfo extensionInfo ) { } }
final ExtensionJar extensionJar = new ExtensionJar ( identifier , extensionInfo ) ; Set < ExtensionJar > jars = this . extensions . get ( extensionInfo . getName ( ) ) ; if ( jars == null ) { this . extensions . put ( extensionInfo . getName ( ) , jars = new HashSet < ExtensionJar > ( ) ) ; } jars . add ( extensionJar ...
public class ProcessorUtilities { /** * Replaces the escaped chars with their normal counterpart . Only replaces ( ' [ ' , ' ] ' , ' ( ' , ' ) ' , ' ; ' , ' , ' , ' + ' , ' - ' and ' = ' ) * @ param input The string to have all its escaped characters replaced . * @ return The input string with the escaped character...
if ( input == null ) return null ; String retValue = LEFT_SQUARE_BRACKET_PATTERN . matcher ( input ) . replaceAll ( "[" ) ; retValue = RIGHT_SQUARE_BRACKET_PATTERN . matcher ( retValue ) . replaceAll ( "]" ) ; retValue = LEFT_BRACKET_PATTERN . matcher ( retValue ) . replaceAll ( "(" ) ; retValue = RIGHT_BRACKET_PATTERN...
public class PHPFixture { /** * { @ inheritDoc } */ public Message check ( String arg0 ) throws NoSuchMessageException { } }
String methodName = Helper . purge ( arg0 ) ; LOGGER . debug ( "Check for class " + desc + ", method " + methodName ) ; PHPMethodDescriptor meth = findMethod ( desc , methodName ) ; if ( meth == null ) { LOGGER . error ( "Method not found on class " + desc + ", method " + methodName ) ; throw new NoSuchMessageException...
public class CalendarAstronomer { /** * Convert from ecliptic to equatorial coordinates . * @ param eclipLong The ecliptic longitude * @ param eclipLat The ecliptic latitude * @ return The corresponding point in equatorial coordinates . * @ hide draft / provisional / internal are hidden on Android */ public fin...
// See page 42 of " Practial Astronomy with your Calculator " , // by Peter Duffet - Smith , for details on the algorithm . double obliq = eclipticObliquity ( ) ; double sinE = Math . sin ( obliq ) ; double cosE = Math . cos ( obliq ) ; double sinL = Math . sin ( eclipLong ) ; double cosL = Math . cos ( eclipLong ) ; d...
public class Neighbour { /** * Add a PubSubOutputHandler to the list of PubSubOutputHandlers that this neighbour * knows about . */ protected void addPubSubOutputHandler ( PubSubOutputHandler handler ) { } }
if ( iPubSubOutputHandlers == null ) iPubSubOutputHandlers = new HashSet ( ) ; // Add the PubSubOutputHandler to the list that this neighbour // knows about . This is so a recovered neighbour can add the list of // output handlers back into the matchspace . iPubSubOutputHandlers . add ( handler ) ;
public class ClassInfoScreen { /** * Set up all the screen fields . */ public void setupSFields ( ) { } }
this . getRecord ( ClassInfo . CLASS_INFO_FILE ) . getField ( ClassInfo . CLASS_NAME ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( ClassInfo . CLASS_INFO_FILE ) . getField ( ClassInfo ...
public class SpaceGroup { /** * Gets all transformations except for the identity in crystal axes basis . * @ return */ public List < Matrix4d > getTransformations ( ) { } }
List < Matrix4d > transfs = new ArrayList < Matrix4d > ( ) ; for ( int i = 1 ; i < this . transformations . size ( ) ; i ++ ) { transfs . add ( transformations . get ( i ) ) ; } return transfs ;
public class AbstractDataBinder { /** * Sets , whether data should be cached , or not . * @ param useCache * True , if data should be cached , false otherwise . */ public final void useCache ( final boolean useCache ) { } }
synchronized ( cache ) { this . useCache = useCache ; logger . logDebug ( getClass ( ) , useCache ? "Enabled" : "Disabled" + " caching" ) ; if ( ! useCache ) { clearCache ( ) ; } }
public class TimeOfDay { /** * Returns a copy of this time with the specified period added , * wrapping to what would be a new day if required . * If the addition is zero , then < code > this < / code > is returned . * Fields in the period that aren ' t present in the partial are ignored . * This method is typi...
if ( period == null || scalar == 0 ) { return this ; } int [ ] newValues = getValues ( ) ; for ( int i = 0 ; i < period . size ( ) ; i ++ ) { DurationFieldType fieldType = period . getFieldType ( i ) ; int index = indexOf ( fieldType ) ; if ( index >= 0 ) { newValues = getField ( index ) . addWrapPartial ( this , index...
public class ResourceUtil { /** * Returns ' true ' is this resource represents a ' file ' witch can be displayed ( a HTML file ) . */ public static boolean isRenderableFile ( Resource resource ) { } }
boolean result = false ; try { Node node = resource . adaptTo ( Node . class ) ; if ( node != null ) { NodeType type = node . getPrimaryNodeType ( ) ; if ( ResourceUtil . TYPE_FILE . equals ( type . getName ( ) ) ) { String resoureName = resource . getName ( ) ; result = resoureName . toLowerCase ( ) . endsWith ( LinkU...
public class PropertiesEscape { /** * Perform a Java Properties Key level 2 ( basic set and all non - ASCII chars ) < strong > escape < / strong > operation * on a < tt > char [ ] < / tt > input . * < em > Level 2 < / em > means this method will escape : * < ul > * < li > The Java Properties Key basic escape se...
escapePropertiesKey ( text , offset , len , writer , PropertiesKeyEscapeLevel . LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET ) ;
public class PicocliBaseScript { /** * Return the CommandLine for this script . * If there isn ' t one already , then create it using { @ link # createCommandLine ( ) } . * @ return the CommandLine for this script . */ protected CommandLine getOrCreateCommandLine ( ) { } }
try { CommandLine commandLine = ( CommandLine ) getProperty ( COMMAND_LINE ) ; if ( commandLine == null ) { commandLine = createCommandLine ( ) ; // The script has a real property ( a field or getter ) but if we let Script . setProperty handle // this then it just gets stuffed into a binding that shadows the property ....
public class ServerCommsDiagnosticModule { /** * Dump out all outbound ME to ME conversations . * @ param is the incident stream to log information to . */ private void dumpMEtoMEConversations ( final IncidentStream is ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dumpMEtoMEConversations" , is ) ; final ServerConnectionManager scm = ServerConnectionManager . getRef ( ) ; final List obc = scm . getActiveOutboundMEtoMEConversations ( ) ; is . writeLine ( "" , "" ) ; is . writeLi...
public class RepeatableFileInputStream { /** * Resets the input stream to the last mark point , or the beginning of the * stream if there is no mark point , by creating a new FileInputStream based * on the underlying file . * @ throws IOException * when the FileInputStream cannot be re - created . */ @ Override...
this . fis . close ( ) ; abortIfNeeded ( ) ; this . fis = new FileInputStream ( file ) ; long skipped = 0 ; long toSkip = markPoint ; while ( toSkip > 0 ) { skipped = this . fis . skip ( toSkip ) ; toSkip -= skipped ; } if ( log . isDebugEnabled ( ) ) { log . debug ( "Reset to mark point " + markPoint + " after returni...
public class SarlBatchCompiler { /** * Compile the java files after the compilation of the project ' s files . * @ param progress monitor of the progress of the compilation . * @ return the success status . Replies < code > false < / code > if the activity is canceled . */ protected boolean postCompileJava ( IProgr...
assert progress != null ; progress . subTask ( Messages . SarlBatchCompiler_52 ) ; final File classOutputPath = getClassOutputPath ( ) ; if ( classOutputPath == null ) { getLogger ( ) . info ( Messages . SarlBatchCompiler_24 ) ; return true ; } getLogger ( ) . info ( Messages . SarlBatchCompiler_25 ) ; final Iterable <...
public class MPBase { /** * Process the method to call the api * @ param clazz a MPBase extended class * @ param resource an instance of the MPBase extended class , if its called from a non static method * @ param methodName a String with the decorated method to be processed * @ param mapParams a hashmap with t...
if ( resource == null ) { try { resource = ( T ) clazz . newInstance ( ) ; } catch ( Exception ex ) { throw new MPException ( ex ) ; } } // Validates the method executed if ( ! ALLOWED_METHODS . contains ( methodName ) ) { throw new MPException ( "Method \"" + methodName + "\" not allowed" ) ; } AnnotatedElement annota...
public class LdapAdapter { /** * Delete the descendants of the specified ldap entry . * @ param ldapEntry * @ param delDescendant * @ return * @ throws WIMException */ private List < LdapEntry > deleteAll ( LdapEntry ldapEntry , boolean delDescendant ) throws WIMException { } }
String dn = ldapEntry . getDN ( ) ; List < LdapEntry > delEntries = new ArrayList < LdapEntry > ( ) ; List < LdapEntry > descs = getDescendants ( dn , SearchControls . ONELEVEL_SCOPE ) ; if ( descs . size ( ) > 0 ) { if ( delDescendant ) { for ( int i = 0 ; i < descs . size ( ) ; i ++ ) { LdapEntry descEntry = descs . ...
public class AbstractTransactionalConnectionManager { /** * { @ inheritDoc } */ public void transactionStarted ( ConnectionListener cl ) throws ResourceException { } }
try { if ( ! cl . isEnlisted ( ) && TxUtils . isUncommitted ( ti . getTransactionManager ( ) . getTransaction ( ) ) && shouldEnlist ( cl ) ) cl . enlist ( ) ; } catch ( ResourceException re ) { throw re ; } catch ( Exception e ) { throw new ResourceException ( e ) ; }
public class AllClassificationCombinations { /** * Returns list of bottom level classes */ public List < Classification . RuntimeClassification > getClassifications ( ) { } }
List < Classification . RuntimeClassification > result = new ArrayList < > ( ) ; getClassifications ( result , tree . getRoot ( ) ) ; return result ;
public class VdmCompletionContext { /** * Constructs the completion context for a constructor call * @ param index */ private void consConstructorCallContext ( ) { } }
// This gives us everything after new , e . g . ' MyClass ' if you type ' new MyClass ' proposalPrefix = rawScan . subSequence ( rawScan . indexOf ( "new" ) , rawScan . length ( ) ) . toString ( ) ; processedScan = rawScan ; // new StringBuffer ( subSeq ) ; type = SearchType . New ;
public class Path3d { /** * Change the coordinates of the last inserted point . * If the point in parameter is modified , the path will be changed also . * @ param point */ public void setLastPoint ( Point3d point ) { } }
if ( this . numCoordsProperty . get ( ) >= 3 ) { this . coordsProperty [ this . numCoordsProperty . get ( ) - 3 ] = point . xProperty ; this . coordsProperty [ this . numCoordsProperty . get ( ) - 2 ] = point . yProperty ; this . coordsProperty [ this . numCoordsProperty . get ( ) - 1 ] = point . zProperty ; this . gra...
public class Bits { /** * A { @ link BitReader } that sources bits from a < code > FileChannel < / code > . * This stream operates with a byte buffer . This will generally improve * performance in applications that skip forwards or backwards across the * file . * Note that using a direct ByteBuffer should gener...
if ( channel == null ) throw new IllegalArgumentException ( "null channel" ) ; if ( buffer == null ) throw new IllegalArgumentException ( "null buffer" ) ; return new FileChannelBitReader ( channel , buffer ) ;
public class Expression { /** * Creates a code chunk representing a JavaScript regular expression literal . * @ param contents The regex literal ( including the opening and closing slashes ) . */ public static Expression regexLiteral ( String contents ) { } }
int firstSlash = contents . indexOf ( '/' ) ; int lastSlash = contents . lastIndexOf ( '/' ) ; checkArgument ( firstSlash < lastSlash && firstSlash != - 1 , "expected regex to start with a '/' and have a second '/' near the end, got %s" , contents ) ; return Leaf . create ( contents , /* isCheap = */ false ) ;
public class HttpSessionEventPublisher { /** * Handles the HttpSessionEvent by publishing a { @ link HttpSessionCreationEvent } to the * application appContext . * @ param event HttpSessionEvent passed in by the container */ public void sessionCreated ( HttpSessionEvent event ) { } }
if ( null == eventMulticaster ) { eventMulticaster = Containers . getRoot ( ) . getBean ( EventMulticaster . class ) . get ( ) ; Assert . notNull ( eventMulticaster ) ; } eventMulticaster . multicast ( new HttpSessionCreationEvent ( event . getSession ( ) ) ) ;
public class PdfContentByte { /** * Create a new uncolored tiling pattern . * @ param width the width of the pattern * @ param height the height of the pattern * @ param xstep the desired horizontal spacing between pattern cells . * May be either positive or negative , but not zero . * @ param ystep the desir...
checkWriter ( ) ; if ( xstep == 0.0f || ystep == 0.0f ) throw new RuntimeException ( "XStep or YStep can not be ZERO." ) ; PdfPatternPainter painter = new PdfPatternPainter ( writer , color ) ; painter . setWidth ( width ) ; painter . setHeight ( height ) ; painter . setXStep ( xstep ) ; painter . setYStep ( ystep ) ; ...
public class VirtualNetworkGatewaysInner { /** * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group . * @ param resourceGroupName The name of the resource group . * @ param virtualNetworkGatewayName The name of the virtual network gateway . * @ param paramet...
return generatevpnclientpackageWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class YScreenField { /** * Display the applet html screen . * @ exception DBException File exception . */ public void printAppletHtmlScreen ( PrintWriter out , ResourceBundle reg ) throws DBException { } }
reg = ( ( BaseApplication ) this . getTask ( ) . getApplication ( ) ) . getResources ( "HtmlApplet" , false ) ; Map < String , Object > propApplet = new Hashtable < String , Object > ( ) ; Task task = this . getTask ( ) ; Map < String , Object > properties = null ; if ( task instanceof ServletTask ) properties = ( ( Se...
public class HeapList { /** * returns true if the value has been added */ public boolean Add ( T value ) { } }
if ( m_Count < m_Capacity ) { m_Array [ ++ m_Count ] = value ; UpHeap ( ) ; } else if ( greaterThan ( m_Array [ 1 ] , value ) ) { m_Array [ 1 ] = value ; DownHeap ( ) ; } else return false ; return true ;
public class SaltAnnotateExtractor { /** * Use the left / right token index of the spans to create spanning relations * when this did not happen yet . * @ param graph * @ param nodeByRankID * @ param numberOfRelations */ private void createMissingSpanningRelations ( SDocumentGraph graph , FastInverseMap < Long ...
// add the missing spanning relations for each continuous span of the graph for ( SSpan span : graph . getSpans ( ) ) { long pre = 1 ; RelannisNodeFeature featSpan = RelannisNodeFeature . extract ( span ) ; ComponentEntry spanComponent = componentForSpan . get ( span . getId ( ) ) ; if ( spanComponent != null && featSp...
public class DTMDefaultBase { /** * Given a node handle , get the index of the node ' s first child . * If not yet resolved , waits for more nodes to be added to the document and * tries again * @ param nodeHandle handle to node , which should probably be an element * node , but need not be . * @ param inScop...
if ( inScope ) { int identity = makeNodeIdentity ( nodeHandle ) ; if ( _type ( identity ) == DTM . ELEMENT_NODE ) { SuballocatedIntVector nsContext = findNamespaceContext ( identity ) ; if ( nsContext == null || nsContext . size ( ) < 1 ) return NULL ; return nsContext . elementAt ( 0 ) ; } else return NULL ; } else { ...
public class ManagedBackupShortTermRetentionPoliciesInner { /** * Updates a managed database ' s short term retention policy . * @ 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 managedInstan...
return beginUpdateWithServiceResponseAsync ( resourceGroupName , managedInstanceName , databaseName , retentionDays ) . toBlocking ( ) . single ( ) . body ( ) ;
public class PropsUtils { /** * Load job schedules from the given directories * @ param parent The parent properties for these properties * @ param dir The directory to look in * @ param suffixes File suffixes to load * @ return The loaded set of schedules */ public static Props loadPropsInDir ( final Props par...
try { final Props props = new Props ( parent ) ; final File [ ] files = dir . listFiles ( ) ; Arrays . sort ( files ) ; if ( files != null ) { for ( final File f : files ) { if ( f . isFile ( ) && endsWith ( f , suffixes ) ) { props . putAll ( new Props ( null , f . getAbsolutePath ( ) ) ) ; } } } return props ; } catc...
public class AbstractItemLink { /** * Remove while locked for expiry * @ param lockId * @ param transaction * @ throws ProtocolException * @ throws TransactionException * @ throws SevereMessageStoreException */ final void cmdRemoveExpiring ( final long lockId , final PersistentTransaction transaction ) throws...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "cmdRemoveExpiring" , new Object [ ] { "Item Link: " + this , "Stream Link: " + _owningStreamLink , formatLockId ( lockId ) , "Transaction: " + transaction } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc ....
public class HttpServerKeepAliveHandler { /** * Keep - alive only works if the client can detect when the message has ended without relying on the connection being * closed . * < ul > * < li > See < a href = " https : / / tools . ietf . org / html / rfc7230 # section - 6.3 " / > < / li > * < li > See < a href =...
return isContentLengthSet ( response ) || isTransferEncodingChunked ( response ) || isMultipart ( response ) || isInformational ( response ) || response . status ( ) . code ( ) == HttpResponseStatus . NO_CONTENT . code ( ) ;
public class GraphDOT { /** * Renders an { @ link Automaton } in the GraphVIZ DOT format . * @ param automaton * the automaton to render . * @ param inputAlphabet * the input alphabet to consider * @ param a * the appendable to write to * @ throws IOException * if writing to { @ code a } fails */ public...
write ( automaton . transitionGraphView ( inputAlphabet ) , a ) ;
public class GLImplementation { /** * Returns a { @ link com . flowpowered . caustic . api . gl . Context } for the { @ link GLImplementation } , loading it if necessary . * @ param glImplementation The GL implementation to look up a factory for * @ return The implementation , as a { @ link com . flowpowered . caus...
if ( ! implementations . containsKey ( glImplementation ) ) { if ( ! load ( glImplementation ) ) { return null ; } } try { return implementations . get ( glImplementation ) . newInstance ( ) ; } catch ( IllegalAccessException | IllegalArgumentException | InstantiationException | InvocationTargetException ex ) { Caustic...
public class StorageSnippets { /** * Example of retrieving Requester pays status on a bucket . */ public Bucket getRequesterPaysStatus ( String bucketName ) throws StorageException { } }
// [ START get _ requester _ pays _ status ] // Instantiate a Google Cloud Storage client Storage storage = StorageOptions . getDefaultInstance ( ) . getService ( ) ; // The name of the bucket to retrieve requester - pays status , eg . " my - bucket " // String bucketName = " my - bucket " // Retrieve the bucket , thro...
public class AbstractMessage { /** * Convenience static method that converts a JSON string to a particular message object . * @ param json the JSON string * @ param clazz the class whose instance is represented by the JSON string * @ return the message object that was represented by the JSON string */ public stat...
try { Method buildObjectMapperForDeserializationMethod = findBuildObjectMapperForDeserializationMethod ( clazz ) ; final ObjectMapper mapper = ( ObjectMapper ) buildObjectMapperForDeserializationMethod . invoke ( null ) ; if ( FailOnUnknownProperties . class . isAssignableFrom ( clazz ) ) { mapper . configure ( Deseria...
public class OfflineConversionAdjustmentFeed { /** * Gets the adjustmentType value for this OfflineConversionAdjustmentFeed . * @ return adjustmentType * The adjustment type . * ( RETRACT , RESTATE ) * < span class = " constraint Required " > This field is required * and should not be { @ code null } . < / span...
return adjustmentType ;
public class TorqueDBHandling { /** * Adds the input files ( in our case torque schema files ) to use . * @ param srcDir The directory containing the files * @ param listOfFilenames The filenames in a comma - separated list */ public void addDBDefinitionFiles ( String srcDir , String listOfFilenames ) throws IOExce...
StringTokenizer tokenizer = new StringTokenizer ( listOfFilenames , "," ) ; File dir = new File ( srcDir ) ; String filename ; while ( tokenizer . hasMoreTokens ( ) ) { filename = tokenizer . nextToken ( ) . trim ( ) ; if ( filename . length ( ) > 0 ) { _torqueSchemata . put ( "schema" + _torqueSchemata . size ( ) + "....
public class UnscheduledEventMonitor { /** * Invoked periodically by the timer thread */ @ Override public void run ( ) { } }
try { int maxEvents = PropertyManager . getIntegerProperty ( PropertyNames . UNSCHEDULED_EVENTS_BATCH_SIZE , 100 ) ; if ( maxEvents == 0 && hasRun ) // indicates only run at startup ( old behavior ) return ; int minAge = PropertyManager . getIntegerProperty ( PropertyNames . UNSCHEDULED_EVENTS_MIN_AGE , 3600 ) ; if ( m...
public class Network { /** * Check if a network is available */ public static boolean isAvailable ( Context context ) { } }
boolean connected = false ; ConnectivityManager cm = ( ConnectivityManager ) context . getSystemService ( Context . CONNECTIVITY_SERVICE ) ; if ( cm != null ) { NetworkInfo ni = cm . getActiveNetworkInfo ( ) ; if ( ni != null ) { connected = ni . isConnected ( ) ; } } return connected ;
public class ToolExecutionEnvironment { /** * { @ inheritDoc } */ @ Override public final void setup ( ) { } }
// Setup mandatory environment facets try { if ( log . isDebugEnabled ( ) ) { log . debug ( "ToolExecutionEnvironment setup -- Starting." ) ; } // Build the ClassLoader as required for the JAXB tools holder = builder . buildAndSet ( ) ; // Redirect the JUL logging handler used by the tools to the Maven log . loggingHan...
public class WebsphereDetector { /** * { @ inheritDoc } * @ param servers */ @ Override public void addMBeanServers ( Set < MBeanServerConnection > servers ) { } }
try { /* * this . mbeanServer = AdminServiceFactory . getMBeanFactory ( ) . getMBeanServer ( ) ; */ Class adminServiceClass = ClassUtil . classForName ( "com.ibm.websphere.management.AdminServiceFactory" , getClass ( ) . getClassLoader ( ) ) ; if ( adminServiceClass != null ) { Method getMBeanFactoryMethod = adminServi...