signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class PasswordCipher { /** * Convert the key to a byte array by compressing the 16 - bit characters to * bytes . This XOR compression insures that the top 8 bits are still * significant , so a key of " \ u0020 " yields a different cipher than a key of * " \ u0120 " . */ private static byte [ ] convertKeyTo...
byte [ ] result = new byte [ key . length ( ) ] ; for ( int i = 0 ; i < result . length ; i ++ ) { char thisChar = key . charAt ( i ) ; result [ i ] = ( byte ) ( thisChar >>> 8 & 0xFF ^ thisChar & 0xFF ) ; } return result ;
public class MergePath { /** * Adds the classpath for the loader as paths in the MergePath . * @ param loader class loader whose classpath should be used to search . */ public void addLocalClassPath ( ClassLoader loader ) { } }
String classpath = null ; if ( loader instanceof DynamicClassLoader ) classpath = ( ( DynamicClassLoader ) loader ) . getLocalClassPath ( ) ; else classpath = System . getProperty ( "java.class.path" ) ; addClassPath ( classpath ) ;
public class SwingUtil { /** * Adjusts the widths and heights of the cells of the supplied table to fit their contents . */ public static void sizeToContents ( JTable table ) { } }
TableModel model = table . getModel ( ) ; TableColumn column = null ; Component comp = null ; int ccount = table . getColumnModel ( ) . getColumnCount ( ) , rcount = model . getRowCount ( ) , cellHeight = 0 ; for ( int cc = 0 ; cc < ccount ; cc ++ ) { int headerWidth = 0 , cellWidth = 0 ; column = table . getColumnMode...
public class CodedInputStream { /** * Sets { @ code currentLimit } to ( current position ) + { @ code byteLimit } . This * is called when descending into a length - delimited embedded message . * < p > Note that { @ code pushLimit ( ) } does NOT affect how many bytes the * { @ code CodedInputStream } reads from a...
if ( byteLimit < 0 ) { throw InvalidProtocolBufferException . negativeSize ( ) ; } byteLimit += totalBytesRetired + bufferPos ; final int oldLimit = currentLimit ; if ( byteLimit > oldLimit ) { throw InvalidProtocolBufferException . truncatedMessage ( ) ; } currentLimit = byteLimit ; recomputeBufferSizeAfterLimit ( ) ;...
public class NelderMead { /** * Attempts to find the minimal value of the given function . * @ param eps the desired accuracy of the result . * @ param iterationLimit the maximum number of iteration steps to allow . This value must be positive * @ param f the function to optimize . This value can not be null * ...
if ( initalPoints . isEmpty ( ) ) throw new ArithmeticException ( "Empty Initial list. Can not determin dimension of problem" ) ; Vec init = initalPoints . get ( 0 ) ; int N = initalPoints . get ( 0 ) . length ( ) ; // The simplex verticies paired with their value from the objective function List < ProbailityMatch < Ve...
public class Injector { /** * Utility to grab a random element from an array of Strings . */ private static String randomElement ( ArrayList < String > list ) { } }
int index = random . nextInt ( list . size ( ) ) ; return list . get ( index ) ;
public class CmsRoleManager { /** * Returns all users of organizational units for which the current user has * the { @ link CmsRole # ACCOUNT _ MANAGER } role . < p > * @ param cms the current cms context * @ param ouFqn the fully qualified name of the organizational unit * @ param includeSubOus if sub organiza...
List < CmsOrganizationalUnit > ous = getManageableOrgUnits ( cms , ouFqn , includeSubOus , includeWebusers ) ; List < CmsUser > users = new ArrayList < CmsUser > ( ) ; Iterator < CmsOrganizationalUnit > it = ous . iterator ( ) ; while ( it . hasNext ( ) ) { CmsOrganizationalUnit orgUnit = it . next ( ) ; users . addAll...
public class CmsVfsSitemapService { /** * Returns if the given type id matches the xml - redirect resource type . < p > * @ param typeId the resource type id * @ return < code > true < / code > if the given type id matches the xml - redirect resource type */ @ SuppressWarnings ( "deprecation" ) private boolean isRe...
try { return typeId == OpenCms . getResourceManager ( ) . getResourceType ( RECOURCE_TYPE_NAME_REDIRECT ) . getTypeId ( ) ; } catch ( Exception e ) { return false ; }
public class ModelAnalysis { /** * 统计信息 , 计算删除非0特征后 , 权重的长度 */ public void removeZero ( ) { } }
boolean freeze = false ; if ( feature . isStopIncrement ( ) ) { feature . setStopIncrement ( false ) ; freeze = true ; } TIntObjectHashMap < String > index = ( TIntObjectHashMap < String > ) feature . toInverseIndexMap ( ) ; System . out . println ( "原字典大小" + index . size ( ) ) ; System . out . println ( "原字典大小" + feat...
public class RawResponse { /** * Set response read charset . * If not set , would get charset from response headers . If not found , would use UTF - 8. */ public RawResponse charset ( Charset charset ) { } }
return new RawResponse ( method , url , statusCode , statusLine , cookies , headers , body , charset , decompress ) ;
public class BeanDescriptor { /** * This method returns an array containing all methods exposed in this * class and any superclass . In the future , Java is not pleased to have * access to private or protected methods . * @ param beanClass the class * @ return an array containing all the public methods in this ...
Map < String , Method > uniqueMethods = new HashMap < > ( ) ; Class < ? > currentClass = beanClass ; while ( currentClass != null && currentClass != Object . class ) { addUniqueMethods ( uniqueMethods , currentClass . getDeclaredMethods ( ) ) ; // we also need to look for interface methods - // because the class may be...
public class RuleBasedCollator { /** * Get the version of this collator object . * @ return the version object associated with this collator */ @ Override public VersionInfo getVersion ( ) { } }
int version = tailoring . version ; int rtVersion = VersionInfo . UCOL_RUNTIME_VERSION . getMajor ( ) ; return VersionInfo . getInstance ( ( version >>> 24 ) + ( rtVersion << 4 ) + ( rtVersion >> 4 ) , ( ( version >> 16 ) & 0xff ) , ( ( version >> 8 ) & 0xff ) , ( version & 0xff ) ) ;
public class MeasureUnitUtil { /** * Convert the given value expressed in the given unit to seconds . * @ param value is the value to convert * @ param inputUnit is the unit of the { @ code value } * @ return the result of the convertion . */ @ Pure public static double toSeconds ( double value , TimeUnit inputUn...
switch ( inputUnit ) { case DAYS : return value * 86400. ; case HOURS : return value * 3600. ; case MINUTES : return value * 60. ; case SECONDS : break ; case MILLISECONDS : return milli2unit ( value ) ; case MICROSECONDS : return micro2unit ( value ) ; case NANOSECONDS : return nano2unit ( value ) ; default : throw ne...
public class DefaultGroovyMethods { /** * Support the subscript operator with a collection for a byte array * @ param array a byte array * @ param indices a collection of indices for the items to retrieve * @ return list of the bytes at the given indices * @ since 1.0 */ @ SuppressWarnings ( "unchecked" ) publi...
return primitiveArrayGet ( array , indices ) ;
public class BundleReader { /** * Read an object . */ void readObject ( ) { } }
for ( int i = 0 ; i < sers . length ; ++ i ) { try { data [ i ] = sers [ i ] . fromByteBuffer ( buffer ) ; } catch ( UnsupportedOperationException e ) { throw new AbortException ( "Deserialization failed." , e ) ; } catch ( IOException e ) { throw new AbortException ( "IO error" , e ) ; } }
public class SimpleDataModel { /** * Adds an item to this model . Does not force the refresh of any display . */ public void addItem ( int index , T item ) { } }
if ( _items == null ) { return ; } _items . add ( index , item ) ;
public class SegmentsUtil { /** * get float from segments . * @ param segments target segments . * @ param offset value offset . */ public static float getFloat ( MemorySegment [ ] segments , int offset ) { } }
if ( inFirstSegment ( segments , offset , 4 ) ) { return segments [ 0 ] . getFloat ( offset ) ; } else { return getFloatMultiSegments ( segments , offset ) ; }
public class ListRateBasedRulesResult { /** * An array of < a > RuleSummary < / a > objects . * @ param rules * An array of < a > RuleSummary < / a > objects . */ public void setRules ( java . util . Collection < RuleSummary > rules ) { } }
if ( rules == null ) { this . rules = null ; return ; } this . rules = new java . util . ArrayList < RuleSummary > ( rules ) ;
public class TimecodeBuilder { /** * @ param framenumber * @ param framerate * should be 29.97 , 59.94 , or 23.976 , otherwise the calculations will be off . * @ return a frame number that lets us use non - dropframe computations to extract time components */ static long compensateForDropFrame ( final long framen...
// Code by David Heidelberger , adapted from Andrew Duncan // Number of frames to drop on the minute marks is the nearest integer to 6 % of the framerate final long dropFrames = Math . round ( framerate * .066666 ) ; final long framesPer10Minutes = Math . round ( framerate * 60 * 10 ) ; final long framesPerMinute = ( M...
public class FileListTemporalDocumentIterator { /** * Returns the next document from the list . */ public TemporalDocument next ( ) { } }
// String fileName = filesToProcess . poll ( ) ; NameAndTime n = filesToProcess . poll ( ) ; if ( n == null ) return null ; try { return ( n . hasTimeStamp ( ) ) ? new TemporalFileDocument ( n . fileName , n . timeStamp ) : new TemporalFileDocument ( n . fileName ) ; // no timestamp } catch ( IOException ioe ) { return...
public class Highlights { /** * Indicate if the field of the given instance matches with the given * highlight * @ param instance The instance * @ param field The field * @ param highlight The highlight * @ return true if match */ protected boolean match ( Object instance , Field field , Highlight highlight )...
try { Object o = getPm ( ) . get ( instance , field . getProperty ( ) ) ; if ( o != null && o . toString ( ) . equals ( highlight . getValue ( ) ) && highlight . getField ( ) . equals ( field . getId ( ) ) ) { return true ; } } catch ( Exception e ) { } return false ;
public class Step { /** * Checks if HTML text contains expected value . * @ param pageElement * Is target element * @ param textOrKey * Is the new data ( text or text in context ( after a save ) ) * @ throws TechnicalException * is thrown if you have a technical error ( format , configuration , datas , . . ...
WebElement webElement = null ; String value = getTextOrKey ( textOrKey ) ; try { webElement = Context . waitUntil ( ExpectedConditions . presenceOfElementLocated ( Utilities . getLocator ( pageElement ) ) ) ; } catch ( final Exception e ) { new Result . Failure < > ( e . getMessage ( ) , Messages . getMessage ( Message...
public class LexTokenReader { /** * Read the next character from the stream . The position details are updated , accounting for newlines and tab stops . * The next character is set in the " ch " field , as well as being returned for convenience . * @ return the next character . */ private char rdCh ( ) { } }
char c = super . readCh ( ) ; if ( c == '\n' ) { linecount ++ ; charpos = 0 ; } else if ( c == '\t' ) { charpos += Properties . parser_tabstop - charpos % Properties . parser_tabstop ; } else if ( c != ( char ) - 1 ) { charpos ++ ; } ch = c ; charsread ++ ; offset = getCurrentRawReadOffset ( ) ; // if ( ch = = ' \ r ' ...
public class PrepareRequestInterceptor { /** * Setup accept encoding header from configuration * @ param requestHeaders */ private void setupAcceptEncoding ( Map < String , String > requestHeaders ) { } }
// validates whether to add headers for accept - encoding for compression String acceptCompressionFormat = Config . getProperty ( Config . COMPRESSION_RESPONSE_FORMAT ) ; if ( StringUtils . hasText ( acceptCompressionFormat ) ) { requestHeaders . put ( RequestElements . HEADER_PARAM_ACCEPT_ENCODING , acceptCompressionF...
public class DomHelpers { /** * Marshal a { @ link Document } to { @ link InputStream } * @ param is the InputStream containing XML data * @ return { @ link Document } containg the XML data * @ throws SAXException * @ throws IOException */ public static Document toDocument ( InputStream is ) throws MarshalExcep...
try { return newDocumentBuilder ( ) . parse ( is ) ; } catch ( SAXException e ) { IfmapJLog . error ( e . getMessage ( ) ) ; throw new MarshalException ( e . getMessage ( ) ) ; } catch ( IOException e ) { IfmapJLog . error ( e . getMessage ( ) ) ; throw new MarshalException ( e . getMessage ( ) ) ; }
public class DOMHelper { /** * Test whether the given node is a namespace decl node . In DOM Level 2 * this can be done in a namespace - aware manner , but in Level 1 DOMs * it has to be done by testing the node name . * @ param n Node to be examined . * @ return boolean - - true iff the node is an Attr whose n...
if ( Node . ATTRIBUTE_NODE == n . getNodeType ( ) ) { String attrName = n . getNodeName ( ) ; return ( attrName . startsWith ( "xmlns:" ) || attrName . equals ( "xmlns" ) ) ; } return false ;
public class dnszone { /** * Use this API to unset the properties of dnszone resource . * Properties that need to be unset are specified in args array . */ public static base_response unset ( nitro_service client , dnszone resource , String [ ] args ) throws Exception { } }
dnszone unsetresource = new dnszone ( ) ; unsetresource . zonename = resource . zonename ; return unsetresource . unset_resource ( client , args ) ;
public class AbstractJobLauncher { /** * Combines the specified { @ link JobListener } with the { @ link # mandatoryJobListeners } for this job . Uses * { @ link JobListeners # parallelJobListener ( List ) } to create a { @ link CloseableJobListener } that will execute all * the { @ link JobListener } s in parallel...
List < JobListener > jobListeners = Lists . newArrayList ( this . mandatoryJobListeners ) ; jobListeners . add ( jobListener ) ; Set < String > jobListenerClassNames = jobState . getPropAsSet ( ConfigurationKeys . JOB_LISTENERS_KEY , StringUtils . EMPTY ) ; for ( String jobListenerClassName : jobListenerClassNames ) { ...
public class KMLWriterDriver { /** * Specifies a custom KML schema that is used to add custom data to KML * Features . The " id " attribute is required and must be unique within the * KML file . * < Schema > is always a child of < Document > . * Syntax : * < Schema name = " string " id = " ID " > * < Simple...
columnCount = metaData . getColumnCount ( ) ; // The schema is writing only if there is more than one column if ( columnCount > 1 ) { xmlOut . writeStartElement ( "Schema" ) ; xmlOut . writeAttribute ( "name" , tableName ) ; xmlOut . writeAttribute ( "id" , tableName ) ; // Write column metadata kmlFields = new HashMap...
public class ApiOvhVps { /** * Reinstall the virtual server * REST : POST / vps / { serviceName } / reinstall * @ param doNotSendPassword [ required ] If asked , the installation password will NOT be sent ( only if sshKey defined ) * @ param softwareId [ required ] Id of the vps . Software type fetched in / templ...
String qPath = "/vps/{serviceName}/reinstall" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "doNotSendPassword" , doNotSendPassword ) ; addBody ( o , "language" , language ) ; addBody ( o , "softwareId" , softwareId ) ; addBody ( ...
public class AnimaQuery { /** * Set the column name using lambda , at the same time setting the value , the SQL generated is " column = ? " * @ param function lambda expressions , use the Model : : getXXX * @ param value column value * @ param < S > * @ param < R > * @ return AnimaQuery */ public < S extends ...
String columnName = AnimaUtils . getLambdaColumnName ( function ) ; conditionSQL . append ( " AND " ) . append ( columnName ) . append ( " = ?" ) ; paramValues . add ( value ) ; return this ;
public class FormLoginAuthenticator { /** * This method handle formlogin ; If the SSO cookie exist , then it will use the cookie to authenticate . If * the cookie does not exist , then it will re - redirect to the login page . * @ param req * @ param res * @ param enableRedirect * @ return */ private Authenti...
AuthenticationResult authResult = null ; authResult = ssoAuthenticator . authenticate ( webRequest ) ; if ( authResult != null ) { authResult . setAuditCredType ( AuditEvent . CRED_TYPE_FORM ) ; } if ( authResult != null && authResult . getStatus ( ) != AuthResult . FAILURE ) { postParameterHelper . restore ( req , res...
public class HBaseTableSchema { /** * Returns the HBase identifiers of all registered column qualifiers for a specific column family . * @ param family The name of the column family for which the column qualifier identifiers are returned . * @ return The HBase identifiers of all registered column qualifiers for a s...
Map < String , TypeInformation < ? > > qualifierMap = familyMap . get ( family ) ; if ( qualifierMap == null ) { throw new IllegalArgumentException ( "Family " + family + " does not exist in schema." ) ; } Charset c = Charset . forName ( charset ) ; byte [ ] [ ] qualifierKeys = new byte [ qualifierMap . size ( ) ] [ ] ...
public class srecLexer { /** * $ ANTLR start " COMMENT " */ public final void mCOMMENT ( ) throws RecognitionException { } }
try { int _type = COMMENT ; int _channel = DEFAULT_TOKEN_CHANNEL ; // / home / victor / srec / core / src / main / antlr / srec . g : 155:2 : ( ' # ' ( . ) * NEWLINE ) // / home / victor / srec / core / src / main / antlr / srec . g : 155:4 : ' # ' ( . ) * NEWLINE { match ( '#' ) ; // / home / victor / srec / core / sr...
public class Searcher { /** * Adds a boolean refinement for the next queries . * @ param attribute the attribute to refine on . * @ param value the value to refine with . * @ return this { @ link Searcher } for chaining . */ @ SuppressWarnings ( { } }
"WeakerAccess" , "unused" } ) // For library users public Searcher addBooleanFilter ( String attribute , Boolean value ) { booleanFilterMap . put ( attribute , value ) ; rebuildQueryFacetFilters ( ) ; return this ;
public class JDBCSQLXML { /** * Retrieves this object ' s SQLXML value as a gzipped array of bytes , * possibly by terminating any in - progress write operations and converting * accumulated intermediate data . * @ throws java . sql . SQLException if an underlying I / O or transform * error occurs * @ return ...
byte [ ] bytes = gZipData ( ) ; if ( bytes != null ) { return bytes ; } if ( ( this . outputStream == null ) || ! this . outputStream . isClosed ( ) || this . outputStream . isFreed ( ) ) { throw Exceptions . notReadable ( ) ; } try { setGZipData ( this . outputStream . toByteArray ( ) ) ; return gZipData ( ) ; } catch...
public class Period { /** * Returns a copy of this period with the years and months normalized . * This normalizes the years and months units , leaving the days unit unchanged . * The months unit is adjusted to have an absolute value less than 11, * with the years unit being adjusted to compensate . For example ,...
long totalMonths = toTotalMonths ( ) ; long splitYears = totalMonths / 12 ; int splitMonths = ( int ) ( totalMonths % 12 ) ; // no overflow if ( splitYears == years && splitMonths == months ) { return this ; } return create ( Math . toIntExact ( splitYears ) , splitMonths , days ) ;
public class StringUtil { /** * Takes a string token to be used as a key or qualifier and cleanses out reserved tokens . This * operation is not symetrical . Logic is to replace all spaces and exclamation points with * underscores . * @ param token token to cleanse . * @ return */ public static String cleanseTo...
if ( token == null || token . length ( ) == 0 ) { return token ; } ; String cleansed = token . replaceAll ( SPACE , UNDERSCORE ) ; cleansed = cleansed . replaceAll ( Constants . SEP , UNDERSCORE ) ; return cleansed ;
public class DataContextUtils { /** * Return the resolved value from the context * @ param data data context * @ param group group name * @ param key key name * @ param defaultValue default if the value is not resolvable * @ return resolved value or default */ public static String resolve ( final Map < String...
return null != data && null != data . get ( group ) && null != data . get ( group ) . get ( key ) ? data . get ( group ) . get ( key ) : defaultValue ;
public class RulePhaseFinder { /** * Returns the phases loaded in this finder , sorted by Class . getSimpleName ( ) . */ public List < Class < ? extends RulePhase > > getAvailablePhases ( ) { } }
ArrayList < Class < ? extends RulePhase > > phases = new ArrayList < > ( this . cachedPhases . values ( ) ) ; // It could be sorted by the real order . phases . sort ( new Comparator ( ) { @ Override public int compare ( Object phaseClass1 , Object phaseClass2 ) { if ( phaseClass1 == null || ! ( phaseClass1 instanceof ...
public class CmsXmlUtils { /** * Helper to unmarshal ( read ) xml contents from a String into a document . < p > * Using this method ensures that the OpenCms XML entitiy resolver is used . < p > * @ param xmlData the xml data in a String * @ param resolver the XML entity resolver to use * @ return the base obje...
return CmsXmlUtils . unmarshalHelper ( new InputSource ( new StringReader ( xmlData ) ) , resolver ) ;
public class ProxyServlet { /** * Process an HTML get or post . * @ exception ServletException From inherited class . * @ exception IOException From inherited class . */ public void service ( HttpServletRequest req , HttpServletResponse res ) throws ServletException , IOException { } }
if ( ( proxyURLPrefix == null ) || ( proxyURLPrefix . length ( ) == 0 ) ) { // No proxy specified super . service ( req , res ) ; return ; } ServletOutputStream streamOut = res . getOutputStream ( ) ; try { String proxyURLString = getProxyURLString ( req ) ; HttpRequestBase httpRequest = getHttpRequest ( req , proxyURL...
public class IncludeAnyOfTheseEventsFilterExt { /** * The InTrace UI supports a nice format for specifying multiple classes * in a single string of text - - convenient for copy - n - paste . * If you want com . ibm . MyClass and com . hp . YourClass , then delimit the multiple classes with a bar ( | ) , like this :...
int count = 0 ; StringBuilder sb = new StringBuilder ( ) ; for ( ITraceEvent event : m_criteriaList ) { if ( count ++ > 0 ) sb . append ( CLASS_DELIMITER ) ; sb . append ( event . getPackageAndClass ( ) ) ; } return sb . toString ( ) ;
public class ConnectionImpl { /** * Checks the authority of a consumer to consume from a destination */ @ Deprecated private void checkBrowseAuthority ( DestinationHandler destination , String destinationName , SecurityContext secContext , boolean system ) throws SINotAuthorizedException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkBrowseAuthority" , new Object [ ] { destination , destinationName , secContext , Boolean . valueOf ( system ) } ) ; // Check authority to browse a destination if ( ! destination . isTemporary ( ) && ! system ) { boolea...
public class RuntimeExceptionDeclared { /** * overrides the visitor to find declared runtime exceptions * @ param obj * the method object of the currently parsed method */ @ Override public void visitMethod ( final Method obj ) { } }
if ( obj . isSynthetic ( ) ) { return ; } ExceptionTable et = obj . getExceptionTable ( ) ; if ( et != null ) { String [ ] exNames = et . getExceptionNames ( ) ; Set < String > methodRTExceptions = new HashSet < > ( 6 ) ; int priority = LOW_PRIORITY ; boolean foundRuntime = false ; for ( String ex : exNames ) { boolean...
public class TaggerScanner { /** * 通过识别jar的形式将其下的所有class添加到classSet集合中 . * @ param classLoader 类加载器 * @ param url URL实例 * @ param packageName 包名 * @ param packageDirName 包路径名 */ private void addClassByJar ( ClassLoader classLoader , URL url , String packageName , String packageDirName ) { } }
// 从url中获取jar , 然后从此jar包得到一个枚举类 , 然后进行迭代 . JarFile jar ; try { jar = ( ( JarURLConnection ) url . openConnection ( ) ) . getJarFile ( ) ; Enumeration < JarEntry > entries = jar . entries ( ) ; while ( entries . hasMoreElements ( ) ) { // 获取jar里的一个实体 可以是目录 和一些jar包里的其他文件 如META - INF等文件 JarEntry entry = entries . nextElem...
public class Environment { /** * Returns the value set for the environment variable identified by the given name . If the environment variable * is not set , then { @ code defaultValue } is returned . * @ param environmentVariableName { @ link String } name of the environment variable . * @ param defaultValue the...
return environmentVariables ( ) . get ( environmentVariableName , defaultValue ) ;
public class SDMath { /** * Cosine distance reduction operation . The output contains the cosine distance for each * tensor / subset along the specified dimensions : < br > * out = 1.0 - cosineSimilarity ( x , y ) < br > * See { @ link # cosineSimilarity ( String , SDVariable , SDVariable , int . . . ) } * @ pa...
validateNumerical ( "cosine distance" , x , y ) ; SDVariable result = f ( ) . cosineDistance ( x , y , dimensions ) ; return updateVariableNameAndReference ( result , name ) ;
public class SyncCollection { /** * Returns the limit for the number of results in this request . * @ return The limit or 0 if there is no limit . */ public int getNumberOfResultsLimit ( ) { } }
if ( mLimit == null ) { return 0 ; } Integer limit = ( Integer ) mLimit . get ( WebDavSearch . NRESULTS ) ; return limit == null ? 0 : limit ;
public class DynJS { public Object execute ( String source ) { } }
return newRunner ( ) . withContext ( this . defaultExecutionContext ) . withSource ( source ) . execute ( ) ;
public class KiekerMeasureUtil { /** * Will be called to register the time when the method has started . */ public void measureBefore ( ) { } }
if ( ! CTRLINST . isMonitoringEnabled ( ) ) { return ; } hostname = VMNAME ; sessionId = SESSIONREGISTRY . recallThreadLocalSessionId ( ) ; traceId = CFREGISTRY . recallThreadLocalTraceId ( ) ; // entry point if ( traceId == - 1 ) { entrypoint = true ; traceId = CFREGISTRY . getAndStoreUniqueThreadLocalTraceId ( ) ; CF...
public class Predicate { /** * Create an Iterable view of the specified Iterable that only contains * elements that match the predicate . * This Iterable can be iterated over at any time in the future to * view the current predicate - matching elements of the input Iterable . */ public < E extends T > Iterable < ...
return new Iterable < E > ( ) { public Iterator < E > iterator ( ) { return filter ( input . iterator ( ) ) ; } } ;
public class EntryBuffer { /** * Looks up an entry in the buffer . * @ param index The entry index . * @ param < T > The entry type . * @ return The entry or { @ code null } if the entry is not present in the index . */ @ SuppressWarnings ( "unchecked" ) public < T extends Entry > T get ( long index ) { } }
Entry entry = buffer [ offset ( index ) ] ; return entry != null && entry . getIndex ( ) == index ? ( T ) entry . acquire ( ) : null ;
public class AsynchronousRequest { /** * For more info on Character SAB API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / characters # Super _ Adventure _ Box _ . 28sab . 29 " > here < / a > < br / > * Give user the access to { @ link Callback # onResponse ( Call , Response ) } and { @ link C...
isParamValid ( new ParamChecker ( ParamType . API , API ) , new ParamChecker ( ParamType . CHAR , name ) ) ; gw2API . getCharacterSAB ( name , API ) . enqueue ( callback ) ;
public class Events { /** * Returns the collection of events provided by the given service interface . * @ param serviceInterface the client service interface * @ return the events provided by the given service interface */ public static Map < Method , EventType > getMethodMap ( Class < ? > serviceInterface ) { } }
if ( ! serviceInterface . isInterface ( ) ) { Map < Method , EventType > events = new HashMap < > ( ) ; for ( Class < ? > iface : serviceInterface . getInterfaces ( ) ) { events . putAll ( findMethods ( iface ) ) ; } return events ; } return findMethods ( serviceInterface ) ;
public class ResourceUtils { /** * Collects and combines the selection which may contain sources from * different projects and / or multiple sources from same project . * If selection contains hierarchical data ( like file and it ' s parent * directory ) , the only topmost element is returned ( same for directori...
Map < IProject , List < WorkItem > > projectsMap = new HashMap < > ( ) ; for ( Iterator < ? > iter = structuredSelection . iterator ( ) ; iter . hasNext ( ) ; ) { Object element = iter . next ( ) ; WorkItem workItem = getWorkItem ( element ) ; if ( workItem == null ) { IWorkingSet wset = Util . getAdapter ( IWorkingSet...
public class TaskSkipped { /** * Serialize information about the skipped execution . * @ param out The stream to which this object is serialized . * @ throws IOException */ @ Trivial private void writeObject ( ObjectOutputStream out ) throws IOException { } }
PutField fields = out . putFields ( ) ; fields . put ( FAILURE , failure ) ; fields . put ( PREVIOUS_RESULT , previousResult ) ; out . writeFields ( ) ;
public class OpDef { /** * < pre > * Description of the output ( s ) . * < / pre > * < code > repeated . tensorflow . OpDef . ArgDef output _ arg = 3 ; < / code > */ public java . util . List < org . tensorflow . framework . OpDef . ArgDef > getOutputArgList ( ) { } }
return outputArg_ ;
public class Seed { /** * Translates any exception that occurred in the application using an extensible exception mechanism . * @ param exception the exception to handle . * @ return the translated exception . */ public static BaseException translateException ( Exception exception ) { } }
if ( exception instanceof BaseException ) { return ( BaseException ) exception ; } else { for ( SeedExceptionTranslator exceptionTranslator : exceptionTranslators ) { if ( exceptionTranslator . canTranslate ( exception ) ) { return exceptionTranslator . translate ( exception ) ; } } return SeedException . wrap ( except...
public class ResourceFinder { /** * Assumes the class specified points to a file in the classpath that contains * the name of a class that implements or is a subclass of the specfied class . * Any class that cannot be loaded or are not assignable to the specified class will be * skipped and placed in the ' resour...
resourcesNotLoaded . clear ( ) ; List < Class > implementations = new ArrayList < > ( ) ; List < String > strings = findAvailableStrings ( interfase . getName ( ) ) ; for ( String className : strings ) { try { Class impl = classLoader . loadClass ( className ) ; if ( interfase . isAssignableFrom ( impl ) ) { implementa...
public class AT_Row { /** * Sets the right padding for all cells in the row . * @ param paddingRight new padding , ignored if smaller than 0 * @ return this to allow chaining */ public AT_Row setPaddingRight ( int paddingRight ) { } }
if ( this . hasCells ( ) ) { for ( AT_Cell cell : this . getCells ( ) ) { cell . getContext ( ) . setPaddingRight ( paddingRight ) ; } } return this ;
public class IssueServiceUtils { /** * Collects the group ( s ) an issue belongs to according to its own list of types * and a grouping specification . * @ param issueTypes Issue types * @ param groupingSpecification Group - & gt ; ( Group types ) * @ return List of group the issue belongs to */ public static S...
Set < String > groups = new HashSet < > ( ) ; for ( String issueType : issueTypes ) { for ( Map . Entry < String , Set < String > > entry : groupingSpecification . entrySet ( ) ) { String groupName = entry . getKey ( ) ; Set < String > groupTypes = entry . getValue ( ) ; if ( groupTypes . contains ( issueType ) ) { gro...
public class UISelectMany { /** * < p > Return the number of occurrances of a particular element in the * array . < / p > * @ param element object whose occurrance is to be counted in the array . * @ param array object representing the old value of this component . */ private static int countElementOccurrence ( O...
int count = 0 ; for ( int i = 0 ; i < array . length ; ++ i ) { Object arrayElement = array [ i ] ; if ( arrayElement != null && element != null ) { if ( arrayElement . equals ( element ) ) { count ++ ; } } } return count ;
public class PasswordFilter { /** * / * ( non - Javadoc ) * @ see java . util . logging . Logger # log ( java . util . logging . Level , java . lang . String , java . lang . Object ) */ @ Override public void log ( Level level , String msg , Object param1 ) { } }
super . log ( level , maskPassword ( msg ) , param1 ) ;
public class BigIntStringChecksum { /** * Return the original BigInteger . * ( or throw an exception if something went wrong ) . * @ return BigInteger or throw exception * @ throws SecretShareException if the hex is invalid */ public BigInteger asBigInteger ( ) { } }
try { return new BigInteger ( asHex , HEX_RADIX ) ; } catch ( NumberFormatException e ) { throw new SecretShareException ( "Invalid input='" + asHex + "'" , e ) ; }
public class TemplateParser { /** * Find the corresponding TypeMirror from Elemental2 for a given DOM Element * @ param element The element we want the TypeMirror of * @ return The type mirror */ private TypeMirror getTypeFromDOMElement ( Element element ) { } }
return DOMElementsUtil . getTypeForElementTag ( element . getStartTag ( ) . getName ( ) ) . map ( Class :: getCanonicalName ) . map ( elements :: getTypeElement ) . map ( TypeElement :: asType ) . orElse ( null ) ;
public class Application { /** * Get application context . * @ return application context . */ public static Context getApplicationContext ( ) { } }
com . ardikars . jxnet . context . Context context = com . ardikars . jxnet . context . Application . getApplicationContext ( ) ; return new ApplicationContext ( context ) ;
public class TermStatementUpdate { /** * Helper to format term updates as expected by the Wikibase API * @ param updates * planned updates for the type of term * @ return map ready to be serialized as JSON by Jackson */ protected Map < String , TermImpl > getMonolingualUpdatedValues ( Map < String , NameWithUpdat...
Map < String , TermImpl > updatedValues = new HashMap < > ( ) ; for ( NameWithUpdate update : updates . values ( ) ) { if ( ! update . write ) { continue ; } updatedValues . put ( update . value . getLanguageCode ( ) , monolingualToJackson ( update . value ) ) ; } return updatedValues ;
public class RedisClient { /** * Get a { @ link Mono } that resolves { @ link RedisURI } to a { @ link SocketAddress } . Resolution is performed either using Redis * Sentinel ( if the { @ link RedisURI } is configured with Sentinels ) or via DNS resolution . * Subclasses of { @ link RedisClient } may override that ...
return Mono . defer ( ( ) -> { if ( redisURI . getSentinelMasterId ( ) != null && ! redisURI . getSentinels ( ) . isEmpty ( ) ) { logger . debug ( "Connecting to Redis using Sentinels {}, MasterId {}" , redisURI . getSentinels ( ) , redisURI . getSentinelMasterId ( ) ) ; return lookupRedis ( redisURI ) . switchIfEmpty ...
public class RoundHelper { /** * Source : http : / / www . luschny . de / java / doubleformat . html * @ param dValue * the value to be formatted * @ param nScale * The precision of the decimal scale . If type is * { @ link EDecimalType # FIX } the decimal scale , else the ( carrying scale * - 1 ) . Should ...
ValueEnforcer . isGE0 ( nScale , "Scale" ) ; ValueEnforcer . notNull ( eType , "Type" ) ; ValueEnforcer . notNull ( aLocale , "Locale" ) ; if ( Double . isNaN ( dValue ) || Double . isInfinite ( dValue ) ) return Double . toString ( dValue ) ; // Avoid negative scales final DecimalFormat aDF = ( DecimalFormat ) NumberF...
public class SegmentFelzenszwalbHuttenlocher04 { /** * Searches for root nodes in the graph and adds their size to the list of region sizes . Makes sure all * other nodes in the graph point directly at their root . */ protected void computeOutput ( ) { } }
outputRegionId . reset ( ) ; outputRegionSizes . reset ( ) ; for ( int y = 0 ; y < graph . height ; y ++ ) { int indexGraph = graph . startIndex + y * graph . stride ; for ( int x = 0 ; x < graph . width ; x ++ , indexGraph ++ ) { int parent = graph . data [ indexGraph ] ; if ( parent == indexGraph ) { outputRegionId ....
public class Matrix4f { /** * Set this matrix to a spherical billboard transformation that rotates the local + Z axis of a given object with position < code > objPos < / code > towards * a target position at < code > targetPos < / code > using a shortest arc rotation by not preserving any < i > up < / i > vector of t...
float toDirX = targetPos . x ( ) - objPos . x ( ) ; float toDirY = targetPos . y ( ) - objPos . y ( ) ; float toDirZ = targetPos . z ( ) - objPos . z ( ) ; float x = - toDirY ; float y = toDirX ; float w = ( float ) Math . sqrt ( toDirX * toDirX + toDirY * toDirY + toDirZ * toDirZ ) + toDirZ ; float invNorm = ( float )...
public class VoiceApi { /** * Initiate a conference * Initiate a two - step conference to the specified destination . This places the existing call on hold and creates a new call in the dialing state ( step 1 ) . After initiating the conference you can use [ / voice / calls / { id } / complete - conference ] ( / refe...
ApiResponse < ApiSuccessResponse > resp = initiateConferenceWithHttpInfo ( id , initiateConferenceData ) ; return resp . getData ( ) ;
public class RNAUtils { /** * method to get all nucleotides for one polymer * @ param polymer * PolymerNotation * @ return List of nucleotides of the polmyer * @ throws RNAUtilsException * if the polymer is not rna or dna or the nucleotide can not be * read * @ throws HELM2HandledException * if the poly...
checkRNA ( polymer ) ; List < Nucleotide > nucleotides = new ArrayList < Nucleotide > ( ) ; /* check for HELM2Elements */ List < MonomerNotation > monomerNotations = polymer . getPolymerElements ( ) . getListOfElements ( ) ; for ( int i = 0 ; i < monomerNotations . size ( ) ; i ++ ) { MonomerNotation monomerNotation = ...
public class TextAnalyzer { /** * 重新加载配置数据 。 * @ param keywordDefinitions关键词定义 * @ param lengthDefinitions文本长度类别定义 */ void reloadDefinitions ( Map < String , ? extends Object > keywordDefinitions , Map < Integer , ? extends Object > lengthDefinitions ) { } }
this . lengthDefinitions = lengthDefinitions == null ? null : new TreeMap < Integer , Object > ( lengthDefinitions ) ;
public class Methods { /** * Gets an array of all methods in a class hierarchy walking up to parent classes */ public static Set < Method > getAllMethodsInHierarchy ( Method method ) { } }
LinkedHashSet < Method > allMethods = new LinkedHashSet < > ( ) ; val declaringClass = method . getDeclaringClass ( ) ; return getAllMethodsInHierarchy ( allMethods , declaringClass , method ) ;
public class DynamicURLClassLoader { /** * Returns the permissions for the given codesource object . * The implementation of this method first calls super . getPermissions * and then adds permissions based on the URL of the codesource . * < p > If the protocol is " file " * and the path specifies a file , then ...
final PermissionCollection perms = super . getPermissions ( codesource ) ; final URL url = codesource . getLocation ( ) ; Permission permission ; URLConnection urlConnection ; try { urlConnection = url . openConnection ( ) ; permission = urlConnection . getPermission ( ) ; } catch ( IOException ioe ) { permission = nul...
public class HBaseDataHandler { /** * ( non - Javadoc ) * @ see * com . impetus . client . hbase . admin . DataHandler # readData ( java . lang . String , * java . lang . Class , com . impetus . kundera . metadata . model . EntityMetadata , * java . lang . String , java . util . List ) */ @ Override public List...
Table hTable = gethTable ( tableName ) ; List < HBaseDataWrapper > results = ( ( HBaseReader ) hbaseReader ) . loadAll ( hTable , rowKey , null , columns ) ; return onRead ( m , null , hTable , results ) ;
public class StopWords { /** * 读取stopword * @ param dicPath * stopword所在地址 */ public void read ( String dicPath ) { } }
File path = new File ( dicPath ) ; if ( path . isDirectory ( ) ) { String [ ] subdir = path . list ( new FilenameFilter ( ) { @ Override public boolean accept ( File dir , String name ) { if ( name . toLowerCase ( ) . endsWith ( "txt" ) ) return true ; else return false ; } } ) ; for ( int i = 0 ; i < subdir . length ;...
public class FieldPicker { /** * { @ inheritDoc } */ @ Override protected void setLinkProperty ( final UUID _linkTypeUUID , final long _toId , final UUID _toTypeUUID , final String _toName ) throws EFapsException { } }
if ( _linkTypeUUID . equals ( CIAdminUserInterface . LinkField2Command . uuid ) ) { this . commandID = _toId ; } super . setLinkProperty ( _linkTypeUUID , _toId , _toTypeUUID , _toName ) ;
public class JsMessageVisitor { /** * Converts the given string from upper - underscore case to lower - camel case , * preserving numeric suffixes . For example : " NAME " - > " name " " A4 _ LETTER " - > * " a4Letter " " START _ SPAN _ 1_23 " - > " startSpan _ 1_23 " . */ static String toLowerCamelCaseWithNumericS...
// Determine where the numeric suffixes begin int suffixStart = input . length ( ) ; while ( suffixStart > 0 ) { char ch = '\0' ; int numberStart = suffixStart ; while ( numberStart > 0 ) { ch = input . charAt ( numberStart - 1 ) ; if ( Character . isDigit ( ch ) ) { numberStart -- ; } else { break ; } } if ( ( numberS...
public class FileStore { /** * Load a list of payload * @ param < T > The payload type * @ param clazz The class of the payload * @ return The list of payloads loaded * @ throws IOException */ public < T extends RoxPayload > List < T > load ( Class < T > clazz ) throws IOException { } }
List < T > payloads = new ArrayList < > ( ) ; for ( File f : getTmpDir ( clazz ) . listFiles ( ) ) { if ( f . isFile ( ) ) { InputStreamReader isr = new InputStreamReader ( new FileInputStream ( f ) , Charset . forName ( Constants . ENCODING ) . newDecoder ( ) ) ; payloads . add ( serializer . deserializePayload ( isr ...
public class TextIntWritable { /** * Deserializes a { @ code TextIntWritable } from the provided stream and * returns the resulting object . */ public static TextIntWritable read ( DataInput in ) throws IOException { } }
TextIntWritable tiw = new TextIntWritable ( ) ; tiw . t . readFields ( in ) ; tiw . position = in . readInt ( ) ; return tiw ;
public class CBZip2InputStream { /** * Called by recvDecodingTables ( ) exclusively . */ private void createHuffmanDecodingTables ( final int alphaSize , final int nGroups ) { } }
final Data dataShadow = this . data ; final char [ ] [ ] len = dataShadow . temp_charArray2d ; final int [ ] minLens = dataShadow . minLens ; final int [ ] [ ] limit = dataShadow . limit ; final int [ ] [ ] base = dataShadow . base ; final int [ ] [ ] perm = dataShadow . perm ; for ( int t = 0 ; t < nGroups ; t ++ ) { ...
public class DnsTextEndpointGroup { /** * Creates a { @ link DnsTextEndpointGroup } that schedules queries on a random { @ link EventLoop } from * { @ link CommonPools # workerGroup ( ) } . * @ param hostname the hostname to query DNS queries for * @ param mapping the { @ link Function } that maps the content of ...
return new DnsTextEndpointGroupBuilder ( hostname , mapping ) . build ( ) ;
public class DataGenerator { /** * Main function . It first parses the command line arguments . It then reads * the directory structure from the input directory structure file and * creates directory structure in the file system namespace . Afterwards it * reads the file attributes and creates files in the file ....
int exitCode = 0 ; exitCode = init ( args ) ; if ( exitCode != 0 ) { return exitCode ; } // genDirStructure ( ) ; genFiles ( ) ; return exitCode ;
public class SalesforceExtractor { /** * Login to salesforce * @ return login status */ public boolean bulkApiLogin ( ) throws Exception { } }
log . info ( "Authenticating salesforce bulk api" ) ; boolean success = false ; String hostName = this . workUnitState . getProp ( ConfigurationKeys . SOURCE_CONN_HOST_NAME ) ; String apiVersion = this . workUnitState . getProp ( ConfigurationKeys . SOURCE_CONN_VERSION ) ; if ( Strings . isNullOrEmpty ( apiVersion ) ) ...
public class SerialPort { /** * Get the default serial port for the specified platform / model / board revision . * @ param board hardware board type * @ return com port device path */ public static String getDefaultPort ( SystemInfo . BoardType board ) throws UnsupportedBoardType { } }
switch ( board ) { // ALL RASPBERRY PI MODELS // ( except Model 3B ) case RaspberryPi_A : case RaspberryPi_B_Rev1 : case RaspberryPi_B_Rev2 : case RaspberryPi_A_Plus : case RaspberryPi_B_Plus : case RaspberryPi_ComputeModule : case RaspberryPi_2B : case RaspberryPi_Zero : case RaspberryPi_ComputeModule3 : case Raspberr...
public class UnixCrypt { /** * * Check that enteredPassword encrypts to * encryptedPassword . * @ param encryptedPassword The encryptedPassword . The first two characters are assumed to be the * salt . This string would be the same as one found in a Unix / etc / passwd file . * @ param enteredPassword The passwor...
String salt = encryptedPassword . substring ( 0 , 3 ) ; String newCrypt = crypt ( salt , enteredPassword ) ; return newCrypt . equals ( encryptedPassword ) ;
public class APIAStubFactory { /** * Method to rewrite the default API - A base URL ( specified in the service * locator class FedoraAPIAServiceLocator ) . In this case we allow the * protocol , host , and port parts of the service URL to be replaced . A SOAP * stub will be returned with the desired service endpo...
if ( ! "http" . equalsIgnoreCase ( protocol ) && ! "https" . equalsIgnoreCase ( protocol ) ) { throw new javax . xml . rpc . ServiceException ( "The protocol" + " " + protocol + " is not supported by this service." ) ; } Map < String , Object > props = new HashMap < String , Object > ( ) ; props . put ( "mtom-enabled" ...
public class MessagingSecurityServiceImpl { /** * Create the User / Group set for a particular Role * @ param properties * @ param type * " User " or " Group " * @ return * Set of User / Group */ private Set < String > createUserOrGroupSet ( Dictionary < String , Object > properties , String type ) { } }
SibTr . entry ( tc , CLASS_NAME + "createUserOrGroupSet" , new Object [ ] { properties , type } ) ; Set < String > userOrGroupSet = new HashSet < String > ( ) ; if ( properties != null ) { String [ ] tempUsersOrGroups = ( String [ ] ) properties . get ( type ) ; if ( tempUsersOrGroups != null ) { for ( String tempUserO...
public class JcrTools { /** * Upload the content in the supplied stream into the repository at the defined path , using the given session . This method * will create a ' nt : file ' node at the supplied path , and any non - existant ancestors with nodes of type ' nt : folder ' . As * defined by the JCR specificatio...
isNotNull ( session , "session" ) ; isNotNull ( path , "path" ) ; isNotNull ( stream , "stream" ) ; Node fileNode = null ; boolean error = false ; try { // Create an ' nt : file ' node at the supplied path , creating any missing intermediate nodes of type ' nt : folder ' . . . fileNode = findOrCreateNode ( session . ge...
public class OpenIdServiceResponseBuilder { /** * Determine identity . * @ param service the service * @ param assertion the assertion * @ return the string */ protected String determineIdentity ( final OpenIdService service , final Assertion assertion ) { } }
if ( assertion != null && OpenIdProtocolConstants . OPENID_IDENTIFIERSELECT . equals ( service . getIdentity ( ) ) ) { return this . openIdPrefixUrl + '/' + assertion . getPrimaryAuthentication ( ) . getPrincipal ( ) . getId ( ) ; } return service . getIdentity ( ) ;
public class CommsUtils { /** * Determines whether a message is recoverable compared to the supplied maxUnrecoverableReliability . * @ param mess the message to check . * @ para maxUnrecoverableReliability the most reliable reliability that is considered unrecoverable in the context in which this method is executed...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isRecoverable" , new Object [ ] { mess , maxUnrecoverableReliability } ) ; final Reliability messageReliability = mess . getReliability ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr ...
public class AbstractRemoteClient { /** * { @ inheritDoc } * @ throws InterruptedException { @ inheritDoc } * @ throws CouldNotPerformException { @ inheritDoc } */ @ Override public void deactivate ( ) throws InterruptedException , CouldNotPerformException { } }
synchronized ( maintainerLock ) { try { verifyMaintainability ( ) ; validateInitialization ( ) ; } catch ( InvalidStateException ex ) { // was never initialized ! return ; } if ( connectionState != RECONNECTING ) { skipSyncTasks ( ) ; setConnectionState ( DISCONNECTED ) ; if ( pingTask != null && ! pingTask . isDone ( ...
public class RtfColor { /** * Writes the beginning of this RtfColor */ public void writeBegin ( final OutputStream result ) { } }
try { result . write ( COLOR_NUMBER ) ; result . write ( intToByteArray ( colorNumber ) ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; }
public class CreateIndexRequest { /** * Specifies the attributes that should be indexed on . Currently only a single attribute is supported . * @ param orderedIndexedAttributeList * Specifies the attributes that should be indexed on . Currently only a single attribute is supported . */ public void setOrderedIndexed...
if ( orderedIndexedAttributeList == null ) { this . orderedIndexedAttributeList = null ; return ; } this . orderedIndexedAttributeList = new java . util . ArrayList < AttributeKey > ( orderedIndexedAttributeList ) ;
public class BaseDatasourceFactory { /** * Get and populate the pooled data source object for this database . * @ param database The JDBC database to create a connection to . * @ return The pooled datasource . */ public DataSource getFakePooledDataSource ( JdbcDatabase database ) { } }
ComboPooledDataSource dataSource = new ComboPooledDataSource ( ) ; this . setDatasourceParams ( database , dataSource ) ; return dataSource ;
public class PagingPredicate { /** * Used if inner predicate is instanceof { @ link IndexAwarePredicate } for checking if indexed . * @ param queryContext * @ return */ @ Override public boolean isIndexed ( QueryContext queryContext ) { } }
if ( predicate instanceof IndexAwarePredicate ) { return ( ( IndexAwarePredicate ) predicate ) . isIndexed ( queryContext ) ; } return false ;
public class GenericGenerators { /** * Calls a method with a set of arguments . After execution the stack may have an extra item pushed on it : the object that was returned * by this method ( if any ) . * @ param internalClassName name of class that { @ code method } belongs to ( this is the internal Java name wher...
Validate . notNull ( internalClassName ) ; Validate . notNull ( method ) ; Validate . notNull ( args ) ; Validate . noNullElements ( args ) ; InsnList ret = new InsnList ( ) ; for ( InsnList arg : args ) { ret . add ( arg ) ; } Type [ ] argTypes = Type . getMethodType ( method . desc ) . getArgumentTypes ( ) ; if ( ( m...