signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class CMAClient { /** * Creates and returns a custom { @ code Gson } instance . */ static Gson createGson ( ) { } }
if ( gson == null ) { gson = new GsonBuilder ( ) . registerTypeAdapter ( CMAField . class , new FieldTypeAdapter ( ) ) . registerTypeAdapter ( CMAEntry . class , new EntrySerializer ( ) ) . registerTypeAdapter ( CMASnapshot . class , new SnapshotDeserializer ( ) ) . registerTypeAdapter ( CMALocale . class , new LocaleS...
public class Tracer { /** * Push CCM context * @ param key The frame key * @ param callstack The call stack */ public static synchronized void pushCCMContext ( String key , Throwable callstack ) { } }
log . tracef ( "%s" , new TraceEvent ( "CachedConnectionManager" , "NONE" , TraceEvent . PUSH_CCM_CONTEXT , "NONE" , key , callstack != null ? toString ( callstack ) : "" ) ) ;
public class XMLCaster { /** * remove lucee node wraps ( XMLStruct ) from node * @ param node * @ return raw node ( without wrap ) */ public static Node toRawNode ( Node node ) { } }
if ( node instanceof XMLStruct ) return ( ( XMLStruct ) node ) . toNode ( ) ; return node ;
public class InteropFramework { /** * Get a { @ link ProvFormat } given a format string * @ param format the format for which the { @ link ProvFormat } is sought * @ return a { @ link ProvFormat } */ public ProvFormat getTypeForFormat ( String format ) { } }
ProvFormat result ; // try as mimetype and then as an extension result = mimeTypeRevMap . get ( format ) ; if ( result == null ) result = extensionRevMap . get ( format ) ; return result ;
public class OptionValueSources { /** * Invokes the given configurator , obtaining the correct global context type via the datastore configuration type of * the current datastore provider . * @ param configurator the configurator to invoke * @ return a context object containing the options set via the given confi...
ConfigurableImpl configurable = new ConfigurableImpl ( ) ; configurator . configure ( configurable ) ; return configurable . getContext ( ) ;
public class MapPolyline { /** * Replies the Path2D that corresponds to this polyline . * If < var > startPosition < / var > is greater to zero , * the replied path will be clipped to ignore the part of * the polyline before the given value . * If < var > endPosition < / var > is lower to the length of the poly...
"checkstyle:cyclomaticcomplexity" , "checkstyle:npathcomplexity" } ) @ Pure public final void toPath2D ( Path2d path , double startPosition , double endPosition ) { final double length = getLength ( ) ; // For performance purpose if ( ( Double . isNaN ( startPosition ) || startPosition < 0f ) && ( Double . isNaN ( endP...
public class CouponsIterator { /** * next ( ) must be called before the first getValue ( ) . This skips over zero values . * @ return the next coupon in the array . */ boolean next ( ) { } }
index_ ++ ; while ( index_ < maxEntries_ ) { if ( couponsArr_ [ offset_ + index_ ] != 0 ) { return true ; } index_ ++ ; } return false ;
public class DynamoDBMapper { /** * Scans through an Amazon DynamoDB table and returns a single page of matching * results . The table to scan is determined by looking at the annotations on * the specified class , which declares where to store the object data in AWS * DynamoDB , and the scan expression parameter ...
config = mergeConfig ( config ) ; ScanRequest scanRequest = createScanRequestFromExpression ( clazz , scanExpression , config ) ; ScanResult scanResult = db . scan ( applyUserAgent ( scanRequest ) ) ; ScanResultPage < T > result = new ScanResultPage < T > ( ) ; result . setResults ( marshallIntoObjects ( clazz , scanRe...
public class TargetsApi { /** * Get recently used targets * Get recently used targets for the current agent . * @ param limit The number of results to return . The default value is 50 . ( optional ) * @ return ApiResponse & lt ; TargetsResponse & gt ; * @ throws ApiException If fail to call the API , e . g . se...
com . squareup . okhttp . Call call = getRecentTargetsValidateBeforeCall ( limit , null , null ) ; Type localVarReturnType = new TypeToken < TargetsResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class Antecedent { /** * Computes the activation degree of the antecedent on the expression tree * from the given node * @ param conjunction is the conjunction operator from the RuleBlock * @ param disjunction is the disjunction operator from the RuleBlock * @ param node is a node in the expression tree ...
if ( ! isLoaded ( ) ) { throw new RuntimeException ( String . format ( "[antecedent error] antecedent <%s> is not loaded" , text ) ) ; } final Expression . Type expressionType = node . type ( ) ; if ( expressionType == Expression . Type . Proposition ) { Proposition proposition = ( Proposition ) node ; if ( ! propositi...
public class CmsMessageBundleEditorOptions { /** * Creates the " Add key " button . * @ return the " Add key " button . */ private Component createAddKeyButton ( ) { } }
// the " + " button Button addKeyButton = new Button ( ) ; addKeyButton . addStyleName ( "icon-only" ) ; addKeyButton . addStyleName ( "borderless-colored" ) ; addKeyButton . setDescription ( m_messages . key ( Messages . GUI_ADD_KEY_0 ) ) ; addKeyButton . setIcon ( FontOpenCms . CIRCLE_PLUS , m_messages . key ( Messag...
public class SimpleDocTreeVisitor { /** * { @ inheritDoc } This implementation calls { @ code defaultAction } . * @ param node { @ inheritDoc } * @ param p { @ inheritDoc } * @ return the result of { @ code defaultAction } */ @ Override public R visitProvides ( ProvidesTree node , P p ) { } }
return defaultAction ( node , p ) ;
public class GDLLoader { /** * Updates the source or target vertex identifier of the last seen edge . * @ param v current vertex */ private void updateLastSeenEdge ( Vertex v ) { } }
Edge lastSeenEdge = getLastSeenEdge ( ) ; if ( lastSeenEdge != null ) { if ( lastSeenEdge . getSourceVertexId ( ) == null ) { lastSeenEdge . setSourceVertexId ( v . getId ( ) ) ; } else if ( lastSeenEdge . getTargetVertexId ( ) == null ) { lastSeenEdge . setTargetVertexId ( v . getId ( ) ) ; } }
public class HalCachingLinkResolver { /** * Returns a list with all resources which are cached . * @ param linkedIds the ids to resolve * @ param cache the cache to use * @ param notCachedLinkedIds a list with ids which are not found in the cache * @ return the cached resources */ protected List < HalResource <...
ArrayList < HalResource < ? > > resolvedResources = new ArrayList < HalResource < ? > > ( ) ; for ( String linkedId : linkedIds ) { HalResource < ? > resource = ( HalResource < ? > ) cache . get ( linkedId ) ; if ( resource != null ) { resolvedResources . add ( resource ) ; } else { notCachedLinkedIds . add ( linkedId ...
public class CocoaPodsDependencyCollector { /** * / * - - - private methods - - - */ private boolean getPodsAndDependenciesSection ( List < String > directDependenciesLines , List < String > allDependenciesLines , String podFileLock ) { } }
boolean successReadPodfile = true ; boolean podsSection = false ; boolean dependenciesSection = false ; try ( BufferedReader br = new BufferedReader ( new FileReader ( podFileLock ) ) ) { String line ; logger . debug ( "The content of Podfile.lock - {}:" , podFileLock ) ; while ( ( line = br . readLine ( ) ) != null ) ...
public class MeasureTraitType { /** * Gets the value of the customAssertionScore property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > s...
if ( customAssertionScore == null ) { customAssertionScore = new ArrayList < MeasureTraitType . CustomAssertionScore > ( ) ; } return this . customAssertionScore ;
public class JvmModelCompleter { /** * Replace the variables contained in the comment to be written to the < code > @ Generated < / code > annotation . */ protected String replaceVariables ( String commentForGenerated , JvmDeclaredType jvmType ) { } }
String result = commentForGenerated ; if ( result . contains ( GENERATED_COMMENT_VAR_SOURCE_FILE ) ) { Resource resource = jvmType . eResource ( ) ; if ( resource != null ) { URI uri = resource . getURI ( ) ; if ( uri != null ) { String sourceFile = uri . lastSegment ( ) ; if ( sourceFile == null ) sourceFile = uri . t...
public class SpecUtil { /** * Returns the number of features contained in the given specification . * Because Spock allows for the dynamic creation of new features at * specification run time , this number is only an estimate . */ public static int getFeatureCount ( Class < ? > spec ) { } }
checkIsSpec ( spec ) ; int count = 0 ; do { for ( Method method : spec . getDeclaredMethods ( ) ) if ( method . isAnnotationPresent ( FeatureMetadata . class ) ) count ++ ; spec = spec . getSuperclass ( ) ; } while ( spec != null && isSpec ( spec ) ) ; return count ;
public class AppServicePlansInner { /** * List all capabilities of an App Service plan . * List all capabilities of an App Service plan . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the App Service plan . * @ throws IllegalArgumentException throw...
return listCapabilitiesWithServiceResponseAsync ( resourceGroupName , name ) . map ( new Func1 < ServiceResponse < List < CapabilityInner > > , List < CapabilityInner > > ( ) { @ Override public List < CapabilityInner > call ( ServiceResponse < List < CapabilityInner > > response ) { return response . body ( ) ; } } ) ...
public class BaseHttpRequest { /** * Sends to a URL . * @ param url URL to which to send . * @ param content content to send . * @ throws IOException if the data cannot be sent . */ @ Override public void send ( @ NonNull URL url , @ NonNull T content ) throws IOException { } }
final HttpURLConnection urlConnection = createConnection ( url ) ; if ( urlConnection instanceof HttpsURLConnection ) { try { configureHttps ( ( HttpsURLConnection ) urlConnection ) ; } catch ( GeneralSecurityException e ) { ACRA . log . e ( LOG_TAG , "Could not configure SSL for ACRA request to " + url , e ) ; } } con...
public class PlainTextMessageTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PlainTextMessageType plainTextMessageType , ProtocolMarshaller protocolMarshaller ) { } }
if ( plainTextMessageType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( plainTextMessageType . getLanguageCode ( ) , LANGUAGECODE_BINDING ) ; protocolMarshaller . marshall ( plainTextMessageType . getText ( ) , TEXT_BINDING ) ; protocol...
public class ListResolverRuleAssociationsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListResolverRuleAssociationsRequest listResolverRuleAssociationsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listResolverRuleAssociationsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listResolverRuleAssociationsRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( listResolverRuleAssociationsRequest ...
public class FileSystem { /** * Opens an FSDataOutputStream at the indicated Path . * Files are overwritten by default . */ public FSDataOutputStream create ( Path f ) throws IOException { } }
return create ( f , CreateOptions . writeOptions ( true , null ) ) ;
public class WSJPAUrlUtils { /** * Encapsulates the specified URL within a wsjpa URL . * @ param url - the URL to encapsulate * @ return - a wsjpa URL encapsulating the argument URL * @ throws MalformedURLException */ @ Trivial public static URL createWSJPAURL ( URL url ) throws MalformedURLException { } }
if ( url == null ) { return null ; } // Encode the URL to be embedded into the wsjpa URL ' s path final String encodedURLPathStr = encode ( url . toExternalForm ( ) ) ; URL returnURL ; try { returnURL = AccessController . doPrivileged ( new PrivilegedExceptionAction < URL > ( ) { @ Override @ Trivial public URL run ( )...
public class JsonApiResponseFilter { /** * Creates JSON API responses for custom JAX - RS actions returning Crnk resources . */ @ Override public void filter ( ContainerRequestContext requestContext , ContainerResponseContext responseContext ) { } }
Object response = responseContext . getEntity ( ) ; if ( response == null ) { if ( feature . getBoot ( ) . isNullDataResponseEnabled ( ) ) { Document document = new Document ( ) ; document . setData ( Nullable . nullValue ( ) ) ; responseContext . setEntity ( document ) ; responseContext . setStatus ( Response . Status...
public class MockRepository { /** * Retrieve state based on the supplied key . */ @ SuppressWarnings ( "unchecked" ) public static synchronized < T > T getAdditionalState ( String key ) { } }
return ( T ) additionalState . get ( key ) ;
public class NameTable { /** * Return the full name of a type , including its package . For outer types , * is the type ' s full name ; for example , java . lang . Object ' s full name is * " JavaLangObject " . For inner classes , the full name is their outer class ' * name plus the inner class name ; for example...
element = typeUtil . getObjcClass ( element ) ; String fullName = fullNameCache . get ( element ) ; if ( fullName == null ) { fullName = getFullNameImpl ( element ) ; fullNameCache . put ( element , fullName ) ; } return fullName ;
public class MappedParametrizedObjectEntry { /** * Parse named parameter as Long . * @ param name * parameter name * @ param defaultValue * default Long value * @ return Long value */ public Long getParameterLong ( String name , Long defaultValue ) { } }
String value = getParameterValue ( name , null ) ; if ( value != null ) { try { return StringNumberParser . parseLong ( value ) ; } catch ( NumberFormatException e ) { if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "An exception occurred: " + e . getMessage ( ) ) ; } } } return defaultValue ;
public class NamespacesInner { /** * Creates / Updates a service namespace . Once created , this namespace ' s resource manifest is immutable . This operation is idempotent . * @ param resourceGroupName The name of the resource group . * @ param namespaceName The namespace name . * @ param parameters Parameters s...
return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , namespaceName , parameters ) , serviceCallback ) ;
public class ExcelFunctions { /** * Rounds a number to a specified number of digits */ public static BigDecimal round ( EvaluationContext ctx , Object number , Object numDigits ) { } }
BigDecimal _number = Conversions . toDecimal ( number , ctx ) ; int _numDigits = Conversions . toInteger ( numDigits , ctx ) ; return ExpressionUtils . decimalRound ( _number , _numDigits , RoundingMode . HALF_UP ) ;
public class ForEachTag { /** * / * Evaluates expressions as necessary */ private void evaluateExpressions ( ) throws JspException { } }
/* * Note : we don ' t check for type mismatches here ; we assume * the expression evaluator will return the expected type * ( by virtue of knowledge we give it about what that type is ) . * A ClassCastException here is truly unexpected , so we let it * propagate up . */ if ( begin_ != null ) { Object r = Expre...
public class CreationShanksAgentCapability { /** * " Removes " an agent with the given name from the simulation * Be careful : what this actually do is to stop the agent execution . * @ param sim * - The Shanks Simulation * @ param agentID * - The name of the agent to remove * @ throws ShanksException * A...
sim . logger . info ( "Stoppable not fount. Attempting direct stop..." ) ; sim . unregisterShanksAgent ( agentID ) ; sim . logger . info ( "Agent " + agentID + " stopped." ) ;
public class aaauser { /** * Use this API to add aaauser resources . */ public static base_responses add ( nitro_service client , aaauser resources [ ] ) throws Exception { } }
base_responses result = null ; if ( resources != null && resources . length > 0 ) { aaauser addresources [ ] = new aaauser [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new aaauser ( ) ; addresources [ i ] . username = resources [ i ] . username ; addresources [ i ] ....
public class BasePool { /** * Gets the freelist for the specified bucket . Create the freelist if there isn ' t one * @ param bucketedSize the bucket size * @ return the freelist for the bucket */ @ VisibleForTesting synchronized Bucket < V > getBucket ( int bucketedSize ) { } }
// get an existing bucket Bucket < V > bucket = mBuckets . get ( bucketedSize ) ; if ( bucket != null || ! mAllowNewBuckets ) { return bucket ; } // create a new bucket if ( FLog . isLoggable ( FLog . VERBOSE ) ) { FLog . v ( TAG , "creating new bucket %s" , bucketedSize ) ; } Bucket < V > newBucket = newBucket ( bucke...
public class AbstractTicketRegistry { /** * Decode ticket . * @ param result the result * @ return the ticket */ @ SneakyThrows protected Ticket decodeTicket ( final Ticket result ) { } }
if ( ! isCipherExecutorEnabled ( ) ) { LOGGER . trace ( MESSAGE ) ; return result ; } if ( result == null ) { LOGGER . warn ( "Ticket passed is null and cannot be decoded" ) ; return null ; } if ( ! result . getClass ( ) . isAssignableFrom ( EncodedTicket . class ) ) { LOGGER . warn ( "Ticket passed is not an encoded t...
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcElectricDistributionBoardTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class Utils { /** * Fast get parent directory using substring * @ param path path whose parent path has to be returned * @ return parent path of the argument */ public static String getParentPath ( String path ) { } }
if ( path == null ) return null ; path = path . trim ( ) ; if ( path . endsWith ( PATH_ROOT ) && path . length ( ) > 1 ) { path = path . substring ( 0 , path . length ( ) - 1 ) ; } int lastIndex = path . lastIndexOf ( PATH_ROOT ) ; if ( path . length ( ) > 1 && lastIndex > 0 ) { return path . substring ( 0 , lastIndex ...
public class XAssignmentImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setAssignable ( XExpression newAssignable ) { } }
if ( newAssignable != assignable ) { NotificationChain msgs = null ; if ( assignable != null ) msgs = ( ( InternalEObject ) assignable ) . eInverseRemove ( this , EOPPOSITE_FEATURE_BASE - XbasePackage . XASSIGNMENT__ASSIGNABLE , null , msgs ) ; if ( newAssignable != null ) msgs = ( ( InternalEObject ) newAssignable ) ....
public class AnalyticFormulas { /** * Calculates the Black - Scholes option value of a call , i . e . , the payoff max ( S ( T ) - K , 0 ) P , where S follows a log - normal process with constant log - volatility . * The method also handles cases where the forward and / or option strike is negative * and some limit...
if ( optionMaturity < 0 ) { return 0 ; } else if ( forward < 0 ) { // We use max ( X , 0 ) = X + max ( - X , 0) return ( forward - optionStrike ) * payoffUnit + blackScholesGeneralizedOptionValue ( - forward , volatility , optionMaturity , - optionStrike , payoffUnit ) ; } else if ( ( forward == 0 ) || ( optionStrike <...
public class DefaultClusterElector { /** * ( non - Javadoc ) * @ see org . mobicents . ftf . election . SingletonElector # elect ( java . util . List ) */ public Address elect ( List < Address > list ) { } }
// Jgroups return addresses always in sorted order , jbcache does not change it . // For buddies its ok , since we get list from failing node : ) // in case shift is bigger than size int size = list . size ( ) ; int index = ( this . shift % size ) + size ; index = index % size ; return list . get ( index ) ;
public class IoTDataManager { /** * Try to read out a things momentary values . * @ param jid the full JID of the thing to read data from . * @ return a list with the read out data . * @ throws NoResponseException * @ throws XMPPErrorException * @ throws NotConnectedException * @ throws InterruptedException...
final XMPPConnection connection = connection ( ) ; final int seqNr = nextSeqNr . incrementAndGet ( ) ; IoTDataRequest iotDataRequest = new IoTDataRequest ( seqNr , true ) ; iotDataRequest . setTo ( jid ) ; StanzaFilter doneFilter = new IoTFieldsExtensionFilter ( seqNr , true ) ; StanzaFilter dataFilter = new IoTFieldsE...
public class CommerceOrderPersistenceImpl { /** * Clears the cache for the commerce order . * The { @ link EntityCache } and { @ link FinderCache } are both cleared by this method . */ @ Override public void clearCache ( CommerceOrder commerceOrder ) { } }
entityCache . removeResult ( CommerceOrderModelImpl . ENTITY_CACHE_ENABLED , CommerceOrderImpl . class , commerceOrder . getPrimaryKey ( ) ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITH_PAGINATION ) ; finderCache . clearCache ( FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION ) ; clearUniqueFindersCache ( ( Commer...
public class HTMLEncoder { /** * Encode a unicode char value in percentEncode , decoding its bytes using a specified * characterEncoding . * @ param c * @ param characterEncoding * @ return */ private static void percentEncode ( Writer writer , char c , String characterEncoding ) throws IOException { } }
String app = null ; if ( c > ( char ) ( ( short ) 0x007F ) ) { // percent encode in the proper encoding to be consistent // app = percentEncodeNonUsAsciiCharacter ( writer c , characterEncoding ) ; percentEncodeNonUsAsciiCharacter ( writer , c , characterEncoding ) ; } else { // percent encode US - ASCII char ( 0x00-0x...
public class ProjectiveInitializeAllCommon { /** * Computes camera matrix between the seed view and a connected view * @ param seed This will be the source view . It ' s observations have already been added to assocPixel * @ param edge The edge which connects them * @ param featsB The dst view * @ param cameraM...
boolean seedSrc = edge . src == seed ; int matched = 0 ; for ( int i = 0 ; i < edge . inliers . size ; i ++ ) { // need to go from i to index of detected features in view ' seed ' to index index of feature in // the reconstruction AssociatedIndex a = edge . inliers . get ( i ) ; int featId = seedToStructure . data [ se...
public class QueryParser { /** * src / riemann / Query . g : 58:1 : lesser _ equal : field ( WS ) * LESSER _ EQUAL ( WS ) * value ; */ public final QueryParser . lesser_equal_return lesser_equal ( ) throws RecognitionException { } }
QueryParser . lesser_equal_return retval = new QueryParser . lesser_equal_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; Token WS51 = null ; Token LESSER_EQUAL52 = null ; Token WS53 = null ; QueryParser . field_return field50 = null ; QueryParser . value_return value54 = null ; CommonTree W...
public class StreamDecoder { /** * Factories for java . io . InputStreamReader */ public static StreamDecoder forInputStreamReader ( InputStream in , Object lock , String charsetName ) throws UnsupportedEncodingException { } }
String csn = charsetName ; if ( csn == null ) csn = Charset . defaultCharset ( ) . name ( ) ; try { if ( Charset . isSupported ( csn ) ) return new StreamDecoder ( in , lock , Charset . forName ( csn ) ) ; } catch ( IllegalCharsetNameException x ) { } throw new UnsupportedEncodingException ( csn ) ;
public class WatchdogRegistry { /** * killt alle Threads der Gruppe und wartet bis auch der letzte beendet ist . * Es wird der evtl . Exceptionhandler geschlossen . */ public synchronized void shutdown ( ) { } }
this . shutdownManagementWatchdogs ( ) ; // deactivate all Watchdogs . . . . Iterator iter = registeredWachdogs . values ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { IWatchdog th = ( IWatchdog ) iter . next ( ) ; th . deactivate ( ) ; if ( log . isInfoEnabled ( ) ) { log . info ( ". . . Deactivating Watchdog " +...
public class ProductCollection { /** * This method returns the value random variable of the product within the specified model , evaluated at a given evalutationTime . * Note : For a lattice this is often the value conditional to evalutationTime , for a Monte - Carlo simulation this is the ( sum of ) value discounted...
// Ignite asynchronous calculation if possible ArrayList < Future < RandomVariable > > results = new ArrayList < > ( ) ; for ( final MonteCarloProduct product : products ) { Future < RandomVariable > valueFuture ; try { valueFuture = getExecutor ( ) . submit ( new Callable < RandomVariable > ( ) { @ Override public Ran...
public class ShortField { /** * Get the SQL type of this field . * Typically SHORT or SMALLINT . * @ param bIncludeLength Include the field length in this description . * @ param properties Database properties to determine the SQL type . * @ return The SQL Type . */ public String getSQLType ( boolean bIncludeLe...
String strType = ( String ) properties . get ( DBSQLTypes . SHORT ) ; if ( strType == null ) strType = DBSQLTypes . SMALLINT ; // The default SQL Type ( Byte ) return strType ; // The default SQL Type
public class SearchView { /** * Specifies if a query refinement button should be displayed alongside each suggestion * or if it should depend on the flags set in the individual items retrieved from the * suggestions provider . Clicking on the query refinement button will replace the text * in the query text field...
mQueryRefinement = enable ; if ( mSuggestionsAdapter instanceof SuggestionsAdapter ) { ( ( SuggestionsAdapter ) mSuggestionsAdapter ) . setQueryRefinement ( enable ? SuggestionsAdapter . REFINE_ALL : SuggestionsAdapter . REFINE_BY_ENTRY ) ; }
public class CertificateX509Key { /** * Return an enumeration of names of attributes existing within this * attribute . */ public Enumeration < String > getElements ( ) { } }
AttributeNameEnumeration elements = new AttributeNameEnumeration ( ) ; elements . addElement ( KEY ) ; return ( elements . elements ( ) ) ;
public class ReportingDetectorFactorySelector { /** * ( non - Javadoc ) * @ see * edu . umd . cs . findbugs . plan . DetectorFactorySelector # selectFactory ( edu . umd * . cs . findbugs . DetectorFactory ) */ @ Override public boolean selectFactory ( DetectorFactory factory ) { } }
return ( plugin == null || plugin == factory . getPlugin ( ) ) && factory . isReportingDetector ( ) ;
public class CPDefinitionLinkUtil { /** * Returns the first cp definition link in the ordered set where CPDefinitionId = & # 63 ; . * @ param CPDefinitionId the cp definition ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching cp ...
return getPersistence ( ) . fetchByCPDefinitionId_First ( CPDefinitionId , orderByComparator ) ;
public class VarnaUtil { /** * * * * * * BEGINNING OF FUNCTION * * * * * */ / * / public static String getAntyaVarna ( String str ) { } }
if ( str . length ( ) == 0 ) return null ; String antyaVarna = String . valueOf ( str . charAt ( str . length ( ) - 1 ) ) ; if ( str . length ( ) > 1 && antyaVarna . equals ( "3" ) ) // for pluta { antyaVarna = str . charAt ( str . length ( ) - 2 ) + antyaVarna ; } return antyaVarna ;
public class ResourceLimitExceededException { /** * The Amazon EKS cluster associated with the exception . * @ param clusterName * The Amazon EKS cluster associated with the exception . */ @ com . fasterxml . jackson . annotation . JsonProperty ( "clusterName" ) public void setClusterName ( String clusterName ) { }...
this . clusterName = clusterName ;
public class LoggerFactory { /** * Prints a warning message on the console if multiple bindings were found * on the class path . No reporting is done otherwise . */ private static void reportMultipleBindingAmbiguity ( List < SLF4JServiceProvider > providerList ) { } }
if ( isAmbiguousProviderList ( providerList ) ) { Util . report ( "Class path contains multiple SLF4J providers." ) ; for ( SLF4JServiceProvider provider : providerList ) { Util . report ( "Found provider [" + provider + "]" ) ; } Util . report ( "See " + MULTIPLE_BINDINGS_URL + " for an explanation." ) ; }
public class DatasourceJBossASClient { /** * Checks if the { @ code path } has one of the expected prefixes { @ link # DATASOURCE _ PATH _ PREFIX } or * { @ link # XA _ DATASOURCE _ PATH _ PREFIX } . * @ param modelNodePath the path to check * @ throws IllegalArgumentException is the { @ code path } is not valid ...
if ( ! modelNodePath . startsWith ( DATASOURCE_PATH_PREFIX ) && ! modelNodePath . startsWith ( XA_DATASOURCE_PATH_PREFIX ) ) { String msg = String . format ( "[%s] is not a datasource path. It must start with either [%s] or [%s]" , modelNodePath , DATASOURCE_PATH_PREFIX , XA_DATASOURCE_PATH_PREFIX ) ; throw new Illegal...
public class JSON { /** * Deserializes a JSON formatted string to a specific class type * @ param json The string to deserialize * @ param type A type definition for a complex object * @ return An object of the { @ code pojo } type * @ throws IllegalArgumentException if the data or type was null or parsing * ...
if ( json == null || json . isEmpty ( ) ) throw new IllegalArgumentException ( "Incoming data was null or empty" ) ; if ( type == null ) throw new IllegalArgumentException ( "Missing type reference" ) ; try { return ( T ) jsonMapper . readValue ( json , type ) ; } catch ( JsonParseException e ) { throw new IllegalArgum...
public class CodedInput { /** * Read a raw Varint from the stream . If larger than 32 bits , discard the upper bits . */ public int readRawVarint32 ( ) throws IOException { } }
byte tmp = readRawByte ( ) ; if ( tmp >= 0 ) { return tmp ; } int result = tmp & 0x7f ; if ( ( tmp = readRawByte ( ) ) >= 0 ) { result |= tmp << 7 ; } else { result |= ( tmp & 0x7f ) << 7 ; if ( ( tmp = readRawByte ( ) ) >= 0 ) { result |= tmp << 14 ; } else { result |= ( tmp & 0x7f ) << 14 ; if ( ( tmp = readRawByte (...
public class RebalanceUtils { /** * Given the initial and final cluster dumps it into the output directory * @ param currentCluster Initial cluster metadata * @ param finalCluster Final cluster metadata * @ param outputDirName Output directory where to dump this file * @ param filePrefix String to prepend to th...
dumpClusterToFile ( outputDirName , filePrefix + currentClusterFileName , currentCluster ) ; dumpClusterToFile ( outputDirName , filePrefix + finalClusterFileName , finalCluster ) ;
public class LockSet { /** * Destructively intersect this lock set with another . Note that this is * < em > not < / em > a dataflow merge : we are interested in finding out which * locks are held in both sets , not in the exact lock counts . * @ param other * the other LockSet */ public void intersectWith ( Lo...
for ( int i = 0 ; i + 1 < array . length ; i += 2 ) { int valueNumber = array [ i ] ; if ( valueNumber < 0 ) { break ; } int myLockCount = array [ i + 1 ] ; if ( myLockCount <= 0 ) { continue ; } int otherLockCount = other . getLockCount ( valueNumber ) ; if ( otherLockCount <= 0 ) { /* This set holds the lock , but th...
public class SecurityContextImpl { /** * ( non - Javadoc ) * @ see javax . security . enterprise . SecurityContext # authenticate ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse , * javax . security . enterprise . authentication . mechanism . http . AuthenticationParamet...
AuthenticationStatus authStatus = AuthenticationStatus . SEND_FAILURE ; req . setAttribute ( JavaEESecConstants . SECURITY_CONTEXT_AUTH_PARAMS , params ) ; try { boolean result = req . authenticate ( res ) ; if ( result ) { authStatus = AuthenticationStatus . SUCCESS ; } else { // TODO some error handling . } } catch (...
public class AtomicStampedReference { /** * Atomically sets the value of both the reference and stamp * to the given update values if the * current reference is { @ code = = } to the expected reference * and the current stamp is equal to the expected stamp . * < p > < a href = " package - summary . html # weakC...
return compareAndSet ( expectedReference , newReference , expectedStamp , newStamp ) ;
public class Table { /** * Adds an element if the element at the given index is null . Returns true if no element existed at the given index , * else returns false and doesn ' t set the element . * @ param seqno * @ param element * @ param remove _ filter If not null , a filter used to remove all consecutive me...
lock . lock ( ) ; try { return _add ( seqno , element , true , remove_filter ) ; } finally { lock . unlock ( ) ; }
public class Cluster { /** * The list of cluster parameter groups that are associated with this cluster . Each parameter group in the list is * returned with its status . * @ param clusterParameterGroups * The list of cluster parameter groups that are associated with this cluster . Each parameter group in the *...
if ( clusterParameterGroups == null ) { this . clusterParameterGroups = null ; return ; } this . clusterParameterGroups = new com . amazonaws . internal . SdkInternalList < ClusterParameterGroupStatus > ( clusterParameterGroups ) ;
public class HttpOutboundServiceContextImpl { /** * Utility method to check whether the upcoming read for the response body * is either valid at this point or even necessary . * @ return boolean - - false means there is no need to read for a body * @ throws IOException * - - if this not a valid time to get the ...
// LI4335 - allow response body reading if early reads are in place if ( isImmediateReadEnabled ( ) || this . bEarlyReads ) { if ( ! headersParsed ( ) ) { // this means they are requesting body buffers prior to sending // the minimum request headers IOException ioe = new IOException ( "Request headers not sent yet" ) ;...
public class Period { /** * Converts this period to a duration assuming a * 7 day week , 24 hour day , 60 minute hour and 60 second minute . * This method allows you to convert from a period to a duration . * However to achieve this it makes the assumption that all * weeks are 7 days , all days are 24 hours , a...
checkYearsAndMonths ( "Duration" ) ; long millis = getMillis ( ) ; // no overflow can happen , even with Integer . MAX _ VALUEs millis += ( ( ( long ) getSeconds ( ) ) * ( ( long ) DateTimeConstants . MILLIS_PER_SECOND ) ) ; millis += ( ( ( long ) getMinutes ( ) ) * ( ( long ) DateTimeConstants . MILLIS_PER_MINUTE ) ) ...
public class Balancer { /** * parse command line arguments */ private void parse ( String [ ] args ) { } }
Options cliOpts = setupOptions ( ) ; BasicParser parser = new BasicParser ( ) ; CommandLine cl = null ; try { try { cl = parser . parse ( cliOpts , args ) ; } catch ( ParseException ex ) { throw new IllegalArgumentException ( "args = " + Arrays . toString ( args ) ) ; } int newThreshold = Integer . parseInt ( cl . getO...
public class DegradationExpansionRule { /** * { @ inheritDoc } */ @ Override public List < Statement > expand ( Term degradation ) { } }
List < Statement > statements = new ArrayList < Statement > ( ) ; BELObject firstArgument = degradation . getFunctionArguments ( ) . get ( 0 ) ; Term protein = ( Term ) firstArgument ; // only argument of a protein // degradation term is the protein // Protein degradation term connects to its protein with // DIRECTLY _...
public class WorkerInfo { /** * < code > optional . alluxio . grpc . WorkerNetAddress address = 2 ; < / code > */ public alluxio . grpc . WorkerNetAddressOrBuilder getAddressOrBuilder ( ) { } }
return address_ == null ? alluxio . grpc . WorkerNetAddress . getDefaultInstance ( ) : address_ ;
public class Predicates { /** * Returns a predicate that evaluates to true if the object reference being tested is a member * of the given collection . */ public < T > Predicate < T > in ( final Collection < ? extends T > target ) { } }
return new Predicate < T > ( ) { public boolean apply ( T arg ) { try { return target . contains ( arg ) ; } catch ( NullPointerException e ) { return false ; } catch ( ClassCastException e ) { return false ; } } } ;
public class GrapesServer { /** * Runs Grapes */ public static void main ( final String [ ] args ) throws ExceptionInInitializerError { } }
try { final GrapesServer grapesServer = new GrapesServer ( ) ; grapesServer . run ( args ) ; } catch ( Exception e ) { LOG . error ( "Grapes server failed to start:" + e . getMessage ( ) ) ; throw new ExceptionInInitializerError ( e ) ; }
public class SwapSpaceMonitor { /** * Returns the HTML representation of the space . */ public String toHtml ( MemoryUsage usage ) { } }
if ( usage . availableSwapSpace == - 1 ) return "N/A" ; String humanReadableSpace = Functions . humanReadableByteSize ( usage . availableSwapSpace ) ; long free = usage . availableSwapSpace ; free /= 1024L ; // convert to KB free /= 1024L ; // convert to MB if ( free > 256 || usage . totalSwapSpace < usage . availableS...
public class AbstractCurrencyConversion { /** * Method that converts the source { @ link MonetaryAmount } to an * { @ link MonetaryAmount } based on the { @ link ExchangeRate } of this * conversion . * @ param amount The source amount * @ return The converted amount , never null . * @ throws CurrencyConversio...
if ( termCurrency . equals ( Objects . requireNonNull ( amount ) . getCurrency ( ) ) ) { return amount ; } ExchangeRate rate = getExchangeRate ( amount ) ; if ( Objects . isNull ( rate ) || ! amount . getCurrency ( ) . equals ( rate . getBaseCurrency ( ) ) ) { throw new CurrencyConversionException ( amount . getCurrenc...
public class CommerceCurrencyPersistenceImpl { /** * Removes all the commerce currencies where groupId = & # 63 ; and active = & # 63 ; from the database . * @ param groupId the group ID * @ param active the active */ @ Override public void removeByG_A ( long groupId , boolean active ) { } }
for ( CommerceCurrency commerceCurrency : findByG_A ( groupId , active , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( commerceCurrency ) ; }
public class JStormDebugger { /** * one of the rootIds has been chosen , the logs should be output */ private static boolean sample ( Set < Long > rootIds ) { } }
if ( Double . compare ( sampleRate , 1.0d ) >= 0 ) return true ; int threshold = ( int ) ( sampleRate * PRECISION ) ; for ( Long id : rootIds ) { int mod = ( int ) ( Math . abs ( id ) % PRECISION ) ; if ( mod < threshold ) { return true ; } } return false ;
public class DenyAssignmentsInner { /** * Get the specified deny assignment . * @ param scope The scope of the deny assignment . * @ param denyAssignmentId The ID of the deny assignment to get . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the ...
return getWithServiceResponseAsync ( scope , denyAssignmentId ) . toBlocking ( ) . single ( ) . body ( ) ;
public class KeyRep { /** * Resolve the Key object . * < p > This method supports three Type / format combinations : * < ul > * < li > Type . SECRET / " RAW " - returns a SecretKeySpec object * constructed using encoded key bytes and algorithm * < li > Type . PUBLIC / " X . 509 " - gets a KeyFactory instance ...
try { if ( type == Type . SECRET && RAW . equals ( format ) ) { return new SecretKeySpec ( encoded , algorithm ) ; } else if ( type == Type . PUBLIC && X509 . equals ( format ) ) { KeyFactory f = KeyFactory . getInstance ( algorithm ) ; return f . generatePublic ( new X509EncodedKeySpec ( encoded ) ) ; } else if ( type...
public class Dater { /** * Returns a AddsOrSets instance that add the specified field to a delegate date * @ return */ public DateUnit add ( ) { } }
if ( this . add . isPresent ( ) ) { return add . get ( ) ; } return ( this . add = Optional . of ( ( DateUnit ) new DateUnit ( this ) { @ Override protected DateUnit handle ( int calendarField , int amount ) { Calendar c = asCalendar ( ) ; c . add ( calendarField , amount ) ; target = c . getTime ( ) ; return this ; } ...
public class KeycloakUserServlet { /** * With Keycloak integration , the Authorization header is available in the request to the UserServlet . */ protected String getKeycloakUsername ( final HttpServletRequest req , HttpServletResponse resp ) { } }
AtomicReference < String > username = new AtomicReference < > ( ) ; Authenticator . authenticate ( authConfiguration , req , subject -> { username . set ( AuthHelpers . getUsername ( subject ) ) ; // Start httpSession req . getSession ( true ) ; } ) ; return username . get ( ) ;
public class MtasToken { /** * Adds the positions . * @ param list the list */ final public void addPositions ( Set < Integer > list ) { } }
int [ ] positions = ArrayUtils . toPrimitive ( list . toArray ( new Integer [ list . size ( ) ] ) ) ; addPositions ( positions ) ;
public class OgnlEvaluator { /** * Eagerly compile this OGNL expression * @ param root * @ return */ Node compile ( final Object root ) { } }
if ( compiled == null ) { compiled = compileExpression ( root , this . expr ) ; parsed = null ; if ( this . notifyOnCompiled != null ) this . notifyOnCompiled . accept ( this . expr , this ) ; } return compiled ;
public class PublicIPAddressesInner { /** * Gets information about all public IP addresses on a virtual machine scale set level . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the ob...
return listVirtualMachineScaleSetPublicIPAddressesNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < PublicIPAddressInner > > , Page < PublicIPAddressInner > > ( ) { @ Override public Page < PublicIPAddressInner > call ( ServiceResponse < Page < PublicIPAddressInner > > response ...
public class Instruction { /** * Get the { @ link Kind } of this instruction . */ public Kind getKind ( ) { } }
Opcode opcode = getOpcode ( ) ; return ( opcode != null ? opcode . kind : Kind . UNKNOWN ) ;
public class RSAWithBase64 { /** * 获取RAS Base64 公密钥对 * < p > Function : keyGen < / p > * < p > Description : < / p > * @ param * @ return * @ author acexy @ thankjava . com * @ date 2016年8月10日 下午6:31:26 * @ version 1.0 */ public static RSAKeyString keyGen ( int keySize ) { } }
try { RSAKey keys = RSA . keyGen ( keySize ) ; return new RSAKeyString ( Base64Util . encode2String ( keys . getPublicKey ( ) . getEncoded ( ) ) , Base64Util . encode2String ( keys . getPrivateKey ( ) . getEncoded ( ) ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return null ;
public class EFapsClassLoader { /** * Loads the wanted Resource with the EFapsResourceStore into a byte - Array * to pass it on to findClass . * @ param _ resourceName name of the Resource to load * @ return byte [ ] containing the compiled javaclass */ protected byte [ ] loadClassData ( final String _resourceNam...
EFapsClassLoader . LOG . debug ( "Loading Class '{}' from Database." , _resourceName ) ; final byte [ ] x = read ( _resourceName ) ; return x ;
public class BasicParallelSearch { /** * Remove the given search . If the search was never added , < code > false < / code > is returned . * Note that this method may only be called when the search is idle . * @ param search search to be removed from parallel algorithm * @ return < code > true < / code > if searc...
// synchronize with status updates synchronized ( getStatusLock ( ) ) { // assert idle assertIdle ( "Cannot remove search from basic parallel search algorithm." ) ; // check if search was added if ( searches . contains ( search ) ) { // remove search searches . remove ( search ) ; // stop listening to events fired by t...
public class AbstractComponentDecoration { /** * Updates the decoration painter with respect to the decorated component . * This method is to be called whenever changes on the decorated component have an impact on the decoration ( for * instance , its size , location , etc . ) . * This method has been made protec...
if ( ( anchorLink != null ) && ( decoratedComponent != null ) ) { if ( attachedLayeredPane == null ) { // Try to attach to a layered pane attachToLayeredPane ( ) ; } followDecoratedComponent ( attachedLayeredPane ) ; }
public class NodeSequence { /** * Create a batch of nodes around the supplied iterator . Note that the supplied iterator is accessed lazily only when the * batch is { @ link Batch # nextRow ( ) used } . * @ param keys the iterator over the keys of the nodes to be returned ; if null , an { @ link # emptySequence emp...
assert nodeCount >= - 1 ; if ( keys == null ) return emptyBatch ( workspaceName , 1 ) ; return new Batch ( ) { private CachedNode current ; @ Override public int width ( ) { return 1 ; } @ Override public long rowCount ( ) { return nodeCount ; } @ Override public boolean isEmpty ( ) { return nodeCount == 0 ; } @ Overri...
public class AckEventType { /** * Create a new { @ link AckEventType } from an enum value . * @ param value String value of the error code . * @ return An { @ link AckEventType } or null if the value was null . */ public static AckEventType of ( Values value ) { } }
if ( value == Values . SDK_UNKNOWN ) { throw new IllegalArgumentException ( "SDK_UNKNOWN cannot be used to create an AckEventType. Use the raw value to" + "create an AckEventType from a string instead" ) ; } return value == null ? null : new AckEventType ( value , value . toString ( ) ) ;
public class LightMetaBean { /** * Adds an alias to the meta - bean . * When using { @ link # metaProperty ( String ) } , the alias will return the * meta - property of the real name . * @ param alias the alias * @ param realName the real name * @ return the new meta - bean instance * @ throws IllegalArgume...
if ( ! metaPropertyMap . containsKey ( realName ) ) { throw new IllegalArgumentException ( "Invalid property name: " + realName ) ; } Map < String , String > aliasMap = new HashMap < > ( this . aliasMap ) ; aliasMap . put ( alias , realName ) ; return new LightMetaBean < > ( beanType , metaPropertyMap , aliasMap , cons...
public class AbstractJPAQuery { /** * Transforms results using FactoryExpression if ResultTransformer can ' t be used * @ param query query * @ return results */ private List < ? > getResultList ( Query query ) { } }
// TODO : use lazy fetch here ? if ( projection != null ) { List < ? > results = query . getResultList ( ) ; List < Object > rv = new ArrayList < Object > ( results . size ( ) ) ; for ( Object o : results ) { if ( o != null ) { if ( ! o . getClass ( ) . isArray ( ) ) { o = new Object [ ] { o } ; } rv . add ( projection...
public class GetModelRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetModelRequest getModelRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getModelRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getModelRequest . getRestApiId ( ) , RESTAPIID_BINDING ) ; protocolMarshaller . marshall ( getModelRequest . getModelName ( ) , MODELNAME_BINDING ) ; protocolMarshaller ...
public class BaseStreamWriter { /** * Method called by { @ link javax . xml . stream . XMLEventWriter } * ( instead of more generic * text output methods ) , so that we can verify ( if necessary ) that * this character output type is legal in this context . Specifically , * it ' s not acceptable to add non - wh...
// Need to finish an open start element ? if ( mStartElementOpen ) { closeStartElement ( mEmptyElement ) ; } /* Not legal outside main element tree , except if it ' s all * white space */ if ( mCheckStructure ) { if ( inPrologOrEpilog ( ) ) { if ( ! ch . isIgnorableWhiteSpace ( ) && ! ch . isWhiteSpace ( ) ) { report...
public class RedisBase { /** * 返回给定 key 的剩余生存时间 ( 单位 : 秒 ) * @ param keyBytes * @ return 当 key 不存在时 , 返回 - 2 。 * 当 key 存在但没有设置剩余生存时间时 , 返回 - 1 。 * 否则返回 key的剩余生存时间 。 */ public Long getTtl ( ) { } }
try { if ( ! isBinary ) return getJedisCommands ( groupName ) . ttl ( key ) ; long result = 0 ; if ( isCluster ( groupName ) ) { result = getBinaryJedisClusterCommands ( groupName ) . ttl ( keyBytes ) ; } else { result = getBinaryJedisCommands ( groupName ) . ttl ( keyBytes ) ; } return result ; } finally { getJedisPro...
public class CheckpointStatsTracker { /** * Callback when a checkpoint is restored . * @ param restored The restored checkpoint stats . */ void reportRestoredCheckpoint ( RestoredCheckpointStats restored ) { } }
checkNotNull ( restored , "Restored checkpoint" ) ; statsReadWriteLock . lock ( ) ; try { counts . incrementRestoredCheckpoints ( ) ; latestRestoredCheckpoint = restored ; dirty = true ; } finally { statsReadWriteLock . unlock ( ) ; }
public class FilterChain { /** * Traverses the DOM and applies the filters for each visited node . * @ param walker * @ param indent * @ param sb * Optional { @ link StringBuilder } used to track progress for logging purposes . */ public void traverseAndFilter ( final TreeWalker walker , final String indent , f...
final Node parend = walker . getCurrentNode ( ) ; final boolean isLogged = appendText ( indent , ( Element ) parend , sb ) ; for ( final Filter filter : filterList ) { if ( filter . filter ( metadata , walker ) ) { appendText ( " catched by: " + filter . getClass ( ) . getSimpleName ( ) , sb ) ; break ; } } if ( isLogg...
public class CPOptionPersistenceImpl { /** * Returns all the cp options . * @ return the cp options */ @ Override public List < CPOption > findAll ( ) { } }
return findAll ( QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class CacheHandler { /** * 获取CacheOpType , 从三个地方获取 : < br > * 1 . Cache注解中获取 ; < br > * 2 . 从ThreadLocal中获取 ; < br > * 3 . 从参数中获取 ; < br > * 上面三者的优先级 : 从低到高 。 * @ param cache 注解 * @ param arguments 参数 * @ return CacheOpType */ private CacheOpType getCacheOpType ( Cache cache , Object [ ] arguments ...
CacheOpType opType = cache . opType ( ) ; CacheOpType tmpOpType = CacheHelper . getCacheOpType ( ) ; if ( null != tmpOpType ) { opType = tmpOpType ; } if ( null != arguments && arguments . length > 0 ) { for ( Object tmp : arguments ) { if ( null != tmp && tmp instanceof CacheOpType ) { opType = ( CacheOpType ) tmp ; b...
public class AbstractMailFaxClientSpi { /** * This function will send the mail message . * @ param faxJob * The fax job object containing the needed information * @ param mailConnection * The mail connection ( will be released if not persistent ) * @ param message * The message to send */ protected void sen...
if ( message == null ) { this . throwUnsupportedException ( ) ; } else { // get holder MailResourcesHolder mailResourcesHolder = mailConnection . getResource ( ) ; // get transport Transport transport = mailResourcesHolder . getTransport ( ) ; try { // send message message . saveChanges ( ) ; if ( transport == null ) {...