signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class StringColumn { /** * { @ inheritDoc } */ @ Override protected String decodeData ( byte [ ] buffer ) { } }
// buffer is guaranteed non - null and proper length String ret = new String ( buffer ) ; ret = ret . trim ( ) ; return ret . isEmpty ( ) ? EMPTY : ret ;
public class OriginationRouteMarshaller { /** * Marshall the given parameter object . */ public void marshall ( OriginationRoute originationRoute , ProtocolMarshaller protocolMarshaller ) { } }
if ( originationRoute == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( originationRoute . getHost ( ) , HOST_BINDING ) ; protocolMarshaller . marshall ( originationRoute . getPort ( ) , PORT_BINDING ) ; protocolMarshaller . marshall ( orig...
public class OWLLiteralImpl_CustomFieldSerializer { /** * Serializes the content of the object into the * { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } . * @ param streamWriter the { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter } to write the * obje...
serialize ( streamWriter , instance ) ;
public class EnvController { /** * list * @ return */ @ RequestMapping ( value = "/list" , method = RequestMethod . GET ) @ ResponseBody public JsonObjectBase list ( ) { } }
List < EnvListVo > envListVos = envMgr . getVoList ( ) ; return buildListSuccess ( envListVos , envListVos . size ( ) ) ;
public class DirectoryLoaderAdaptor { /** * Load the value for a specific key */ protected Object load ( final IndexScopedKey key ) { } }
try { return key . accept ( loadVisitor ) ; } catch ( Exception e ) { throw log . exceptionInCacheLoader ( e ) ; }
public class WordBasedSegment { /** * 原子分词 * @ param sSentence * @ param start * @ param end * @ return * @ deprecated 应该使用字符数组的版本 */ private static List < AtomNode > atomSegment ( String sSentence , int start , int end ) { } }
if ( end < start ) { throw new RuntimeException ( "start=" + start + " < end=" + end ) ; } List < AtomNode > atomSegment = new ArrayList < AtomNode > ( ) ; int pCur = 0 , nCurType , nNextType ; StringBuilder sb = new StringBuilder ( ) ; char c ; // by zhenyulu : // TODO : 使用一系列正则表达式将句子中的完整成分 ( 百分比 、 日期 、 电子邮件 、 URL等 ) ...
public class BaseDestinationHandler { /** * Initialize non - persistent fields . These fields are common to both MS * reconstitution of DestinationHandlers and initial creation . * Feature 174199.2.4 * @ param messageProcessor the message processor instance * @ param durableSubscriptionsTable the topicspace dur...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "initializeNonPersistent" , new Object [ ] { messageProcessor , durableSubscriptionsTable , transaction } ) ; // Check if we are running in an ND environment . If not we can skip // some performance intensive WLM work _singl...
public class EventRecurrence { /** * Determines whether two integer arrays contain identical elements . * The native implementation over - allocated the arrays ( and may have stuff left over from * a previous run ) , so we can ' t just check the arrays - - the separately - maintained count * field also matters . ...
if ( count1 != count2 ) { return false ; } for ( int i = 0 ; i < count1 ; i ++ ) { if ( array1 [ i ] != array2 [ i ] ) return false ; } return true ;
public class BigtableInstanceAdminClient { /** * Asynchronously gets the cluster representation by ID . * < p > Sample code : * < pre > { @ code * ApiFuture < Cluster > clusterFuture = client . getClusterAsync ( " my - instance " , " my - cluster " ) ; * Cluster cluster = clusterFuture . get ( ) ; * } < / pre...
String name = NameUtil . formatClusterName ( projectId , instanceId , clusterId ) ; com . google . bigtable . admin . v2 . GetClusterRequest request = com . google . bigtable . admin . v2 . GetClusterRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return ApiFutures . transform ( stub . getClusterCallable ( ) ...
public class SQLExpressions { /** * Truncate the given date expression * @ param unit date part to truncate to * @ param expr truncated date */ public static < D extends Comparable > DateExpression < D > datetrunc ( DatePart unit , DateExpression < D > expr ) { } }
return Expressions . dateOperation ( expr . getType ( ) , DATE_TRUNC_OPS . get ( unit ) , expr ) ;
public class Disk { /** * Creates a snapshot for this disk given the snapshot ' s name . * @ return a zone operation for snapshot creation * @ throws ComputeException upon failure */ public Operation createSnapshot ( String snapshot , OperationOption ... options ) { } }
return compute . create ( SnapshotInfo . of ( SnapshotId . of ( snapshot ) , getDiskId ( ) ) , options ) ;
public class ExtensionResult { /** * Utility method , returning the ( singleton ) object indicating , no result could be computed . * @ param < S > * ( hypothesis ) state type * @ param < I > * input alphabet type * @ param < O > * output alphabet type * @ return the empty result */ @ SuppressWarnings ( "...
return ( ExtensionResult < S , I , O > ) EMPTY ;
public class LdapCacheService { /** * Factory Methods */ static < R , K > LdapCacheService < R , K > createNoCacheService ( final LdapSearcher < R , K > searcher ) { } }
return new LdapCacheService < R , K > ( searcher , CacheMode . OFF , 0 , false , 0 ) ;
public class Normalization { /** * Normalize by zero mean unit variance * @ param frame the data to normalize * @ return a zero mean unit variance centered * rdd */ public static DataRowsFacade zeromeanUnitVariance ( DataRowsFacade frame , List < String > skipColumns ) { } }
List < String > columnsList = DataFrames . toList ( frame . get ( ) . columns ( ) ) ; columnsList . removeAll ( skipColumns ) ; String [ ] columnNames = DataFrames . toArray ( columnsList ) ; // first row is std second row is mean , each column in a row is for a particular column List < Row > stdDevMean = stdDevMeanCol...
public class DigestAuthenticator { public void sendChallenge ( UserRealm realm , HttpRequest request , HttpResponse response , boolean stale ) throws IOException { } }
response . setField ( HttpFields . __WwwAuthenticate , "Digest realm=\"" + realm . getName ( ) + "\", domain=\"" + response . getHttpContext ( ) . getContextPath ( ) + "\", nonce=\"" + newNonce ( request ) + "\", algorithm=MD5, qop=\"auth\"" + ( useStale ? ( " stale=" + stale ) : "" ) ) ; response . sendError ( HttpRes...
public class ClassFileWriter { /** * Generate code to load the given double on stack . * @ param k the constant */ public void addPush ( double k ) { } }
if ( k == 0.0 ) { // zero add ( ByteCode . DCONST_0 ) ; if ( 1.0 / k < 0 ) { // Negative zero add ( ByteCode . DNEG ) ; } } else if ( k == 1.0 || k == - 1.0 ) { add ( ByteCode . DCONST_1 ) ; if ( k < 0 ) { add ( ByteCode . DNEG ) ; } } else { addLoadConstant ( k ) ; }
public class DomHelper { /** * Create or update an element in the DOM . The id will be generated . * @ param parent * the parent group * @ param name * the local group name of the element ( should be unique within the group ) * @ param type * the type of the element ( tag name , e . g . ' image ' ) * @ pa...
return createOrUpdateElement ( parent , name , type , style , true ) ;
public class DropTargetHelper { /** * Register a new DropPasteWorkerInterface . * @ param worker The new worker */ public void registerDropPasteWorker ( DropPasteWorkerInterface worker ) { } }
this . dropPasteWorkerSet . add ( worker ) ; defaultDropTarget . setDefaultActions ( defaultDropTarget . getDefaultActions ( ) | worker . getAcceptableActions ( defaultDropTarget . getComponent ( ) ) ) ;
public class MithraTransactionalPortal { /** * / * returns null if the members of the list are not all participating in the transaction */ private List checkTransactionParticipationAndWaitForOtherTransactions ( List list , MithraTransaction tx ) { } }
if ( list == null ) return null ; List result = list ; if ( this . getTxParticipationMode ( tx ) . mustParticipateInTxOnRead ( ) ) { for ( int i = 0 ; i < list . size ( ) ; i ++ ) { MithraTransactionalObject mto = ( MithraTransactionalObject ) list . get ( i ) ; if ( ! mto . zIsParticipatingInTransaction ( tx ) ) { res...
public class TargetSession { /** * Sets the target name and retrieves the target ( if it exists ) from the TargetServer * @ param targetName */ public void setTargetName ( String targetName ) { } }
if ( targetName == null ) target = null ; target = targetServer . getTarget ( targetName ) ;
public class WriterFactoryImpl { /** * { @ inheritDoc } */ @ Override public AnnotationTypeRequiredMemberWriter getAnnotationTypeRequiredMemberWriter ( AnnotationTypeWriter annotationTypeWriter ) { } }
TypeElement te = annotationTypeWriter . getAnnotationTypeElement ( ) ; return new AnnotationTypeRequiredMemberWriterImpl ( ( SubWriterHolderWriter ) annotationTypeWriter , te ) ;
public class WaveUtils { /** * Re - writes the data size in the header ( bytes 4-8 ) of the WAVE ( . wav ) input stream . < br > * It needs to be read in order to calculate the size . * @ param is the input stream * @ return A new input stream that includes the data header in the header * @ throws IOException S...
byte [ ] audioBytes = toByteArray ( is ) ; int filesize = audioBytes . length - WAVE_HEADER_SIZE ; writeInt ( filesize , audioBytes , WAVE_SIZE_POS ) ; writeInt ( filesize - WAVE_HEADER_SIZE , audioBytes , WAVE_METADATA_POS ) ; return new ByteArrayInputStream ( audioBytes ) ;
public class RichByteBufferPool { /** * Actual creates the proxy which will handle the calls to the real WsByteBuffer . * @ param actualBuffer * @ return */ RichByteBufferImpl getFromPool ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getFromPool" ) ; RichByteBufferImpl buffer = ( RichByteBufferImpl ) byteBufferWrapperPool . remove ( ) ; if ( buffer == null ) { buffer = new RichByteBufferImpl ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) &...
public class AnnotationTypeBuilder { /** * Build the annotation type field documentation . * @ param node the XML element that specifies which components to document * @ param memberDetailsTree the content tree to which the documentation will be added * @ throws DocletException if there is a problem building the ...
configuration . getBuilderFactory ( ) . getAnnotationTypeFieldsBuilder ( writer ) . buildChildren ( node , memberDetailsTree ) ;
public class LocalLockMediator { /** * Acquire the lock specified by { @ code kc } . * For any particular key - column , whatever value of { @ code requestor } is * passed to this method must also be passed to the associated later call to * { @ link # unlock ( KeyColumn , ExpectedValueCheckingTransaction ) } . ...
assert null != kc ; assert null != requestor ; AuditRecord < T > audit = new AuditRecord < > ( requestor , expires ) ; AuditRecord < T > inmap = locks . putIfAbsent ( kc , audit ) ; boolean success = false ; if ( null == inmap ) { // Uncontended lock succeeded if ( log . isTraceEnabled ( ) ) { log . trace ( "New local ...
public class SpanUtil { /** * Converts from an Accumulo Key to a Fluo RowColumn * @ param key Key * @ return RowColumn */ public static RowColumn toRowColumn ( Key key ) { } }
if ( key == null ) { return RowColumn . EMPTY ; } if ( ( key . getRow ( ) == null ) || key . getRow ( ) . getLength ( ) == 0 ) { return RowColumn . EMPTY ; } Bytes row = ByteUtil . toBytes ( key . getRow ( ) ) ; if ( ( key . getColumnFamily ( ) == null ) || key . getColumnFamily ( ) . getLength ( ) == 0 ) { return new ...
public class CmsDriverManager { /** * Returns < code > true < / code > if a user is member of the given group . < p > * @ param dbc the current database context * @ param username the name of the user to check * @ param groupname the name of the group to check * @ param readRoles if to read roles or groups * ...
List < CmsGroup > groups = getGroupsOfUser ( dbc , username , readRoles ) ; for ( int i = 0 ; i < groups . size ( ) ; i ++ ) { CmsGroup group = groups . get ( i ) ; if ( groupname . equals ( group . getName ( ) ) || groupname . substring ( 1 ) . equals ( group . getName ( ) ) ) { return true ; } } return false ;
public class NewOnChangeHandler { /** * The Field has Changed . * Do an addNew ( ) on the target record . * @ param bDisplayOption If true , display the change . * @ param iMoveMode The type of move being done ( init / read / screen ) . * @ return The error code ( or NORMAL _ RETURN if okay ) . * Field Change...
try { m_recTarget . addNew ( ) ; } catch ( DBException e ) { return e . getErrorCode ( ) ; } return DBConstants . NORMAL_RETURN ;
public class CmsSourceEditor { /** * Returns the syntax highlighting type for the currently edited resource . < p > * @ param resource the resource to edit * @ return the syntax highlighting type */ public CodeMirrorLanguage getHighlightMode ( CmsResource resource ) { } }
if ( resource != null ) { // determine resource type int type = resource . getTypeId ( ) ; if ( CmsResourceTypeJsp . isJspTypeId ( type ) ) { // JSP file return CodeMirrorLanguage . JSP ; } if ( CmsResourceTypeXmlContent . isXmlContent ( resource ) || CmsResourceTypeXmlPage . isXmlPage ( resource ) ) { // XML content f...
public class Project { /** * A collection of regression plans that belong to this project . * @ param filter Criteria to filter on . Project ( s ) will be set automatically . * If null , all related regression items in the project are returned . * @ param includeSubprojects Specifies whether to include items from...
filter = ( filter != null ) ? filter : new RegressionPlanFilter ( ) ; filter . project . clear ( ) ; if ( includeSubprojects ) { for ( Project project : getThisAndAllChildProjects ( ) ) { filter . project . add ( project ) ; } } else { filter . project . add ( this ) ; } return getInstance ( ) . get ( ) . regressionPla...
public class XLinkUtils { /** * Naive model to view assignment . * The current model is choosen for the first occurence of the view . */ private static Map < String , ModelDescription > assigneModelsToViews ( Map < ModelDescription , XLinkConnectorView [ ] > modelsToViews ) { } }
HashMap < String , ModelDescription > viewsToModels = new HashMap < String , ModelDescription > ( ) ; for ( ModelDescription modelInfo : modelsToViews . keySet ( ) ) { List < XLinkConnectorView > currentViewList = Arrays . asList ( modelsToViews . get ( modelInfo ) ) ; for ( XLinkConnectorView view : currentViewList ) ...
public class DescribeStacksResult { /** * An array of < code > Stack < / code > objects that describe the stacks . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setStacks ( java . util . Collection ) } or { @ link # withStacks ( java . util . Collection ) }...
if ( this . stacks == null ) { setStacks ( new com . amazonaws . internal . SdkInternalList < Stack > ( stacks . length ) ) ; } for ( Stack ele : stacks ) { this . stacks . add ( ele ) ; } return this ;
public class SraReader { /** * Read a run set from the specified URL . * @ param url URL , must not be null * @ return a run set read from the specified URL * @ throws IOException if an I / O error occurs */ public static RunSet readRunSet ( final URL url ) throws IOException { } }
checkNotNull ( url ) ; try ( BufferedReader reader = Resources . asCharSource ( url , Charsets . UTF_8 ) . openBufferedStream ( ) ) { return readRunSet ( reader ) ; }
public class MethodUtils { /** * Gets the wrapper object class for the given primitive type class . * For example , passing < code > boolean . class < / code > returns < code > Boolean . class < / code > * @ param primitiveType the primitive type class for which a match is to be found * @ return the wrapper type ...
// does anyone know a better strategy than comparing names ? if ( boolean . class . equals ( primitiveType ) ) { return Boolean . class ; } else if ( float . class . equals ( primitiveType ) ) { return Float . class ; } else if ( long . class . equals ( primitiveType ) ) { return Long . class ; } else if ( int . class ...
public class JSSEHelper { /** * This method creates an SSLContext for use by an SSL application or component . * Precedence logic will determine which parameters are used for creating the * SSLContext . The selection precedence rules are : * < ol > * < li > Direct - The sslAliasName parameter , when specified ,...
return getSSLContext ( sslAliasName , connectionInfo , listener , true ) ;
public class GoogleMapShapeConverter { /** * Transform the bounding box in the feature projection to web mercator * @ param boundingBox bounding box in feature projection * @ return bounding box in web mercator */ public BoundingBox boundingBoxToWebMercator ( BoundingBox boundingBox ) { } }
if ( projection == null ) { throw new GeoPackageException ( "Shape Converter projection is null" ) ; } return boundingBox . transform ( toWebMercator ) ;
public class ISOUPTree { /** * Method for updating ( training ) the model using a new instance */ public void trainOnInstanceImpl ( MultiLabelInstance inst ) { } }
if ( inst . weight ( ) > 0 ) { checkRoot ( ) ; double [ ] prediction = treeRoot . getPrediction ( inst ) ; double [ ] normalError = getNormalizedError ( inst , prediction ) ; // normalError . scaleValues ( inst . weight ( ) ) ; processInstance ( inst , treeRoot , prediction , normalError , true , false ) ; examplesSeen...
public class BinaryPropertyProcessor { /** * Deserialize this object from a POF stream . * @ param reader POF reader to use * @ throws IOException if an error occurs during deserialization */ public void readExternal ( PofReader reader ) throws IOException { } }
super . readExternal ( reader ) ; navigator = ( PofNavigator ) reader . readObject ( 0 ) ;
public class JmxMBeans { /** * region refreshing jmx */ private void handleJmxRefreshables ( List < MBeanWrapper > mbeanWrappers , AttributeNodeForPojo rootNode ) { } }
for ( MBeanWrapper mbeanWrapper : mbeanWrappers ) { Eventloop eventloop = mbeanWrapper . getEventloop ( ) ; List < JmxRefreshable > currentRefreshables = rootNode . getAllRefreshables ( mbeanWrapper . getMBean ( ) ) ; if ( ! eventloopToJmxRefreshables . containsKey ( eventloop ) ) { eventloopToJmxRefreshables . put ( e...
public class StackSizeSimulator { /** * Initializes the runtime stack sizes with the given instructions . This has to be called before { @ link StackSizeSimulator # simulateStatementBackwards } * @ param instructions The instructions to simulate */ void buildStackSizes ( final List < Instruction > instructions ) { } ...
stackSizes = new ArrayList < > ( ) ; int stackSize = 0 ; for ( Instruction instruction : instructions ) { final int previousStackSize = stackSize ; stackSize += instruction . getStackSizeDifference ( ) ; if ( isStackCleared ( instruction ) ) stackSize = 0 ; if ( stackSize < 0 ) { throw new IllegalStateException ( "Runt...
public class ChainDataImpl { /** * Enables external entities to be notified of chain events described in * ChainEventListener interface . * @ param listener */ public final void addChainEventListener ( ChainEventListener listener ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "addChainEventListener: " + listener ) ; } if ( null != listener ) { this . chainEventListeners . add ( listener ) ; }
public class MultiMessage { /** * Decodes the messages using the provided { @ link TempFileContext temporary file context } . */ public static MultiMessage decode ( String encodedMessages , TempFileContext tempFileContext ) throws IOException { } }
if ( encodedMessages . isEmpty ( ) ) return EMPTY_MULTI_MESSAGE ; int pos = encodedMessages . indexOf ( DELIMITER ) ; if ( pos == - 1 ) throw new IllegalArgumentException ( "Delimiter not found" ) ; final int size = Integer . parseInt ( encodedMessages . substring ( 0 , pos ++ ) ) ; List < Message > decodedMessages = n...
public class AutoElasticsearch { /** * { @ inheritDoc } * @ deprecated This is available for any storm cluster that operates against the older method of credential renewal */ @ Override public void renew ( Map < String , String > credentials , Map topologyConf ) { } }
renew ( credentials , topologyConf , null ) ;
public class DevicePoolCompatibilityResult { /** * Information about the compatibility . * @ param incompatibilityMessages * Information about the compatibility . */ public void setIncompatibilityMessages ( java . util . Collection < IncompatibilityMessage > incompatibilityMessages ) { } }
if ( incompatibilityMessages == null ) { this . incompatibilityMessages = null ; return ; } this . incompatibilityMessages = new java . util . ArrayList < IncompatibilityMessage > ( incompatibilityMessages ) ;
public class DRL5Lexer { /** * $ ANTLR start " EOL " */ public final void mEOL ( ) throws RecognitionException { } }
try { // src / main / resources / org / drools / compiler / lang / DRL5Lexer . g : 80:6 : ( ( ( ' \ \ r \ \ n ' ) = > ' \ \ r \ \ n ' | ' \ \ r ' | ' \ \ n ' ) ) // src / main / resources / org / drools / compiler / lang / DRL5Lexer . g : 81:12 : ( ( ' \ \ r \ \ n ' ) = > ' \ \ r \ \ n ' | ' \ \ r ' | ' \ \ n ' ) { // ...
public class EmptyResourceBundlePostProcessor { /** * ( non - Javadoc ) * @ see net . jawr . web . resource . bundle . postprocess . * AbstractChainedResourceBundlePostProcessor # doPostProcessBundle ( net . jawr . * web . resource . bundle . postprocess . BundleProcessingStatus , * java . lang . StringBuffer )...
if ( status . getProcessingType ( ) . equals ( BundleProcessingStatus . FILE_PROCESSING_TYPE ) && status . getJawrConfig ( ) . getResourceType ( ) . equals ( JawrConstant . JS_TYPE ) ) { if ( bundleData . toString ( ) . trim ( ) . endsWith ( ")" ) ) { bundleData . append ( ";" ) ; } } return bundleData ;
public class TopicAdminClient { /** * Gets the configuration of a topic . * < p > Sample code : * < pre > < code > * try ( TopicAdminClient topicAdminClient = TopicAdminClient . create ( ) ) { * ProjectTopicName topic = ProjectTopicName . of ( " [ PROJECT ] " , " [ TOPIC ] " ) ; * Topic response = topicAdminC...
GetTopicRequest request = GetTopicRequest . newBuilder ( ) . setTopic ( topic ) . build ( ) ; return getTopic ( request ) ;
public class ClassNameResolver { /** * 增加类名过滤器 * @ param classNameFilter 类名过滤器t */ public void addFilter ( ClassNameFilter classNameFilter ) { } }
writeLock . lock ( ) ; try { if ( filters == null ) { filters = new ArrayList < ClassNameFilter > ( ) ; } filters . add ( classNameFilter ) ; // 从小到大 , 先进优先 Collections . sort ( filters , new Comparator < ClassNameFilter > ( ) { public int compare ( ClassNameFilter o1 , ClassNameFilter o2 ) { return o1 . order ( ) - o2...
public class JsonWriter { /** * Closes the current scope by appending any necessary whitespace and the * given bracket . */ private JsonWriter close ( int empty , int nonempty , String closeBracket ) throws IOException { } }
int context = peek ( ) ; if ( context != nonempty && context != empty ) { throw new IllegalStateException ( "Nesting problem." ) ; } if ( deferredName != null ) { throw new IllegalStateException ( "Dangling name: " + deferredName ) ; } stackSize -- ; if ( context == nonempty ) { newline ( ) ; } out . write ( closeBrack...
public class DescriptorInstantiator { /** * Creates a { @ link Descriptor } instance from the specified implementation class name , also using the specified name * @ param implClass * @ param descriptorName * @ return * @ throws IllegalArgumentException * If either argument is not specified */ static Descript...
// Precondition checks if ( implClass == null ) { throw new IllegalArgumentException ( "implClass must be specified" ) ; } if ( descriptorName == null || descriptorName . length ( ) == 0 ) { throw new IllegalArgumentException ( "descriptorName must be specified" ) ; } // Get the constructor to use in making the new ins...
public class SymbolType { /** * Builds a symbol for a type variable from a list of upper bounds . * @ param typeVariable the name of the variable * @ param upperBounds the upper bounds of the type variable * @ return a SymbolType that represents a variable ( for generics ) */ public static SymbolType typeVariable...
return new SymbolType ( upperBounds , typeVariable ) ;
public class Job { /** * Invoke this method from within the { @ code run } method of a < b > generator * job < / b > in order to specify a job node in the generated child job graph . * This version of the method is for child jobs that take zero arguments . * @ param < T > The return type of the child job being sp...
return futureCallUnchecked ( settings , jobInstance ) ;
public class NumberExpression { /** * Create a { @ code this between from and to } expression * < p > Is equivalent to { @ code from < = this < = to } < / p > * @ param < A > * @ param from inclusive start of range * @ param to inclusive end of range * @ return this between from and to */ public final < A ext...
if ( from == null ) { if ( to != null ) { return loe ( to ) ; } else { throw new IllegalArgumentException ( "Either from or to needs to be non-null" ) ; } } else if ( to == null ) { return goe ( from ) ; } else { return between ( ConstantImpl . create ( cast ( from ) ) , ConstantImpl . create ( cast ( to ) ) ) ; }
public class BaseDestinationDefinitionImpl { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . admin . BaseDestinationDefinition # getDescription ( ) */ public String getDescription ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDescription" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDescription" , _description ) ; return _description ;
public class ConversionManager { /** * Converts from String based on isAssignableFrom or instanceof * @ param rawString * @ param type * @ return ConversionStatus < T > whether a converter is found and the converted value */ protected ConversionStatus convertCompatible ( String rawString , Class < ? > type ) { } ...
ConversionStatus status = new ConversionStatus ( ) ; for ( PriorityConverter con : converters . getAll ( ) ) { Type key = con . getType ( ) ; if ( key instanceof Class ) { Class < ? > clazz = ( Class < ? > ) key ; if ( type . isAssignableFrom ( clazz ) ) { Object converted = convert ( rawString , key ) ; status . setCo...
public class CPDefinitionSpecificationOptionValueUtil { /** * Returns the first cp definition specification option value in the ordered set where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( o...
return getPersistence ( ) . fetchByUuid_C_First ( uuid , companyId , orderByComparator ) ;
public class Transform1D { /** * Transform the specified 1.5D point . * If the point is on a segment from the Transform1D path , it will be transformed * to follow the path . If the point is not on a segment from the Transform1D path , * the curviline and shift transformations will be simply added . * @ param p...
"checkstyle:cyclomaticcomplexity" , "checkstyle:nestedifdepth" } ) public int transform ( Point1D < ? , ? , S > point , Tuple2D < ? > appliedTranslation ) { assert point != null : AssertMessages . notNullParameter ( 0 ) ; assert point . getSegment ( ) != null ; int idx ; double distanceToSegmentEnd ; Direction1D direct...
public class GitlabAPI { /** * Get a list of tags in specific project * @ param projectId * @ return */ public List < GitlabTag > getTags ( Serializable projectId ) { } }
String tailUrl = GitlabProject . URL + "/" + sanitizeProjectId ( projectId ) + GitlabTag . URL + PARAM_MAX_ITEMS_PER_PAGE ; return retrieve ( ) . getAll ( tailUrl , GitlabTag [ ] . class ) ;
public class CommerceDiscountUsageEntryPersistenceImpl { /** * Returns the commerce discount usage entries before and after the current commerce discount usage entry in the ordered set where groupId = & # 63 ; . * @ param commerceDiscountUsageEntryId the primary key of the current commerce discount usage entry * @ ...
CommerceDiscountUsageEntry commerceDiscountUsageEntry = findByPrimaryKey ( commerceDiscountUsageEntryId ) ; Session session = null ; try { session = openSession ( ) ; CommerceDiscountUsageEntry [ ] array = new CommerceDiscountUsageEntryImpl [ 3 ] ; array [ 0 ] = getByGroupId_PrevAndNext ( session , commerceDiscountUsag...
public class Calendar { /** * Implementing binary search for zone transtion detection , used by { @ link # getPreviousZoneTransitionTime ( TimeZone , long , long ) } * @ param tz The time zone . * @ param upperOffset The zone offset at < code > upper < / code > * @ param upper The upper bound , inclusive . * @ ...
boolean onUnitTime = false ; long mid = 0 ; for ( int unit : FIND_ZONE_TRANSITION_TIME_UNITS ) { long lunits = lower / unit ; long uunits = upper / unit ; if ( uunits > lunits ) { mid = ( ( lunits + uunits + 1 ) >>> 1 ) * unit ; onUnitTime = true ; break ; } } int midOffset ; if ( ! onUnitTime ) { mid = ( upper + lower...
public class PhaseOneOptions { /** * { @ inheritDoc } */ @ Override protected void processSetting ( String name , String value ) { } }
super . processSetting ( name , value ) ; if ( INPUT_PATH_DESC . equals ( name ) ) inputPath = value ;
public class Tree { /** * Appends the specified byte array to the end of this List ( or adds the * value to this Set - it depends on the type of this node ) . Sample code : * < br > * < br > * byte [ ] b1 = QFiles . readFile ( " path / to / file1 " ) ; < br > * byte [ ] b2 = QFiles . readFile ( " path / to / ...
if ( asBase64String ) { return addObjectInternal ( BASE64 . encode ( value ) ) ; } return addObjectInternal ( value ) ;
public class AbstractObjectStore { /** * ( non - Javadoc ) * @ see com . ibm . ws . objectManager . ObjectStore # clear ( ) */ protected synchronized void clear ( ) throws ObjectManagerException { } }
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "clear" ) ; // All ManagedObjects are new sequence number up to initialSequenceNumber are reserved . sequenceNumber = initialSequenceNumber ; allocationAllowed = true ; inMemoryTokens = new WeakValueConcurrentHashMap ...
public class PathQueryParser { /** * Recursive BFS tree walker * @ param node current node */ private void treeWalker ( Node node , int level , List < PathQueryMatcher > queryMatchers , List < Node > collector ) { } }
MatchType matchType = queryMatchers . get ( level ) . match ( level , node ) ; if ( matchType == MatchType . NOT_A_MATCH ) { // no reason to scan deeper // noinspection UnnecessaryReturnStatement return ; } else if ( matchType == MatchType . NODE_MATCH ) { // we have a match if ( level == queryMatchers . size ( ) - 1 )...
public class Tr { /** * private : If we already have ( or can get ) the allTraceComponentsLock * process the new trace components */ private static void processNewTraceComponents ( ) { } }
if ( allTraceComponentsLock . tryLock ( ) ) { try { TraceComponent tc = newTracecomponents . poll ( ) ; while ( tc != null ) { allTraceComponents . add ( tc ) ; tc = newTracecomponents . poll ( ) ; } } finally { allTraceComponentsLock . unlock ( ) ; } }
public class AbstractContainerHelper { /** * Indicates whether there is an error which has been propogated from the action to the render phase . * @ return true if there is a propogated escape , false otherwise . */ private boolean havePropogatedError ( ) { } }
Request req = getRequest ( ) ; return req != null && req . getAttribute ( ACTION_ERROR_KEY ) != null ;
public class AbstractWebPageForm { /** * Create toolbar for viewing an existing object . Contains the back button and * the edit button . * @ param aWPEC * The web page execution context . Never < code > null < / code > . * @ param bCanGoBack * < code > true < / code > to enable back button * @ param aSelec...
final Locale aDisplayLocale = aWPEC . getDisplayLocale ( ) ; final TOOLBAR_TYPE aToolbar = createNewViewToolbar ( aWPEC ) ; if ( bCanGoBack ) { // Back to list aToolbar . addButtonBack ( aDisplayLocale ) ; } if ( isActionAllowed ( aWPEC , EWebPageFormAction . EDIT , aSelectedObject ) ) { // Edit object aToolbar . addBu...
public class CmsEditSiteForm { /** * Checks if given Ou has resources matching to currently set parent folder . < p > * @ param ou to check * @ return true if ou is ok for parent folder */ private boolean ouIsOK ( CmsOrganizationalUnit ou ) { } }
try { for ( CmsResource res : OpenCms . getOrgUnitManager ( ) . getResourcesForOrganizationalUnit ( m_clonedCms , ou . getName ( ) ) ) { if ( m_simpleFieldParentFolderName . getValue ( ) . startsWith ( res . getRootPath ( ) ) ) { return true ; } } } catch ( CmsException e ) { LOG . error ( "Unable to read Resources for...
public class sslfips { /** * Use this API to update sslfips . */ public static base_response update ( nitro_service client , sslfips resource ) throws Exception { } }
sslfips updateresource = new sslfips ( ) ; updateresource . inithsm = resource . inithsm ; updateresource . sopassword = resource . sopassword ; updateresource . oldsopassword = resource . oldsopassword ; updateresource . userpassword = resource . userpassword ; updateresource . hsmlabel = resource . hsmlabel ; return ...
public class LineageEventBuilder { /** * Create a { @ link LineageEventBuilder } from a { @ link GobblinEventBuilder } . An inverse function * to { @ link LineageEventBuilder # build ( ) } */ public static LineageEventBuilder fromEvent ( GobblinTrackingEvent event ) { } }
Map < String , String > metadata = event . getMetadata ( ) ; LineageEventBuilder lineageEvent = new LineageEventBuilder ( event . getName ( ) ) ; metadata . forEach ( ( key , value ) -> { switch ( key ) { case SOURCE : lineageEvent . setSource ( Descriptor . fromJson ( value ) ) ; break ; case DESTINATION : lineageEven...
public class AuthTokenManager { /** * Implementation of PBKDF2WithHmacSHA1 */ private static boolean validateToken ( String originalToken , String storedToken ) throws NoSuchAlgorithmException , InvalidKeySpecException { } }
String [ ] parts = storedToken . split ( ":" ) ; int iterations = Integer . parseInt ( parts [ 0 ] ) ; byte [ ] salt = fromHex ( parts [ 1 ] ) ; byte [ ] hash = fromHex ( parts [ 2 ] ) ; PBEKeySpec spec = new PBEKeySpec ( originalToken . toCharArray ( ) , salt , iterations , hash . length * 8 ) ; SecretKeyFactory skf =...
public class RouteBuilder { /** * Sets the targeted action method of the resulting route . * @ param controller the controller object , must not be { @ literal null } . * @ param method the method name , must not be { @ literal null } . * @ return the current route builder */ public Route to ( Controller controll...
Preconditions . checkNotNull ( controller ) ; Preconditions . checkNotNull ( method ) ; this . controller = controller ; try { this . controllerMethod = verifyThatControllerAndMethodExists ( controller . getClass ( ) , method ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( ERROR_CTRL + method + ERROR...
public class ReadCommittedStrategy { /** * acquire a read lock on Object obj for Transaction tx . * @ param tx the transaction requesting the lock * @ param obj the Object to be locked * @ return true if successful , else false */ public boolean readLock ( TransactionImpl tx , Object obj ) { } }
LockEntry writer = getWriter ( obj ) ; if ( writer == null ) { addReader ( tx , obj ) ; // if there has been a successful write locking , try again if ( getWriter ( obj ) == null ) return true ; else { removeReader ( tx , obj ) ; return readLock ( tx , obj ) ; } } if ( writer . isOwnedBy ( tx ) ) { return true ; // If ...
public class Permutations { /** * Generates the next permutation ( algorithm from Rosen p . 284) * @ return an array containing the next permutation */ public Integer [ ] nextPermutation ( ) { } }
if ( permLeft . equals ( permTotal ) ) { permLeft = permLeft . subtract ( BigInteger . ONE ) ; return position ; } // Find largest index j with a [ j ] < a [ j + 1] int j = position . length - 2 ; while ( position [ j ] > position [ j + 1 ] ) { j -- ; } // Find index k such that a [ k ] is smallest integer // greater t...
public class ImportVolumeRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < ImportVolumeRequest > getDryRunRequest ( ) { } }
Request < ImportVolumeRequest > request = new ImportVolumeRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class FloatSubject { /** * Ensures that the given tolerance is a non - negative finite value , i . e . not { @ code Float . NaN } , * { @ code Float . POSITIVE _ INFINITY } , or negative , including { @ code - 0.0f } . */ static void checkTolerance ( float tolerance ) { } }
checkArgument ( ! Float . isNaN ( tolerance ) , "tolerance cannot be NaN" ) ; checkArgument ( tolerance >= 0.0f , "tolerance (%s) cannot be negative" , tolerance ) ; checkArgument ( floatToIntBits ( tolerance ) != NEG_ZERO_BITS , "tolerance (%s) cannot be negative" , tolerance ) ; checkArgument ( tolerance != Float . P...
public class LuceneHelper { /** * depends on document size , but > 0.01 should be a good threshold * @ return a score that reflects if needle subsumes haystack */ public static float subsumes ( String haystack , final String needle ) { } }
if ( needle == null || needle . length ( ) < 0 || haystack == null || haystack . length ( ) < 0 ) return 0f ; try { // index the cleaned text RAMDirectory idx = new RAMDirectory ( ) ; IndexWriterConfig iwc = new IndexWriterConfig ( LUCENE_41 , anal ) ; IndexWriter writer = new IndexWriter ( idx , iwc ) ; // index Docum...
public class CmsImageCacheHolder { /** * Clones a CmsObject . < p > * @ param cms the CmsObject to be cloned . * @ return a clones CmsObject * @ throws CmsException if something goes wrong */ private CmsObject getClonedCmsObject ( CmsObject cms ) throws CmsException { } }
CmsObject clonedCms = OpenCms . initCmsObject ( cms ) ; // only online images get caches clonedCms . getRequestContext ( ) . setCurrentProject ( clonedCms . readProject ( CmsProject . ONLINE_PROJECT_ID ) ) ; // paths are always root path clonedCms . getRequestContext ( ) . setSiteRoot ( "" ) ; return clonedCms ;
public class TSDB { /** * Gets the entire given row from the data table . */ final Deferred < ArrayList < KeyValue > > get ( final byte [ ] key ) { } }
return client . get ( new GetRequest ( table , key , FAMILY ) ) ;
public class SarlBehaviorUnitBuilderImpl { /** * Create the block of code . * @ return the block builder . */ public IBlockExpressionBuilder getExpression ( ) { } }
IBlockExpressionBuilder block = this . blockExpressionProvider . get ( ) ; block . eInit ( getTypeResolutionContext ( ) ) ; XBlockExpression expr = block . getXBlockExpression ( ) ; this . sarlBehaviorUnit . setExpression ( expr ) ; return block ;
public class TableLocation { /** * Change case of parameters to make it more user - friendly . * @ param identifier Table , Catalog , Schema , or column name * @ param isH2Database True if H2 , False if PostGreSQL , null if unknown * @ return Upper or lower case version of identifier */ public static String capsI...
if ( isH2Database != null ) { if ( isH2Database ) { return identifier . toUpperCase ( ) ; } else { return identifier . toLowerCase ( ) ; } } else { return identifier ; }
public class Scroller { /** * Call this when you want to know the new location . If it returns true , * the animation is not yet finished . loc will be altered to provide the * new location . */ public boolean computeScrollOffset ( ) { } }
if ( mFinished ) { return false ; } int timePassed = ( int ) ( AnimationUtils . currentAnimationTimeMillis ( ) - mStartTime ) ; if ( timePassed < mDuration ) { switch ( mMode ) { case SCROLL_MODE : float x = timePassed * mDurationReciprocal ; if ( mInterpolator == null ) x = viscousFluid ( x ) ; else x = mInterpolator ...
public class DescribeJobFlowsRequest { /** * Return only job flows whose state is contained in this list . * @ param jobFlowStates * Return only job flows whose state is contained in this list . * @ see JobFlowExecutionState */ public void setJobFlowStates ( java . util . Collection < String > jobFlowStates ) { }...
if ( jobFlowStates == null ) { this . jobFlowStates = null ; return ; } this . jobFlowStates = new com . amazonaws . internal . SdkInternalList < String > ( jobFlowStates ) ;
public class TreeRenderer { /** * Write out the images that create the leading indentation for the given node . * @ param writer the appender where the node indentation images are appended * @ param node the node to render * @ param level the level or depth of the node within the tree * @ param state the set of...
InternalStringBuilder img = new InternalStringBuilder ( 32 ) ; // Create the appropriate number of indents // These are either the spacer . gif if the parent is the last in the line or the // vertical line gif if the parent is not the last child . _imgState . clear ( ) ; _imgState . registerAttribute ( AbstractHtmlStat...
public class UserBroker { /** * Returns the contents of an Excel row in the form of a String array . * @ see com . ibm . ccd . common . parsing . Parser # splitLine ( ) */ public User addUser ( Set < User > users ) throws Exception { } }
if ( m_iCurrentRow == m_iNbRows ) return null ; Row row = m_sheet . getRow ( m_iCurrentRow ) ; if ( row == null ) { return null ; } else { // extract fields from excel sheet String userName = extractCellData ( row , 0 ) ; String tweetBody = extractCellData ( row , 1 ) ; String videoId = extractCellData ( row , 2 ) ; St...
public class Parser { /** * Parse a new - expression , or if next token isn ' t { @ link Token # NEW } , * a primary expression . * @ param allowCallSyntax passed down to { @ link # memberExprTail } */ private AstNode memberExpr ( boolean allowCallSyntax ) throws IOException { } }
int tt = peekToken ( ) , lineno = ts . lineno ; AstNode pn ; if ( tt != Token . NEW ) { pn = primaryExpr ( ) ; } else { consumeToken ( ) ; int pos = ts . tokenBeg ; NewExpression nx = new NewExpression ( pos ) ; AstNode target = memberExpr ( false ) ; int end = getNodeEnd ( target ) ; nx . setTarget ( target ) ; int lp...
public class MinioClient { /** * Removes an object from a bucket . * < / p > < b > Example : < / b > < br > * < pre > { @ code minioClient . removeObject ( " my - bucketname " , " my - objectname " ) ; } < / pre > * @ param bucketName Bucket name . * @ param objectName Object name in the bucket . * @ throws I...
if ( ( bucketName == null ) || ( bucketName . isEmpty ( ) ) ) { throw new InvalidArgumentException ( "bucket name cannot be empty" ) ; } if ( ( objectName == null ) || ( objectName . isEmpty ( ) ) ) { throw new InvalidArgumentException ( "object name cannot be empty" ) ; } executeDelete ( bucketName , objectName , null...
public class EscapableResourceIdSplitter { /** * Joins a list of elements into a resource id , escaping * special characters if required . * See { @ link # splitIdIntoElements ( String ) } for details . * @ param elements a list of elements * @ return the resource id */ @ Override public String joinElementsToId...
Preconditions . checkNotNull ( elements , "elements argument" ) ; StringBuilder sb = new StringBuilder ( ) ; for ( String el : elements ) { // Skip null elements if ( el == null ) { continue ; } // Trim the elements and skip any empty ones String trimmedEl = el . trim ( ) ; if ( trimmedEl . length ( ) < 1 ) { continue ...
public class AbsObAxis { /** * Atomizes an operand according to the rules specified in the XPath * specification . * @ param mOperand * the operand to atomize * @ return the atomized operand . ( always an atomic value ) */ private AtomicValue atomize ( final AbsAxis mOperand ) { } }
int type = getNode ( ) . getTypeKey ( ) ; AtomicValue atom ; if ( XPATH_10_COMP ) { atom = new AtomicValue ( ( ( ITreeValData ) getNode ( ) ) . getRawValue ( ) , getNode ( ) . getTypeKey ( ) ) ; } else { // unatomicType is cast to double if ( type == NamePageHash . generateHashForString ( "xs:untypedAtomic" ) ) { type ...
public class JcsegServerConfig { /** * initialize it from the specified config file * @ param configFile * @ throws IOException */ public void resetFromFile ( String configFile ) throws IOException { } }
IStringBuffer isb = new IStringBuffer ( ) ; String line = null ; BufferedReader reader = new BufferedReader ( new FileReader ( configFile ) ) ; while ( ( line = reader . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . equals ( "" ) ) continue ; if ( line . charAt ( 0 ) == '#' ) continue ; isb . append (...
public class AbstractTurtleOBDAVisitor { /** * in case of more than two terms need to be concatted */ private ImmutableTerm getNestedConcat ( String str ) { } }
List < ImmutableTerm > terms ; terms = addToTermsList ( str ) ; if ( terms . size ( ) == 1 ) { return terms . get ( 0 ) ; } ImmutableFunctionalTerm f = termFactory . getImmutableFunctionalTerm ( ExpressionOperation . CONCAT , terms . get ( 0 ) , terms . get ( 1 ) ) ; for ( int j = 2 ; j < terms . size ( ) ; j ++ ) { f ...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcDuctFittingTypeEnum createIfcDuctFittingTypeEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcDuctFittingTypeEnum result = IfcDuctFittingTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class Gauge { /** * Defines the type of knob that will be used in the radial * gauges . The values are STANDARD , PLAIN , METAL and FLAT . * @ param TYPE */ public void setKnobType ( final KnobType TYPE ) { } }
if ( null == knobType ) { _knobType = null == TYPE ? KnobType . STANDARD : TYPE ; fireUpdateEvent ( RESIZE_EVENT ) ; } else { knobType . set ( TYPE ) ; }
public class CShareableResource { /** * { @ inheritDoc } * @ param i the model to use to inspect the VMs . * @ return the set of VMs that cannot have their associated { @ link Preserve } constraint satisfy with regards * to a possible { @ link Overbook } and single - node { @ link ResourceCapacity } constraint . ...
for ( SatConstraint c : i . getSatConstraints ( ) ) { if ( ! ( c instanceof ResourceRelated && ( ( ResourceRelated ) c ) . getResource ( ) . equals ( rc . getResourceIdentifier ( ) ) ) ) { continue ; } if ( c instanceof Preserve ) { VM v = c . getInvolvedVMs ( ) . iterator ( ) . next ( ) ; wantedAmount . put ( v , cons...
public class CmsProperty { /** * Replaces the given delimiter character with the replacement string . < p > * @ param value the string that is scanned * @ param delimiter the delimiter character to replace * @ param delimiterReplacement the replacement string for the delimiter character * @ return the substitut...
return CmsStringUtil . substitute ( value , String . valueOf ( delimiter ) , delimiterReplacement ) ;
public class BaseDestinationDefinitionImpl { /** * ( non - Javadoc ) * @ see com . ibm . ws . sib . admin . BaseDestinationDefinition # getUUID ( ) */ public SIBUuid12 getUUID ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getUUID" , this . _uuid ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "getUUID" ) ; } return _uuid ;
public class CmsExplorerTypeAccess { /** * Creates the access control list from the temporary map . < p > * @ param resourceType the name of the resource type * @ throws CmsException if something goes wrong */ public void createAccessControlList ( String resourceType ) throws CmsException { } }
if ( OpenCms . getRunLevel ( ) < OpenCms . RUNLEVEL_2_INITIALIZING ) { // we don ' t need this for simple test cases return ; } if ( m_permissionsCache == null ) { m_permissionsCache = CmsMemoryMonitor . createLRUCacheMap ( 2048 ) ; OpenCms . getMemoryMonitor ( ) . register ( this . getClass ( ) . getName ( ) + "." + r...
public class ModifyCacheClusterRequest { /** * The list of Availability Zones where the new Memcached cache nodes are created . * This parameter is only valid when < code > NumCacheNodes < / code > in the request is greater than the sum of the number * of active cache nodes and the number of cache nodes pending cre...
if ( this . newAvailabilityZones == null ) { setNewAvailabilityZones ( new com . amazonaws . internal . SdkInternalList < String > ( newAvailabilityZones . length ) ) ; } for ( String ele : newAvailabilityZones ) { this . newAvailabilityZones . add ( ele ) ; } return this ;
public class Generics { /** * Finds the type parameter for the given class which is assignable to the bound class . * @ param klass a parameterized class * @ param bound the type bound * @ param < T > the type bound * @ return the class ' s type parameter */ public static < T > Class < T > getTypeParameter ( Cl...
Type t = requireNonNull ( klass ) ; while ( t instanceof Class < ? > ) { t = ( ( Class < ? > ) t ) . getGenericSuperclass ( ) ; } /* This is not guaranteed to work for all cases with convoluted piping * of type parameters : but it can at least resolve straight - forward * extension with single type parameter ( as p...
public class WSelectToggleRenderer { /** * Paints the given WSelectToggle . * @ param component the WSelectToggle to paint . * @ param renderContext the RenderContext to paint to . */ @ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } }
WSelectToggle toggle = ( WSelectToggle ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; xml . appendTagOpen ( "ui:selecttoggle" ) ; xml . appendAttribute ( "id" , component . getId ( ) ) ; xml . appendOptionalAttribute ( "class" , component . getHtmlClass ( ) ) ; xml . appendOptionalAttribute ( "tra...