signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class GroupElement { /** * Negates this group element by subtracting it from the neutral group element . * TODO - CR BR : why not simply negate the coordinates $ X $ and $ T $ ? * @ return The negative of this group element . */ public org . mariadb . jdbc . internal . com . send . authentication . ed25519 ....
if ( this . repr != Representation . P3 ) { throw new UnsupportedOperationException ( ) ; } return this . curve . getZero ( Representation . P3 ) . sub ( toCached ( ) ) . toP3 ( ) ;
public class GBSNode { /** * Search the whole node . * < p > Look in the whole node to find an index entry that is one of < / p > * < ol > * < li > an exact match for the supplied key , * < li > greater than the supplied key , or * < li > greater than or equal to the supplied key . * < / ol > * < p > The ...
int idx = - 1 ; if ( comp . type ( ) == SearchComparator . EQ ) idx = findEqual ( comp , 0 , rightMostIndex ( ) , searchKey ) ; else idx = findGreater ( comp , 0 , rightMostIndex ( ) , searchKey ) ; return idx ;
public class Snappy { /** * Validates that the offset extracted from a compressed reference is within * the permissible bounds of an offset ( 0 < offset < Integer . MAX _ VALUE ) , and does not * exceed the length of the chunk currently read so far . * @ param offset The offset extracted from the compressed refer...
if ( offset == 0 ) { throw new DecompressionException ( "Offset is less than minimum permissible value" ) ; } if ( offset < 0 ) { // Due to arithmetic overflow throw new DecompressionException ( "Offset is greater than maximum value supported by this implementation" ) ; } if ( offset > chunkSizeSoFar ) { throw new Deco...
public class ImageUtils { /** * Calculates the bounds of the non - transparent parts of the given image . * @ param p the image * @ return the bounds of the non - transparent area */ public static Rectangle getSelectedBounds ( BufferedImage p ) { } }
int width = p . getWidth ( ) ; int height = p . getHeight ( ) ; int maxX = 0 , maxY = 0 , minX = width , minY = height ; boolean anySelected = false ; int y1 ; int [ ] pixels = null ; for ( y1 = height - 1 ; y1 >= 0 ; y1 -- ) { pixels = getRGB ( p , 0 , y1 , width , 1 , pixels ) ; for ( int x = 0 ; x < minX ; x ++ ) { ...
public class CharsetScanner { /** * Find the GEDCOM charset in the attributes of the header . * @ param gob the header ged object * @ return the GEDCOM charset */ private String findCharsetInHeader ( final GedObject gob ) { } }
for ( final GedObject hgob : gob . getAttributes ( ) ) { if ( "Character Set" . equals ( hgob . getString ( ) ) ) { return ( ( Attribute ) hgob ) . getTail ( ) ; } } return "UTF-8" ;
public class IssueGridScreen { /** * Add button ( s ) to the toolbar . */ public void addToolbarButtons ( ToolScreen toolScreen ) { } }
new SCannedBox ( toolScreen . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . SET_ANCHOR ) , toolScreen , null , ScreenConstants . DEFAULT_DISPLAY , null , MenuConstants . FORMDETAIL , MenuConstants . FORMDETAIL , MenuConstants . FORMDETAIL , null ) ; toolScreen . getScreenRecord ( ) . getField ( I...
public class ImageAnchorCell { /** * Sets the client - side image map declaration for the HTML iage tag . * @ param usemap the map declaration . * @ jsptagref . attributedescription The client - side image map declaration for the HTML image tag . * @ jsptagref . attributesyntaxvalue < i > string _ useMap < / i > ...
_imageState . registerAttribute ( AbstractHtmlState . ATTR_GENERAL , HtmlConstants . USEMAP , usemap ) ;
public class WhitespaceTokenizer { /** * Separates the tokens of a string by splitting it on white space . * @ param text * @ return */ @ Override public List < String > tokenize ( String text ) { } }
List < String > tokens = new ArrayList < > ( Arrays . asList ( text . split ( "[\\p{Z}\\p{C}]+" ) ) ) ; return tokens ;
public class TriggerBuilder { /** * Produce the < code > Trigger < / code > . * @ return a Trigger that meets the specifications of the builder . */ @ Nonnull public T build ( ) { } }
if ( m_aScheduleBuilder == null ) m_aScheduleBuilder = SimpleScheduleBuilder . simpleSchedule ( ) ; final IMutableTrigger trig = m_aScheduleBuilder . build ( ) ; trig . setCalendarName ( m_sCalendarName ) ; trig . setDescription ( m_sDescription ) ; trig . setStartTime ( m_aStartTime ) ; trig . setEndTime ( m_aEndTime ...
public class QueryBuilder { /** * Similar to { @ link # join ( QueryBuilder ) } but this allows you to link two tables that share a field of the same * type . So even if there is _ not _ a foreign - object relationship between the tables , you can JOIN them . This will * add into the SQL something close to " INNER ...
addJoinInfo ( JoinType . INNER , localColumnName , joinedColumnName , joinedQueryBuilder , JoinWhereOperation . AND ) ; return this ;
public class PaginationAutoMapInterceptor { /** * 获取总记录数 * @ param sql 原始sql语句 * @ param conn * @ param ms * @ param boundSql * @ return * @ throws SQLException */ private int getTotalCount ( String sql , Connection conn , MappedStatement ms , BoundSql boundSql ) throws SQLException { } }
int start = sql . indexOf ( "from" ) ; if ( start == - 1 ) { throw new RuntimeException ( "statement has no 'from' keyword" ) ; } int stop = sql . indexOf ( "order by" ) ; if ( stop == - 1 ) { stop = sql . length ( ) ; } String countSql = "select count(0) " + sql . substring ( start , stop ) ; BoundSql countBoundSql = ...
public class FacebookRestClient { /** * Logs an exception with an introductory message in addition to the * exception ' s getMessage ( ) . * @ param msg message * @ param e exception * @ see Exception # getMessage */ protected void logException ( CharSequence msg , Exception e ) { } }
System . err . println ( msg + ":" + e . getMessage ( ) ) ; e . printStackTrace ( ) ;
public class ISPNQuotaPersister { /** * { @ inheritDoc } */ public boolean isNodeQuotaAsync ( String repositoryName , String workspaceName , String nodePath ) throws UnknownQuotaLimitException { } }
String workspaceUniqueName = composeWorkspaceUniqueName ( repositoryName , workspaceName ) ; CacheKey key = new NodeQuotaKey ( workspaceUniqueName , nodePath ) ; return getQuotaValue ( key ) . getAsyncUpdate ( ) ;
public class ProviderUtil { /** * Loads an individual Provider implementation . This method is really only useful for the OSGi bundle activator and * this class itself . * @ param url the URL to the provider properties file * @ param cl the ClassLoader to load the provider classes with */ protected static void lo...
try { final Properties props = PropertiesUtil . loadClose ( url . openStream ( ) , url ) ; if ( validVersion ( props . getProperty ( API_VERSION ) ) ) { final Provider provider = new Provider ( props , url , cl ) ; PROVIDERS . add ( provider ) ; LOGGER . debug ( "Loaded Provider {}" , provider ) ; } } catch ( final IOE...
public class DigesterImpl { /** * Returns the message digest . The representation of the message digest * depends on the outputMode property . * @ param message the message * @ return the message digest * @ see # setOutputMode ( OutputMode ) */ public String digest ( String message ) { } }
final byte [ ] messageAsByteArray ; try { messageAsByteArray = message . getBytes ( charsetName ) ; } catch ( UnsupportedEncodingException e ) { throw new DigestException ( "error converting message to byte array: charsetName=" + charsetName , e ) ; } final byte [ ] digest = digest ( messageAsByteArray ) ; switch ( out...
public class ResponseCacheInterceptor { /** * Set the appropriate response headers for caching or not caching the response . * @ param renderContext the rendering context */ @ Override public void paint ( final RenderContext renderContext ) { } }
// Set headers getResponse ( ) . setHeader ( "Cache-Control" , type . getSettings ( ) ) ; // Add extra no cache headers if ( ! type . isCache ( ) ) { getResponse ( ) . setHeader ( "Pragma" , "no-cache" ) ; getResponse ( ) . setHeader ( "Expires" , "-1" ) ; } super . paint ( renderContext ) ;
public class ClassGraph { /** * Returns { @ link ModuleRef } references for all the visible modules . * @ return a list of { @ link ModuleRef } references for all the visible modules . * @ throws ClassGraphException * if any of the worker threads throws an uncaught exception , or the scan was interrupted . */ pub...
scanSpec . performScan = false ; try ( ScanResult scanResult = scan ( ) ) { return scanResult . getModules ( ) ; }
public class AlgorithmOptions { /** * This method clones the specified AlgorithmOption object with the possibility for further * changes . */ public static Builder start ( AlgorithmOptions opts ) { } }
Builder b = new Builder ( ) ; if ( opts . algorithm != null ) b . algorithm ( opts . getAlgorithm ( ) ) ; if ( opts . traversalMode != null ) b . traversalMode ( opts . getTraversalMode ( ) ) ; if ( opts . weighting != null ) b . weighting ( opts . getWeighting ( ) ) ; if ( opts . maxVisitedNodes >= 0 ) b . maxVisitedN...
public class UrlUtils { /** * adds the domain if missing . * @ param aUrl the url to check * @ param aDomain the domain to add * @ return the url including the domain */ public static String addDomainIfMissing ( final String aUrl , final String aDomain ) { } }
if ( aUrl != null && ! aUrl . isEmpty ( ) && aUrl . startsWith ( "/" ) ) { return aDomain + aUrl ; } return aUrl ;
public class ClassFileImporter { /** * Delegates to { @ link # importPaths ( Collection ) } */ @ PublicAPI ( usage = ACCESS ) public JavaClasses importPaths ( Path ... paths ) { } }
return importPaths ( ImmutableSet . copyOf ( paths ) ) ;
public class GroupApi { /** * Get a list of variables for the specified group in the specified page range . * < pre > < code > GitLab Endpoint : GET / groups / : id / variables < / code > < / pre > * @ param groupIdOrPath the group ID , path of the group , or a Group instance holding the group ID or path * @ para...
Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "variables" ) ; return ( response . readEntity ( new GenericType < List < Variable > > ( ) { } ) ) ;
public class NikeFS2LazyRandomAccessStorageImpl { /** * This method alerts all child soft copies of this storage to consolidate ; * called prior to modification of this instance . The child soft copies so * alerted will detach from this instance consequently . */ public synchronized void alertSoftCopies ( ) throws ...
// make a copy of the list of soft copies , as they will deregister // within the loop ( removing themselves from our internal list ) NikeFS2LazyRandomAccessStorageImpl [ ] copies = softCopies . toArray ( new NikeFS2LazyRandomAccessStorageImpl [ softCopies . size ( ) ] ) ; for ( NikeFS2LazyRandomAccessStorageImpl copy ...
public class WebSecurityScannerClient { /** * Stops a ScanRun . The stopped ScanRun is returned . * < p > Sample code : * < pre > < code > * try ( WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient . create ( ) ) { * ScanRunName name = ScanRunName . of ( " [ PROJECT ] " , " [ SCAN _ CO...
StopScanRunRequest request = StopScanRunRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return stopScanRun ( request ) ;
public class Choice5 { /** * { @ inheritDoc } */ @ Override public < F > Choice5 < A , B , C , D , E > discardR ( Applicative < F , Choice5 < A , B , C , D , ? > > appB ) { } }
return Monad . super . discardR ( appB ) . coerce ( ) ;
public class SearchUtils { /** * Converts a date to the default string representation in FTS ( RFC 3339 ) . * @ param date the { @ link Date } to convert . * @ return the RFC 3339 representation of the date , in UTC timezone ( eg . " 2016-01-19T14:44:01Z " ) */ public static String toFtsUtcString ( Date date ) { } ...
if ( date == null ) { return null ; } DateFormat rfc3339 = df . get ( ) ; String zDate = rfc3339 . format ( date ) ; String xDate = zDate . replaceFirst ( "\\+0000$" , "Z" ) ; return xDate ;
public class InMemoryValueInspector { /** * { @ inheritDoc } . * If present in the cache , return the cached { @ link com . typesafe . config . Config } for given input * Otherwise , simply delegate the functionality to the internal { ConfigStoreValueInspector } and store the value into cache */ @ Override public C...
return getResolvedConfig ( configKey , Optional . < Config > absent ( ) ) ;
public class EJSContainer { /** * This method is driven when dispatch is called upon a server request . * It should return a ' cookie ' Object which uniquely identifies this preinvoke . * This ' cookie ' should be passed as a paramater when the corresponding * postinvoke is called . * @ param object the IDL Ser...
final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) { // toString of ' object ' can be quite large and can really bloat the // trace . . . . so just trace the class name ; usually the tie name or // class loader name . The IOR or classpath is not traced . d13...
public class DefaultFacelet { /** * Delegates resolution to DefaultFaceletFactory reference . Also , caches URLs for relative paths . * @ param path * a relative url path * @ return URL pointing to destination * @ throws IOException * if there is a problem creating the URL for the path specified */ private UR...
URL url = ( URL ) _relativePaths . get ( path ) ; if ( url == null ) { url = _factory . resolveURL ( facesContext , _src , path ) ; if ( url != null ) { ViewResource viewResource = ( ViewResource ) facesContext . getAttributes ( ) . get ( FaceletFactory . LAST_RESOURCE_RESOLVED ) ; if ( viewResource != null ) { // If a...
public class CmsXmlHtmlValue { /** * Creates the String value for this HTML value element . < p > * @ param cms an initialized instance of a CmsObject * @ param document the XML document this value belongs to * @ return the String value for this HTML value element */ private String createStringValue ( CmsObject c...
Element data = m_element . element ( CmsXmlPage . NODE_CONTENT ) ; if ( data == null ) { String content = m_element . getText ( ) ; m_element . clearContent ( ) ; int index = m_element . getParent ( ) . elements ( m_element . getQName ( ) ) . indexOf ( m_element ) ; m_element . addAttribute ( CmsXmlPage . ATTRIBUTE_NAM...
public class MakeValidOp { /** * Use map to restore M values on the coordinate array */ private CoordinateSequence restoreDim4 ( CoordinateSequence cs , Map < Coordinate , Double > map ) { } }
CoordinateSequence seq = new PackedCoordinateSequenceFactory ( DOUBLE , 4 ) . create ( cs . size ( ) , 4 ) ; for ( int i = 0 ; i < cs . size ( ) ; i ++ ) { seq . setOrdinate ( i , 0 , cs . getOrdinate ( i , 0 ) ) ; seq . setOrdinate ( i , 1 , cs . getOrdinate ( i , 1 ) ) ; seq . setOrdinate ( i , 2 , cs . getOrdinate (...
public class Geometry { /** * < p > Compute the pairwise squared distances between all columns of the two * matrices . < / p > * < p > An efficient way to do this is to observe that < i > ( x - y ) ^ 2 = x ^ 2 - 2xy - y ^ 2 < / i > * and to then properly carry out the computation with matrices . < / p > */ public...
if ( X . rows != Y . rows ) throw new IllegalArgumentException ( "Matrices must have same number of rows" ) ; FloatMatrix XX = X . mul ( X ) . columnSums ( ) ; FloatMatrix YY = Y . mul ( Y ) . columnSums ( ) ; FloatMatrix Z = X . transpose ( ) . mmul ( Y ) ; Z . muli ( - 2.0f ) ; // Z . print ( ) ; Z . addiColumnVector...
public class SRTServletRequest { /** * { @ inheritDoc } Returns true if the user is authenticated and is in the * specified role . False otherwise . * This logic is delegatd to the registered IWebAppSecurityCollaborator . */ public boolean isUserInRole ( String role ) { } }
if ( WCCustomProperties . CHECK_REQUEST_OBJECT_IN_USE ) { checkRequestObjectInUse ( ) ; } boolean userInRole ; IWebAppSecurityCollaborator webAppSec = CollaboratorHelperImpl . getCurrentSecurityCollaborator ( ) ; if ( webAppSec != null ) { userInRole = webAppSec . isUserInRole ( role , this ) ; } else { // No IWebAppSe...
public class VlcjDevice { /** * Get capture device protocol . This will be : * < ul > * < li > < code > dshow : / / < / code > for Windows < / li > * < li > < code > qtcapture : / / < / code > for Mac < / li > * < li > < code > v4l2 : / / < / code > for linux < / li > * < / ul > * @ return Capture device pr...
switch ( OsUtils . getOS ( ) ) { case WIN : return "dshow://" ; case OSX : return "qtcapture://" ; case NIX : return "v4l2://" ; default : throw new WebcamException ( "Capture device not supported on " + OsUtils . getOS ( ) ) ; }
public class HBaseSchemaManager { /** * get Table metadata method returns the HTableDescriptor of table for given * tableInfo * @ return HHTableDescriptor object for tableInfo */ private HTableDescriptor getTableMetaData ( List < TableInfo > tableInfos ) { } }
HTableDescriptor tableDescriptor = new HTableDescriptor ( databaseName ) ; Properties tableProperties = null ; schemas = HBasePropertyReader . hsmd . getDataStore ( ) != null ? HBasePropertyReader . hsmd . getDataStore ( ) . getSchemas ( ) : null ; if ( schemas != null && ! schemas . isEmpty ( ) ) { for ( Schema s : sc...
public class MaxValueReducer { /** * ~ Methods * * * * * */ @ Override public Double reduce ( List < Double > values ) { } }
if ( values == null || values . isEmpty ( ) ) { return null ; } Stream < Double > stream = StreamSupport . stream ( values . spliterator ( ) , true ) ; if ( stream . allMatch ( o -> o == null ) ) { stream . close ( ) ; return null ; } stream . close ( ) ; double max = Double . NEGATIVE_INFINITY ; for ( Double value : v...
public class ExternalType { /** * { @ inheritDoc } */ @ Override public final void to ( File f ) throws IOException { } }
if ( f == null ) throw new NullPointerException ( ) ; FileOutputStream fos = null ; try { fos = new FileOutputStream ( f ) ; ObjectOutputStream oos = new ObjectOutputStream ( fos ) ; to ( oos ) ; } finally { if ( fos != null ) fos . close ( ) ; }
public class ASN1 { /** * Decode an EC PKCS # 8 private key structure * @ param encodedData bytes containing the private key * @ return tag / value from the decoded object * @ throws CoseException - ASN . 1 encoding errors */ public static ArrayList < TagValue > DecodePKCS8 ( byte [ ] encodedData ) throws CoseExc...
TagValue pkcs8 = DecodeCompound ( 0 , encodedData ) ; if ( pkcs8 . tag != 0x30 ) throw new CoseException ( "Invalid PKCS8 structure" ) ; ArrayList < TagValue > retValue = pkcs8 . list ; if ( retValue . size ( ) != 3 && retValue . size ( ) != 4 ) { throw new CoseException ( "Invalid PKCS8 structure" ) ; } // Version num...
public class EBCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . EBC__BCDO_NAME : setBCdoName ( ( String ) newValue ) ; return ; case AfplibPackage . EBC__TRIPLETS : getTriplets ( ) . clear ( ) ; getTriplets ( ) . addAll ( ( Collection < ? extends Triplet > ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class DRL6Expressions { /** * src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 653:1 : createdName : ( ID ( typeArguments ) ? ( DOT ID ( typeArguments ) ? ) * | primitiveType ) ; */ public final void createdName ( ) throws RecognitionException { } }
try { // src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 654:5 : ( ID ( typeArguments ) ? ( DOT ID ( typeArguments ) ? ) * | primitiveType ) int alt79 = 2 ; int LA79_0 = input . LA ( 1 ) ; if ( ( LA79_0 == ID ) ) { int LA79_1 = input . LA ( 2 ) ; if ( ( ! ( ( ( ( ( helper . validateIdent...
public class AbstractHtmlTableCell { /** * Base HTML table cell rendering functionality which opens and closes the HTML & lt ; td & gt ; tags with * the correct style and attribute information . Between the table cell tags , the tag * calls the { @ link # renderDataCellContents ( org . apache . beehive . netui . ta...
DataGridTagModel dataGridModel = DataGridUtil . getDataGridTagModel ( getJspContext ( ) ) ; if ( dataGridModel == null ) throw new JspException ( Bundle . getErrorString ( "DataGridTags_MissingDataGridModel" ) ) ; TableRenderer tableRenderer = dataGridModel . getTableRenderer ( ) ; assert tableRenderer != null ; /* tod...
public class RegisterWebAppVisitorWC { /** * Registers servlets with web container . * @ throws NullArgumentException if servlet is null * @ see WebAppVisitor # visit ( org . ops4j . pax . web . extender . war . internal . model . WebAppServlet ) */ public void visit ( final WebAppServlet webAppServlet ) { } }
NullArgumentException . validateNotNull ( webAppServlet , "Web app servlet" ) ; final String [ ] urlPatterns = webAppServlet . getAliases ( ) ; if ( urlPatterns == null || urlPatterns . length == 0 ) { LOG . warn ( "Servlet [" + webAppServlet + "] does not have any mapping. Skipped." ) ; } try { if ( webAppServlet inst...
public class DeleteProvisionedProductPlanRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteProvisionedProductPlanRequest deleteProvisionedProductPlanRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteProvisionedProductPlanRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteProvisionedProductPlanRequest . getAcceptLanguage ( ) , ACCEPTLANGUAGE_BINDING ) ; protocolMarshaller . marshall ( deleteProvisionedProductPlan...
public class RoomInfoImpl { /** * / * ( non - Javadoc ) * @ see com . tvd12 . ezyfox . core . command . UpdateRoomInfo # addUser ( com . tvd12 . ezyfox . core . entities . ApiBaseUser ) */ @ Override public void addUser ( ApiBaseUser user ) { } }
try { room . addUser ( CommandUtil . getSfsUser ( user , api ) ) ; } catch ( SFSJoinRoomException e ) { throw new IllegalStateException ( e ) ; }
public class ConfigCache { /** * Gets from the cache or create , an instance of the given class using the given imports . * @ param factory the factory to use to eventually create the instance . * @ param key the key object to be used to identify the instance in the cache . * @ param clazz the interface extending...
T existing = get ( key ) ; if ( existing != null ) return existing ; T created = factory . create ( clazz , imports ) ; T raced = add ( key , created ) ; return raced != null ? raced : created ;
public class WebPage { /** * Method for creating WebPage only with name * ( this can be useful for really simple sitemaps * or with combination of default settings * set on SitemapGenerator ) * @ param nameSupplier Name supplier ( cannot return null ! ! ! ) * @ return WebPage instance * @ throws NullPointer...
Objects . requireNonNull ( nameSupplier ) ; Objects . requireNonNull ( nameSupplier . get ( ) ) ; WebPage webPage = new WebPage ( ) ; webPage . setName ( nameSupplier . get ( ) ) ; return webPage ;
public class BaseSparseNDArrayCOO { /** * Returns a subset of this array based on the specified * indexes * @ param indexes the indexes in to the array * @ return a view of the array with the specified indices */ @ Override public INDArray get ( INDArrayIndex ... indexes ) { } }
sort ( ) ; if ( indexes . length == 1 && indexes [ 0 ] instanceof NDArrayIndexAll || ( indexes . length == 2 && ( isRowVector ( ) && indexes [ 0 ] instanceof PointIndex && indexes [ 0 ] . offset ( ) == 0 && indexes [ 1 ] instanceof NDArrayIndexAll || isColumnVector ( ) && indexes [ 1 ] instanceof PointIndex && indexes ...
public class RythmEngine { /** * Not an API for user application * @ param event * @ param param * @ return event handler process result */ @ Override public Object accept ( IEvent event , Object param ) { } }
return eventDispatcher ( ) . accept ( event , param ) ;
public class DefaultTraceCollector { /** * This method sets the configuration service . * @ param configService The configuration service */ protected void setConfigurationService ( ConfigurationService configService ) { } }
if ( log . isLoggable ( Level . FINER ) ) { log . finer ( "Set configuration service = " + configService ) ; } configurationService = configService ; if ( configurationService != null ) { initConfig ( ) ; }
public class ExprParser { /** * assign : < assoc = right > ID ( ' [ ' expr ' ] ' ) ? ' = ' expr */ Expr assign ( ) { } }
Tok idTok = peek ( ) ; if ( idTok . sym != Sym . ID ) { return ternary ( ) ; } int begin = forward ; // ID = expr if ( move ( ) . sym == Sym . ASSIGN ) { move ( ) ; return new Assign ( idTok . value ( ) , expr ( ) , location ) ; } // array 、 map 赋值 : ID [ expr ] = expr if ( peek ( ) . sym == Sym . LBRACK ) { move ( ) ;...
public class TaskDescriptorChainBuilder { /** * Creates { @ link TaskDescriptor } for stream combine operations ( i . e . , join , union , unionAll ) */ private TaskDescriptor createTaskDescriptorForStreamCombineOperations ( DStreamOperation streamOperation ) { } }
TaskDescriptor taskDescriptor = this . createTaskDescriptor ( streamOperation . getLastOperationName ( ) ) ; for ( DStreamExecutionGraph dependentOps : streamOperation . getCombinableExecutionGraphs ( ) ) { TaskDescriptorChainBuilder builder = new TaskDescriptorChainBuilder ( executionName , dependentOps , executionCon...
public class Slice { /** * Sets the specified 32 - bit integer at the specified absolute * { @ code index } in this buffer . * @ throws IndexOutOfBoundsException if the specified { @ code index } is less than { @ code 0 } or * { @ code index + 4 } is greater than { @ code this . capacity } */ public void setInt (...
checkPositionIndexes ( index , index + SIZE_OF_INT , this . length ) ; index += offset ; data [ index ] = ( byte ) ( value ) ; data [ index + 1 ] = ( byte ) ( value >>> 8 ) ; data [ index + 2 ] = ( byte ) ( value >>> 16 ) ; data [ index + 3 ] = ( byte ) ( value >>> 24 ) ;
public class DRL5Lexer { /** * $ ANTLR start " EQUALS _ ASSIGN " */ public final void mEQUALS_ASSIGN ( ) throws RecognitionException { } }
try { int _type = EQUALS_ASSIGN ; int _channel = DEFAULT_TOKEN_CHANNEL ; // src / main / resources / org / drools / compiler / lang / DRL5Lexer . g : 234:5 : ( ' = ' ) // src / main / resources / org / drools / compiler / lang / DRL5Lexer . g : 234:7 : ' = ' { match ( '=' ) ; if ( state . failed ) return ; } state . ty...
public class AbstractID { /** * Gets the bytes underlying this ID . * @ return The bytes underlying this ID . */ public byte [ ] getBytes ( ) { } }
byte [ ] bytes = new byte [ SIZE ] ; longToByteArray ( lowerPart , bytes , 0 ) ; longToByteArray ( upperPart , bytes , SIZE_OF_LONG ) ; return bytes ;
public class InternalSimpleAntlrParser { /** * InternalSimpleAntlr . g : 216:1 : entryRuleOptionValue returns [ EObject current = null ] : iv _ ruleOptionValue = ruleOptionValue EOF ; */ public final EObject entryRuleOptionValue ( ) throws RecognitionException { } }
EObject current = null ; EObject iv_ruleOptionValue = null ; try { // InternalSimpleAntlr . g : 217:2 : ( iv _ ruleOptionValue = ruleOptionValue EOF ) // InternalSimpleAntlr . g : 218:2 : iv _ ruleOptionValue = ruleOptionValue EOF { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getOptionValueRul...
public class AndroidOperationTube { /** * response notifier */ public void onOperationCompleted ( String clientId , String conversationId , int requestId , Conversation . AVIMOperation operation , Throwable throwable ) { } }
if ( AVIMOperation . CONVERSATION_QUERY == operation ) { AVCallback callback = RequestCache . getInstance ( ) . getRequestCallback ( clientId , null , requestId ) ; if ( null != callback ) { // internal query conversation . callback . internalDone ( null , AVIMException . wrapperAVException ( throwable ) ) ; RequestCac...
public class CmsShellCommands { /** * Prints the OpenCms copyright information . < p > */ public void copyright ( ) { } }
String [ ] copy = Messages . COPYRIGHT_BY_ALKACON ; for ( int i = 0 ; i < copy . length ; i ++ ) { m_shell . getOut ( ) . println ( copy [ i ] ) ; }
public class HSQLDeleteOperation { /** * { @ inheritDoc } . Delete all data from all tables given by { @ link # getTableNames ( java . sql . Connection ) } . * @ throws SQLException * if a database access error occurs */ @ Override public void tearDownOperation ( ) throws SQLException { } }
Statement statement = null ; try { Connection connection = getConnection ( ) ; statement = connection . createStatement ( ) ; disableReferentialIntegrity ( statement ) ; List < String > tableNames = getTableNames ( getConnection ( ) ) ; deleteContent ( tableNames , statement ) ; } catch ( SQLException e ) { LOG . error...
public class SimpleFormatter { /** * Creates a formatter from the pattern string . * The number of arguments checked against the given limits is the * highest argument number plus one , not the number of occurrences of arguments . * @ param pattern The pattern string . * @ param min The pattern must have at lea...
StringBuilder sb = new StringBuilder ( ) ; String compiledPattern = SimpleFormatterImpl . compileToStringMinMaxArguments ( pattern , sb , min , max ) ; return new SimpleFormatter ( compiledPattern ) ;
public class J4pClient { /** * Execute multiple requests at once . All given request will result in a single HTTP request where it gets * dispatched on the agent side . The results are given back in the same order as the arguments provided . * @ param pRequests requests to execute * @ param pProcessingOptions pro...
return execute ( pRequests , pProcessingOptions , responseExtractor ) ;
public class KeyVaultClientBaseImpl { /** * Lists deleted secrets for the specified vault . * The Get Deleted Secrets operation returns the secrets that have been deleted for a vault enabled for soft - delete . This operation requires the secrets / list permission . * @ param nextPageLink The NextLink from the prev...
if ( nextPageLink == null ) { throw new IllegalArgumentException ( "Parameter nextPageLink is required and cannot be null." ) ; } String nextUrl = String . format ( "%s" , nextPageLink ) ; return service . getDeletedSecretsNext ( nextUrl , this . acceptLanguage ( ) , this . userAgent ( ) ) . flatMap ( new Func1 < Respo...
public class MultipleDataProviderContext { /** * Adds the specified rules to the validator under construction . * @ param rules Rules to be added . * @ param < RO > Type of rule output . * @ return Context allowing further construction of the validator using the DSL . */ public < RO > SingleRuleContext < DPO , Co...
List < Rule < Collection < DPO > , RO > > addedRules = new ArrayList < Rule < Collection < DPO > , RO > > ( ) ; if ( rules != null ) { addedRules . addAll ( rules ) ; } // Change context return new SingleRuleContext < DPO , Collection < DPO > , RO > ( addedTriggers , addedDataProviders , GeneralValidator . MappingStrat...
public class JacksonHelper { /** * Navigate a chain of parametric types ( e . g . Resources & lt ; Resource & lt ; String & gt ; & gt ; ) until you find the innermost type ( String ) . * @ param contentType * @ return */ public static JavaType findRootType ( JavaType contentType ) { } }
if ( contentType . hasGenericTypes ( ) ) { return findRootType ( contentType . containedType ( 0 ) ) ; } else { return contentType ; }
public class NessUUID { /** * FROM STRING */ public static UUID fromString ( String str ) { } }
try { int dashCount = 4 ; final int [ ] dashPos = new int [ 6 ] ; dashPos [ 0 ] = - 1 ; dashPos [ 5 ] = str . length ( ) ; for ( int i = str . length ( ) - 1 ; i >= 0 ; i -- ) { if ( str . charAt ( i ) == '-' ) { if ( dashCount == 0 ) { throw new IllegalArgumentException ( "Too many dashes (-)" ) ; } dashPos [ dashCoun...
public class TokenOrListParam { /** * Add a new token to this list * @ param theSystem * The system to use for the one token to pre - populate in this list */ public TokenOrListParam add ( String theSystem , String theValue ) { } }
add ( new TokenParam ( theSystem , theValue ) ) ; return this ;
public class HeaderInterceptor { /** * Method called by framework , to enrich current request chain with requested header information . * @ param chain the execution chain for the request . * @ return the response received . * @ throws IOException in case of failure down the line . */ @ Override public Response i...
final Request request = chain . request ( ) ; return chain . proceed ( request . newBuilder ( ) . addHeader ( name , value ) . build ( ) ) ;
public class UnitUtil { /** * Multiply { @ code size } by { @ code factor } accounting for overflow . */ static long multiply ( long size , long factor , long over ) { } }
if ( size > over ) { return Long . MAX_VALUE ; } if ( size < - over ) { return Long . MIN_VALUE ; } return size * factor ;
public class sent_sms { /** * < pre > * Use this operation to get sent sms details . . * < / pre > */ public static sent_sms [ ] get ( nitro_service client ) throws Exception { } }
sent_sms resource = new sent_sms ( ) ; resource . validate ( "get" ) ; return ( sent_sms [ ] ) resource . get_resources ( client ) ;
public class Function { /** * Calls { @ link # bindAndInvoke ( Object , StaplerRequest , StaplerResponse , Object . . . ) } and then * optionally serve the response object . * @ return * true if the request was dispatched and processed . false if the dispatch was cancelled * and the search for the next request ...
try { Object r = bindAndInvoke ( node , req , rsp , headArgs ) ; if ( getReturnType ( ) != void . class ) renderResponse ( req , rsp , node , r ) ; return true ; } catch ( CancelRequestHandlingException _ ) { return false ; } catch ( InvocationTargetException e ) { // exception as an HttpResponse Throwable te = e . get...
public class ActiveStatusCode { /** * Infer the correct active status code given what dates are available and * whether or not the encounter information is finalized . * @ param bFinal < code > true < / code > if the visit information is finalized * according to the EHR , < code > false < / code > if not . This p...
ActiveStatusCodeStartDate codeStartDate ; if ( startDate == null ) { codeStartDate = ActiveStatusCodeStartDate . UNKNOWN ; } else if ( startGran == AbsoluteTimeGranularity . YEAR ) { codeStartDate = ActiveStatusCodeStartDate . YEAR ; } else if ( startGran == AbsoluteTimeGranularity . MONTH ) { codeStartDate = ActiveSta...
public class Xsd2CobolTypesModelBuilder { /** * Retrieve the maxLength facet if it exists . * @ param facets the list of facets * @ return the maxlength value or - 1 if there are no maxLength facets */ private int getMaxLength ( List < XmlSchemaFacet > facets ) { } }
for ( XmlSchemaFacet facet : facets ) { if ( facet instanceof XmlSchemaMaxLengthFacet ) { return Integer . parseInt ( ( String ) ( ( XmlSchemaMaxLengthFacet ) facet ) . getValue ( ) ) ; } } return - 1 ;
public class VdmBreakpointManager { private int classifyBreakpointChange ( IMarkerDelta delta , IVdmBreakpoint breakpoint , String attr ) throws CoreException { } }
final boolean conditional = VdmBreakpointUtils . isConditional ( breakpoint ) ; if ( conditional && AbstractVdmBreakpoint . EXPRESSION . equals ( attr ) ) { return MAJOR_CHANGE ; } final boolean oldExprState = delta . getAttribute ( AbstractVdmBreakpoint . EXPRESSION_STATE , false ) ; final String oldExpr = delta . get...
public class PrimaveraPMFileWriter { /** * Populate a sorted list of custom fields to ensure that these fields * are written to the file in a consistent order . */ private void populateSortedCustomFieldsList ( ) { } }
m_sortedCustomFieldsList = new ArrayList < CustomField > ( ) ; for ( CustomField field : m_projectFile . getCustomFields ( ) ) { FieldType fieldType = field . getFieldType ( ) ; if ( fieldType != null ) { m_sortedCustomFieldsList . add ( field ) ; } } // Sort to ensure consistent order in file Collections . sort ( m_so...
public class ImageGL { /** * Creates and populates a texture for use as our power - of - two texture . This is used when our * main image data is already power - of - two - sized . */ protected int createPow2RepTex ( int width , int height , boolean repeatX , boolean repeatY , boolean mipmapped ) { } }
int powtex = ctx . createTexture ( width , height , repeatX , repeatY , mipmapped ) ; updateTexture ( powtex ) ; return powtex ;
public class SelectContext { /** * Selects an option by its text . * @ param text The text of the option that shall be selected . * @ return A { @ link de . codecentric . zucchini . web . steps . SelectStep } that selects an option by its text . */ public SelectStep text ( String text ) { } }
return new SelectStep ( element , text , SelectStep . OptionSelectorType . TEXT ) ;
public class WaveformGenerator { /** * Triangle : The upper 12 bits of the accumulator are used . The MSB is used * to create the falling edge of the triangle by inverting the lower 11 * bits . The MSB is thrown away and the lower 11 bits are left - shifted ( half * the resolution , full amplitude ) . Ring modula...
int /* reg24 */ msb = ( ( ring_mod != 0 ) ? accumulator ^ sync_source . accumulator : accumulator ) & 0x800000 ; return ( ( ( msb != 0 ) ? ~ accumulator : accumulator ) >> 11 ) & 0xfff ;
public class ClusterLabeledImage { /** * Examines pixels along the left and right border */ protected void connectLeftRight ( GrayS32 input , GrayS32 output ) { } }
for ( int y = 0 ; y < input . height ; y ++ ) { int x = input . width - 1 ; int inputLabel = input . unsafe_get ( x , y ) ; int outputLabel = output . unsafe_get ( x , y ) ; if ( outputLabel == - 1 ) { // see if it needs to create a new output segment outputLabel = regionMemberCount . size ; output . unsafe_set ( x , y...
public class GraphicsUtilities { /** * < p > Returns a new compatible image from a URL . The image is loaded from the * specified location and then turned , if necessary into a compatible * image . < / p > * @ see # createCompatibleImage ( java . awt . image . BufferedImage ) * @ see # createCompatibleImage ( j...
BufferedImage image = ImageIO . read ( resource ) ; return toCompatibleImage ( image ) ;
public class PolygonHoleMarkers { /** * { @ inheritDoc } */ @ Override public void setVisibleMarkers ( boolean visible ) { } }
for ( Marker marker : markers ) { if ( visible ) marker . setAlpha ( 1f ) ; else marker . setAlpha ( 0f ) ; }
public class WaveData { /** * Creates a WaveData container from the specified ByetBuffer . * If the buffer is backed by an array , it will be used directly , * else the contents of the buffer will be copied using get ( byte [ ] ) . * @ param buffer ByteBuffer containing sound file * @ return WaveData containing...
try { byte [ ] bytes = null ; if ( buffer . hasArray ( ) ) { bytes = buffer . array ( ) ; } else { bytes = new byte [ buffer . capacity ( ) ] ; buffer . get ( bytes ) ; } return create ( bytes ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; return null ; }
public class DRL6Expressions { /** * src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 775:1 : int _ key : { . . . } ? = > id = ID ; */ public final void int_key ( ) throws RecognitionException { } }
Token id = null ; try { // src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 776:5 : ( { . . . } ? = > id = ID ) // src / main / resources / org / drools / compiler / lang / DRL6Expressions . g : 776:12 : { . . . } ? = > id = ID { if ( ! ( ( ( helper . validateIdentifierKey ( DroolsSoftKey...
public class JenkinsController { /** * Gets the configuration descriptors */ @ RequestMapping ( value = "configurations/descriptors" , method = RequestMethod . GET ) public Resources < ConfigurationDescriptor > getConfigurationsDescriptors ( ) { } }
return Resources . of ( jenkinsService . getConfigurationDescriptors ( ) , uri ( on ( getClass ( ) ) . getConfigurationsDescriptors ( ) ) ) ;
public class EmbeddedNeo4jEntityQueries { /** * When the id is mapped with a single property */ private ResourceIterator < Node > singlePropertyIdFindEntities ( GraphDatabaseService executionEngine , EntityKey [ ] keys ) { } }
Object [ ] paramsValues = new Object [ keys . length ] ; for ( int i = 0 ; i < keys . length ; i ++ ) { paramsValues [ i ] = keys [ i ] . getColumnValues ( ) [ 0 ] ; } Map < String , Object > params = Collections . singletonMap ( "0" , ( Object ) paramsValues ) ; Result result = executionEngine . execute ( multiGetQuer...
public class UserDAOPgSQL { /** * { @ inheritDoc } * 安全考虑 , 返回 User 的 password 属性为 null 。 < / p > */ public User get ( Connection conn , String loginname , String cryptpassword ) throws SQLException { } }
ResultSetHandler < User > h = new BeanHandler < User > ( User . class ) ; String sql = "SELECT id,username,fullname,type,emailaddress,registered_ts,invited_by,enabled \n" + "FROM userbase \n" ; if ( loginname . indexOf ( "@" ) < 0 ) sql = sql + "WHERE username=? AND password=? and enabled=true" ; else sql = sql + "WHER...
public class StatefulBeanO { /** * Removes the servant routing affinity for this bean . This method should * only be called on z / OS . * @ return < tt > false < / tt > if removal fails , or < tt > true < / tt > otherwise */ private boolean removeServantRoutingAffinity ( ) { } }
if ( ivServantRoutingAffinity ) { StatefulSessionKey sskey = ( StatefulSessionKey ) beanId . getPrimaryKey ( ) ; byte [ ] pKeyBytes = sskey . getBytes ( ) ; int retcode = container . ivStatefulBeanEnqDeq . SSBeanDeq ( pKeyBytes , ! home . beanMetaData . sessionActivateTran , true ) ; if ( retcode != 0 ) { if ( TraceCom...
public class PathValueClient { /** * Remove any overrides for an endpoint * @ param pathValue path ( endpoint ) value * @ param requestType path request type . " GET " , " POST " , etc * @ return true if success , false otherwise */ public boolean removeCustomResponse ( String pathValue , String requestType ) { }...
try { JSONObject path = getPathFromEndpoint ( pathValue , requestType ) ; if ( path == null ) { return false ; } String pathId = path . getString ( "pathId" ) ; return resetResponseOverride ( pathId ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return false ;
public class InternalUtilities { /** * Return the host from the host array based on a random fashion * @ param hosts a WritableArray of host names * @ return the host name * @ throws IOException */ public static String getHost ( TextArrayWritable hosts ) throws IOException { } }
String [ ] hostStrings = hosts . toStrings ( ) ; if ( hostStrings == null || hostStrings . length == 0 ) throw new IOException ( "Number of forests is 0: " + "check forests in database" ) ; int count = hostStrings . length ; int position = ( int ) ( Math . random ( ) * count ) ; return hostStrings [ position ] ;
public class AbstractSubCodeBuilderFragment { /** * Replies the type for the factory for the given type . * @ param type the type of the object to create . * @ return the factory . */ @ Pure protected TypeReference getXFactoryFor ( TypeReference type ) { } }
final String packageName = type . getPackageName ( ) ; final Grammar grammar = getGrammar ( ) ; TypeReference reference = getXFactoryFor ( packageName , grammar ) ; if ( reference != null ) { return reference ; } for ( final Grammar usedGrammar : GrammarUtil . allUsedGrammars ( grammar ) ) { reference = getXFactoryFor ...
public class HttpMediaType { /** * Sets the sub media type , for example { @ code " plain " } when using { @ code " text " } . * @ param subType sub media type */ public HttpMediaType setSubType ( String subType ) { } }
Preconditions . checkArgument ( TYPE_REGEX . matcher ( subType ) . matches ( ) , "Subtype contains reserved characters" ) ; this . subType = subType ; cachedBuildResult = null ; return this ;
public class Timeouts { /** * Add a cache entry . * @ param hashEntryAdr address of the cache entry * @ param expireAt absolute expiration timestamp */ void add ( long hashEntryAdr , long expireAt ) { } }
// just ignore the fact that expireAt can be less than current time int slotNum = slot ( expireAt ) ; slots [ slotNum ] . add ( hashEntryAdr , expireAt ) ;
public class SMILESReader { /** * Private method that actually parses the input to read a ChemFile * object . * @ param som The set of molecules that came from the file * @ return A ChemFile containing the data parsed from input . */ private IAtomContainerSet readAtomContainerSet ( IAtomContainerSet som ) { } }
try { String line = input . readLine ( ) . trim ( ) ; while ( line != null ) { logger . debug ( "Line: " , line ) ; final String name = suffix ( line ) ; try { IAtomContainer molecule = sp . parseSmiles ( line ) ; molecule . setProperty ( "SMIdbNAME" , name ) ; som . addAtomContainer ( molecule ) ; } catch ( CDKExcepti...
public class Relation { /** * Returns an unmodifiable wrapper backed by the given relation * < code > rel < / code > . This allows " read - only " access , although * changes in the backing collection show up in this view . * Attempts to modify the relation will fail with { @ link * UnsupportedOperationExceptio...
return new UnmodifiableRelation < K , V > ( rel ) ;
public class MemRepository { /** * - Id must be valid ; Class must be valid . * - Ask ClassStore to createInstance . * - Ask ClassStore to load instance . * - load instance traits * - add to GraphWalker */ ITypedReferenceableInstance getDuringWalk ( Id id , ObjectGraphWalker walker ) throws RepositoryException ...
ClassStore cS = getClassStore ( id . getTypeName ( ) ) ; if ( cS == null ) { throw new RepositoryException ( String . format ( "Unknown Class %s" , id . getTypeName ( ) ) ) ; } cS . validate ( this , id ) ; ReferenceableInstance r = cS . createInstance ( this , id ) ; cS . load ( r ) ; for ( String traitName : r . getT...
public class TimeSlot { /** * Add a timer item . * @ param addItem * @ param curTime */ public void addEntry ( TimerWorkItem addItem , long curTime ) { } }
// this routine assumes the slot is not full this . mostRecentlyAccessedTime = curTime ; this . lastEntryIndex ++ ; this . entries [ lastEntryIndex ] = addItem ;
public class IfcCostScheduleImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) public EList < IfcActorSelect > getTargetUsers ( ) { } }
return ( EList < IfcActorSelect > ) eGet ( Ifc2x3tc1Package . Literals . IFC_COST_SCHEDULE__TARGET_USERS , true ) ;
public class AstNode { /** * evaluate and return the ( optionally coerced ) result . */ public final Object getValue ( Bindings bindings , ELContext context , Class < ? > type ) { } }
Object value = eval ( bindings , context ) ; if ( type != null ) { value = bindings . convert ( value , type ) ; } return value ;
public class CmsContainerpageController { /** * Updates the container level info on the present containers . < p > */ private void updateContainerLevelInfo ( ) { } }
Map < String , CmsContainerPageContainer > containers = new HashMap < String , CmsContainerPageContainer > ( ) ; List < CmsContainerPageContainer > temp = new ArrayList < CmsContainerPageContainer > ( m_targetContainers . values ( ) ) ; m_maxContainerLevel = 0 ; boolean progress = true ; while ( ! temp . isEmpty ( ) &&...
public class CmsContainerpageController { /** * Returns the server id for a given client element id . < p > * @ param clientId the client id including an optional element settings hash * @ return the server id */ public static String getServerId ( String clientId ) { } }
String serverId = clientId ; if ( clientId . contains ( CLIENT_ID_SEPERATOR ) ) { serverId = clientId . substring ( 0 , clientId . lastIndexOf ( CLIENT_ID_SEPERATOR ) ) ; } return serverId ;
public class GitManager { /** * Returns a List of Pair < key , value > which contains the git credentials to use . * Key - url to repository * Value - StandardCredentials , containing username and password */ private List < Pair < String , StandardCredentials > > getGitClientCredentials ( ) { } }
List < Pair < String , StandardCredentials > > credentialsList = new ArrayList < > ( ) ; GitSCM gitScm = getJenkinsScm ( ) ; for ( UserRemoteConfig uc : gitScm . getUserRemoteConfigs ( ) ) { String url = uc . getUrl ( ) ; // In case overriding credentials are defined , we will use it for this URL if ( this . credential...
public class SLF4JLoggerFactory { /** * Pobiera loggera SLF4J niezależnego od lokalizacji dla określonej klasy . */ public static < T , E extends I18nId > SLF4JLogger < T , ? , E > getLogger ( Class < T > clazz , Class < ? > caller ) { } }
org . slf4j . Logger logger = LoggerFactory . getLogger ( clazz ) ; if ( logger instanceof LocationAwareLogger ) { return new SLF4JCallerLocationAwareLogger < T , E > ( ( LocationAwareLogger ) logger , caller ) ; } else { return new SLF4JLogger < T , org . slf4j . Logger , E > ( logger ) ; }
public class RuntimeModelIo { /** * Loads an application from a directory . * The directory structure must be the following one : * < ul > * < li > descriptor < / li > * < li > graph < / li > * < li > instances ( optional ) < / li > * < / ul > * @ param projectDirectory the project directory * @ return ...
ApplicationLoadResult result = new ApplicationLoadResult ( ) ; ApplicationTemplate app = new ApplicationTemplate ( ) ; result . applicationTemplate = app ; ApplicationTemplateDescriptor appDescriptor = null ; File descDirectory = new File ( projectDirectory , Constants . PROJECT_DIR_DESC ) ; // Read the application des...