signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AnnotationMappingDiscoverer { /** * ( non - Javadoc ) * @ see org . springframework . hateoas . core . MappingDiscoverer # getMapping ( java . lang . Class ) */ @ Override @ Nullable public String getMapping ( Class < ? > type ) { } }
Assert . notNull ( type , "Type must not be null!" ) ; String [ ] mapping = getMappingFrom ( findMergedAnnotation ( type , annotationType ) ) ; return mapping . length == 0 ? null : mapping [ 0 ] ;
public class CmsSerialDateBeanFactory { /** * Factory method for creating a serial date bean . * @ param value the value for the series * @ return the serial date bean . */ public static I_CmsSerialDateBean createSerialDateBean ( I_CmsSerialDateValue value ) { } }
if ( ( null == value ) || ! value . isValid ( ) ) { return null ; } switch ( value . getPatternType ( ) ) { case DAILY : if ( value . isEveryWorkingDay ( ) ) { return new CmsSerialDateBeanWorkingDays ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) ) ; } else { return new CmsSerialDateBeanDaily ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) , value . getInterval ( ) ) ; } case WEEKLY : return new CmsSerialDateBeanWeekly ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) , value . getInterval ( ) , value . getWeekDays ( ) ) ; case MONTHLY : if ( null == value . getWeekDay ( ) ) { return new CmsSerialDateBeanMonthly ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) , value . getInterval ( ) , value . getDayOfMonth ( ) ) ; } else { return new CmsSerialDateBeanMonthlyWeeks ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) , value . getInterval ( ) , value . getWeeksOfMonth ( ) , value . getWeekDay ( ) ) ; } case YEARLY : if ( null == value . getWeekDay ( ) ) { return new CmsSerialDateBeanYearly ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) , value . getDayOfMonth ( ) , value . getMonth ( ) ) ; } else { return new CmsSerialDateBeanYearlyWeekday ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) , value . getWeekOfMonth ( ) , value . getMonth ( ) , value . getWeekDay ( ) ) ; } case INDIVIDUAL : return new CmsSerialDateBeanIndividual ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) , value . getEndType ( ) , value . getSeriesEndDate ( ) , value . getOccurrences ( ) , value . getExceptions ( ) , value . getIndividualDates ( ) ) ; case NONE : return new CmsSerialDateBeanSingle ( value . getStart ( ) , value . getEnd ( ) , value . isWholeDay ( ) ) ; default : throw new IllegalArgumentException ( ) ; }
public class JQMCommon { /** * Needed to find out jqm widget by its Element received usually from JavaScript . * < br > Only loaded ( attached to DOM ) widgets can be found . */ public static Widget findWidget ( Element elt ) { } }
if ( elt == null ) return null ; EventListener listener = DOM . getEventListener ( elt ) ; if ( listener == null || ! ( listener instanceof Widget ) ) return null ; return ( Widget ) listener ;
public class JSBoxedListImpl { /** * thrown ) . */ public Object get ( int accessor ) { } }
try { return ( ( JMFNativePart ) subList . getValue ( accessor ) ) . getValue ( subAccessor ) ; } catch ( JMFException ex ) { FFDCFilter . processException ( ex , "get" , "129" , this ) ; return null ; }
public class backup_file { /** * < pre > * Use this operation to get backup file . * < / pre > */ public static backup_file [ ] get ( nitro_service client ) throws Exception { } }
backup_file resource = new backup_file ( ) ; resource . validate ( "get" ) ; return ( backup_file [ ] ) resource . get_resources ( client ) ;
public class Record { /** * Iterates through all fields in the record and calls the appropriate method * on the supplied { @ link FieldHandler } instance . * @ param fieldHandler instance of field handler . Must not be null . */ public void processFields ( final FieldHandler fieldHandler ) { } }
this . fieldHandler = Require . notNull ( fieldHandler ) ; boolean continuedField = false ; directoryEntry . rewind ( ) ; while ( ! directoryEntry . endOfDirectoryReached ( ) ) { if ( continuedField ) { fieldHandler . additionalImplDefinedPart ( directoryEntry . getImplDefinedPart ( ) ) ; } else { processField ( ) ; } continuedField = directoryEntry . isContinuedField ( ) ; directoryEntry . gotoNext ( ) ; } this . fieldHandler = null ;
public class RedisClient { /** * 当抽取规则发生变化的时候 * 向Redis服务器Channel : pr发送消息CHANGE * 从节点就会重新初始化抽取规则 */ public void extractRegularChange ( ) { } }
String message = "CHANGE" ; Jedis jedis = jedisPool . getResource ( ) ; jedis . publish ( "pr" , message ) ; jedisPool . returnResource ( jedis ) ;
public class StructureGenerator { /** * Decides where to place all the files and its length . * It first collects all empty directories in the tree . * For each file , it randomly chooses an empty directory to place the file . * The file ' s length is generated using Gaussian distribution . */ private void genFileStructure ( ) { } }
List < INode > leaves = getLeaves ( ) ; int totalLeaves = leaves . size ( ) ; for ( int i = 0 ; i < numOfFiles ; i ++ ) { int leaveNum = r . nextInt ( totalLeaves ) ; double fileSize ; do { fileSize = r . nextGaussian ( ) + avgFileSize ; } while ( fileSize < 0 ) ; leaves . get ( leaveNum ) . addChild ( new FileINode ( FILE_NAME_PREFIX + i , fileSize ) ) ; }
public class LoadManager { /** * Obtain the overall number of the slots limit of a tasktracker * @ param status The status of the tasktracker * @ param type The type of the task * @ return The number of maximum slots */ public int getMaxSlots ( TaskTrackerStatus status , TaskType type ) { } }
return ( type == TaskType . MAP ) ? status . getMaxMapSlots ( ) : status . getMaxReduceSlots ( ) ;
public class GitlabAPI { /** * Update a user * @ param targetUserId User ID * @ param email User email * @ param password Password * @ param username User name * @ param fullName Full name * @ param skypeId Skype Id * @ param linkedIn LinkedIn * @ param twitter Twitter * @ param website _ url Website URL * @ param projects _ limit Projects limit * @ param extern _ uid External User ID * @ param extern _ provider _ name External Provider Name * @ param bio Bio * @ param isAdmin Is Admin * @ param can _ create _ group Can Create Group * @ param external External * @ return The Updated User * @ throws IOException on gitlab api call error */ public GitlabUser updateUser ( Integer targetUserId , String email , String password , String username , String fullName , String skypeId , String linkedIn , String twitter , String website_url , Integer projects_limit , String extern_uid , String extern_provider_name , String bio , Boolean isAdmin , Boolean can_create_group , Boolean external ) throws IOException { } }
Query query = new Query ( ) . append ( "email" , email ) . appendIf ( "password" , password ) . appendIf ( "username" , username ) . appendIf ( "name" , fullName ) . appendIf ( "skype" , skypeId ) . appendIf ( "linkedin" , linkedIn ) . appendIf ( "twitter" , twitter ) . appendIf ( "website_url" , website_url ) . appendIf ( "projects_limit" , projects_limit ) . appendIf ( "extern_uid" , extern_uid ) . appendIf ( "provider" , extern_provider_name ) . appendIf ( "bio" , bio ) . appendIf ( "admin" , isAdmin ) . appendIf ( "can_create_group" , can_create_group ) . appendIf ( "external" , external ) ; String tailUrl = GitlabUser . USERS_URL + "/" + targetUserId + query . toString ( ) ; return retrieve ( ) . method ( PUT ) . to ( tailUrl , GitlabUser . class ) ;
public class JDBCResultSetMetaData { /** * Performs an internal check for column index validity . < p > * @ param column index of column to check * @ throws SQLException when this object ' s parent ResultSet has * no such column */ private void checkColumn ( int column ) throws SQLException { } }
if ( column < 1 || column > columnCount ) { throw Util . sqlException ( ErrorCode . JDBC_COLUMN_NOT_FOUND , String . valueOf ( column ) ) ; }
public class ListResourceComplianceSummariesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListResourceComplianceSummariesRequest listResourceComplianceSummariesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listResourceComplianceSummariesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listResourceComplianceSummariesRequest . getFilters ( ) , FILTERS_BINDING ) ; protocolMarshaller . marshall ( listResourceComplianceSummariesRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listResourceComplianceSummariesRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class ProtobufIDLProxy { /** * Creates the single . * @ param is the is * @ param debug the debug * @ param isUniName the is uni name * @ return the IDL proxy object * @ throws IOException Signals that an I / O exception has occurred . */ public static IDLProxyObject createSingle ( InputStream is , boolean debug , boolean isUniName ) throws IOException { } }
return createSingle ( is , debug , null , isUniName ) ;
public class SmbFile { /** * Return an array of Access Control Entry ( ACE ) objects representing * the security descriptor associated with this file or directory . * If no DACL is present , null is returned . If the DACL is empty , an array with 0 elements is returned . * @ param resolveSids Attempt to resolve the SIDs within each ACE form * their numeric representation to their corresponding account names . */ public ACE [ ] getSecurity ( boolean resolveSids ) throws IOException { } }
int f ; ACE [ ] aces ; f = open0 ( O_RDONLY , READ_CONTROL , 0 , isDirectory ( ) ? 1 : 0 ) ; /* * NtTrans Query Security Desc Request / Response */ NtTransQuerySecurityDesc request = new NtTransQuerySecurityDesc ( f , 0x04 ) ; NtTransQuerySecurityDescResponse response = new NtTransQuerySecurityDescResponse ( ) ; try { send ( request , response ) ; } finally { close ( f , 0L ) ; } aces = response . securityDescriptor . aces ; if ( aces != null ) processAces ( aces , resolveSids ) ; return aces ;
public class PaySignUtil { /** * 校验签名信息 * @ param noSignStr 待校验未字符串 * @ param sign 签名字符串 * @ param publicKey 公钥 * @ return 是否校验通过 */ public static boolean doCheck ( String noSignStr , String sign , String publicKey ) { } }
if ( sign == null || noSignStr == null || publicKey == null ) { return false ; } try { KeyFactory keyFactory = KeyFactory . getInstance ( "RSA" ) ; byte [ ] encodedKey = Base64 . decode ( publicKey , Base64 . DEFAULT ) ; PublicKey pubKey = keyFactory . generatePublic ( new X509EncodedKeySpec ( encodedKey ) ) ; java . security . Signature signature = java . security . Signature . getInstance ( SIGN_ALGORITHMS ) ; signature . initVerify ( pubKey ) ; signature . update ( noSignStr . getBytes ( CHARSET ) ) ; return signature . verify ( Base64 . decode ( sign , Base64 . DEFAULT ) ) ; } catch ( Exception e ) { // 这里是安全算法 , 为避免出现异常时泄露加密信息 , 这里不打印具体日志 HMSAgentLog . e ( "doCheck error" ) ; } return false ;
public class TVRageParser { /** * Process Genres * @ param showInfo * @ param eShowInfo */ private static void processGenre ( ShowInfo showInfo , Element eShowInfo ) { } }
NodeList nlGenres = eShowInfo . getElementsByTagName ( "genre" ) ; for ( int loop = 0 ; loop < nlGenres . getLength ( ) ; loop ++ ) { Node nGenre = nlGenres . item ( loop ) ; if ( nGenre . getNodeType ( ) == Node . ELEMENT_NODE ) { Element eGenre = ( Element ) nGenre ; if ( eGenre . getFirstChild ( ) != null ) { showInfo . addGenre ( eGenre . getFirstChild ( ) . getNodeValue ( ) ) ; } } }
public class BundleUtils { /** * Returns a optional char value . In other words , returns the value mapped by key if it exists and is a char . * The bundle argument is allowed to be { @ code null } . If the bundle is null , this method returns a fallback value . * @ param bundle a bundle . If the bundle is null , this method will return null . * @ param key a key for the value . * @ param fallback fallback value * @ return a char value if exists , fallback value otherwise . * @ see android . os . Bundle # getChar ( String , char ) */ public static char optChar ( @ Nullable Bundle bundle , @ Nullable String key , char fallback ) { } }
if ( bundle == null ) { return fallback ; } return bundle . getChar ( key , fallback ) ;
public class JournalSet { /** * Apply the given operation across all of the journal managers , disabling * any for which the closure throws an IOException . Do it in parallel . * @ param closure { @ link JournalClosure } object encapsulating the operation . * @ param status message used for logging errors ( e . g . " opening journal " ) * @ throws IOException If the operation fails on all the journals . */ private void mapJournalsAndReportErrorsParallel ( JournalClosure closure , String status ) throws IOException { } }
// set - up calls List < Future < JournalAndStream > > jasResponeses = new ArrayList < Future < JournalAndStream > > ( journals . size ( ) ) ; for ( JournalAndStream jas : journals ) { jasResponeses . add ( executor . submit ( new JournalSetWorker ( jas , closure , status ) ) ) ; } List < JournalAndStream > badJAS = null ; // iterate through responses for ( Future < JournalAndStream > future : jasResponeses ) { JournalAndStream jas = null ; try { jas = future . get ( ) ; } catch ( ExecutionException e ) { throw new IOException ( "This should never happen!!!" , e ) ; } catch ( InterruptedException e ) { throw new IOException ( "Interrupted whe performing journal operations" , e ) ; } if ( jas == null ) continue ; // the worker returns the journal if the operation failed if ( badJAS == null ) badJAS = new LinkedList < JournalAndStream > ( ) ; badJAS . add ( jas ) ; } disableAndReportErrorOnJournals ( badJAS , status ) ;
public class WebDriverTool { /** * Delegates to { @ link # findElement ( By ) } and then performs a context - click using the * { @ link Actions } class . * @ param by * the { @ link By } used to locate the element */ public void contextClick ( final By by ) { } }
checkTopmostElement ( by ) ; WebElement element = findElement ( by ) ; new Actions ( webDriver ) . contextClick ( element ) . perform ( ) ;
public class AbstractRadial { /** * Returns the image of the posts for the pointer * @ param WIDTH * @ param POSITIONS * @ param image * @ return the post image that is used */ protected BufferedImage createPostsImage ( final int WIDTH , BufferedImage image , final PostPosition ... POSITIONS ) { } }
if ( WIDTH <= 0 ) { return UTIL . createImage ( 1 , 1 , Transparency . TRANSLUCENT ) ; } if ( image == null ) { image = UTIL . createImage ( WIDTH , WIDTH , Transparency . TRANSLUCENT ) ; } final Graphics2D G2 = image . createGraphics ( ) ; G2 . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; final int IMAGE_WIDTH = image . getWidth ( ) ; final int IMAGE_HEIGHT = image . getHeight ( ) ; // final BufferedImage CENTER _ KNOB = create _ KNOB _ Image ( ( int ) ( WIDTH * 0.09 ) ) ; final BufferedImage SINGLE_POST = create_KNOB_Image ( ( int ) Math . ceil ( WIDTH * 0.03738316893577576 ) , KnobType . SMALL_STD_KNOB , getModel ( ) . getKnobStyle ( ) ) ; List < PostPosition > postPositionList = Arrays . asList ( POSITIONS ) ; // Draw center knob if ( postPositionList . contains ( PostPosition . CENTER ) ) { switch ( getKnobType ( ) ) { case SMALL_STD_KNOB : // G2 . drawImage ( KNOB _ FACTORY . create _ KNOB _ Image ( ( int ) Math . ceil ( IMAGE _ WIDTH * 0.08411216735839844 ) , KnobType . SMALL _ STD _ KNOB ) , ( int ) Math . ceil ( IMAGE _ WIDTH * 0.4579439163208008 ) , ( int ) Math . ceil ( IMAGE _ WIDTH * 0.4579439163208008 ) , null ) ; final Ellipse2D CENTER_KNOB_FRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4579439163208008 , IMAGE_HEIGHT * 0.4579439163208008 , IMAGE_WIDTH * 0.08411216735839844 , IMAGE_HEIGHT * 0.08411216735839844 ) ; final Point2D CENTER_KNOB_FRAME_START = new Point2D . Double ( 0 , CENTER_KNOB_FRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D CENTER_KNOB_FRAME_STOP = new Point2D . Double ( 0 , CENTER_KNOB_FRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] CENTER_KNOB_FRAME_FRACTIONS = { 0.0f , 0.46f , 1.0f } ; final Color [ ] CENTER_KNOB_FRAME_COLORS = { new Color ( 180 , 180 , 180 , 255 ) , new Color ( 63 , 63 , 63 , 255 ) , new Color ( 40 , 40 , 40 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( CENTER_KNOB_FRAME_START , CENTER_KNOB_FRAME_STOP ) ; final LinearGradientPaint CENTER_KNOB_FRAME_GRADIENT = new LinearGradientPaint ( CENTER_KNOB_FRAME_START , CENTER_KNOB_FRAME_STOP , CENTER_KNOB_FRAME_FRACTIONS , CENTER_KNOB_FRAME_COLORS ) ; G2 . setPaint ( CENTER_KNOB_FRAME_GRADIENT ) ; G2 . fill ( CENTER_KNOB_FRAME ) ; final Ellipse2D CENTER_KNOB_MAIN = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4672897160053253 , IMAGE_HEIGHT * 0.4672897160053253 , IMAGE_WIDTH * 0.06542053818702698 , IMAGE_HEIGHT * 0.06542053818702698 ) ; final Point2D CENTER_KNOB_MAIN_START = new Point2D . Double ( 0 , CENTER_KNOB_MAIN . getBounds2D ( ) . getMinY ( ) ) ; final Point2D CENTER_KNOB_MAIN_STOP = new Point2D . Double ( 0 , CENTER_KNOB_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] CENTER_KNOB_MAIN_FRACTIONS = { 0.0f , 0.5f , 1.0f } ; final Color [ ] CENTER_KNOB_MAIN_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : CENTER_KNOB_MAIN_COLORS = new Color [ ] { new Color ( 0xBFBFBF ) , new Color ( 0x2B2A2F ) , new Color ( 0x7D7E80 ) } ; break ; case BRASS : CENTER_KNOB_MAIN_COLORS = new Color [ ] { new Color ( 0xDFD0AE ) , new Color ( 0x7A5E3E ) , new Color ( 0xCFBE9D ) } ; break ; case SILVER : default : CENTER_KNOB_MAIN_COLORS = new Color [ ] { new Color ( 0xD7D7D7 ) , new Color ( 0x747474 ) , new Color ( 0xD7D7D7 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( CENTER_KNOB_MAIN_START , CENTER_KNOB_MAIN_STOP ) ; final LinearGradientPaint CENTER_KNOB_MAIN_GRADIENT = new LinearGradientPaint ( CENTER_KNOB_MAIN_START , CENTER_KNOB_MAIN_STOP , CENTER_KNOB_MAIN_FRACTIONS , CENTER_KNOB_MAIN_COLORS ) ; G2 . setPaint ( CENTER_KNOB_MAIN_GRADIENT ) ; G2 . fill ( CENTER_KNOB_MAIN ) ; final Ellipse2D CENTER_KNOB_INNERSHADOW = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4672897160053253 , IMAGE_HEIGHT * 0.4672897160053253 , IMAGE_WIDTH * 0.06542053818702698 , IMAGE_HEIGHT * 0.06542053818702698 ) ; final Point2D CENTER_KNOB_INNERSHADOW_CENTER = new Point2D . Double ( ( 0.4953271028037383 * IMAGE_WIDTH ) , ( 0.49065420560747663 * IMAGE_HEIGHT ) ) ; final float [ ] CENTER_KNOB_INNERSHADOW_FRACTIONS = { 0.0f , 0.75f , 0.76f , 1.0f } ; final Color [ ] CENTER_KNOB_INNERSHADOW_COLORS = { new Color ( 0 , 0 , 0 , 0 ) , new Color ( 0 , 0 , 0 , 0 ) , new Color ( 0 , 0 , 0 , 1 ) , new Color ( 0 , 0 , 0 , 51 ) } ; final RadialGradientPaint CENTER_KNOB_INNERSHADOW_GRADIENT = new RadialGradientPaint ( CENTER_KNOB_INNERSHADOW_CENTER , ( float ) ( 0.03271028037383177 * IMAGE_WIDTH ) , CENTER_KNOB_INNERSHADOW_FRACTIONS , CENTER_KNOB_INNERSHADOW_COLORS ) ; G2 . setPaint ( CENTER_KNOB_INNERSHADOW_GRADIENT ) ; G2 . fill ( CENTER_KNOB_INNERSHADOW ) ; break ; case BIG_STD_KNOB : // G2 . drawImage ( KNOB _ FACTORY . create _ KNOB _ Image ( ( int ) Math . ceil ( IMAGE _ WIDTH * 0.1214953362941742 ) , KnobType . BIG _ STD _ KNOB ) , ( int ) Math . ceil ( IMAGE _ WIDTH * 0.4392523467540741 ) , ( int ) Math . ceil ( IMAGE _ WIDTH * 0.4392523467540741 ) , null ) ; final Ellipse2D BIGCENTER_BACKGROUNDFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4392523467540741 , IMAGE_HEIGHT * 0.4392523467540741 , IMAGE_WIDTH * 0.1214953362941742 , IMAGE_HEIGHT * 0.1214953362941742 ) ; final Point2D BIGCENTER_BACKGROUNDFRAME_START = new Point2D . Double ( 0 , BIGCENTER_BACKGROUNDFRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGCENTER_BACKGROUNDFRAME_STOP = new Point2D . Double ( 0 , BIGCENTER_BACKGROUNDFRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGCENTER_BACKGROUNDFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] BIGCENTER_BACKGROUNDFRAME_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGCENTER_BACKGROUNDFRAME_COLORS = new Color [ ] { new Color ( 129 , 133 , 136 , 255 ) , new Color ( 61 , 61 , 73 , 255 ) } ; break ; case BRASS : BIGCENTER_BACKGROUNDFRAME_COLORS = new Color [ ] { new Color ( 143 , 117 , 80 , 255 ) , new Color ( 100 , 76 , 49 , 255 ) } ; break ; case SILVER : default : BIGCENTER_BACKGROUNDFRAME_COLORS = new Color [ ] { new Color ( 152 , 152 , 152 , 255 ) , new Color ( 118 , 121 , 126 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGCENTER_BACKGROUNDFRAME_START , BIGCENTER_BACKGROUNDFRAME_STOP ) ; final LinearGradientPaint BIGCENTER_BACKGROUNDFRAME_GRADIENT = new LinearGradientPaint ( BIGCENTER_BACKGROUNDFRAME_START , BIGCENTER_BACKGROUNDFRAME_STOP , BIGCENTER_BACKGROUNDFRAME_FRACTIONS , BIGCENTER_BACKGROUNDFRAME_COLORS ) ; G2 . setPaint ( BIGCENTER_BACKGROUNDFRAME_GRADIENT ) ; G2 . fill ( BIGCENTER_BACKGROUNDFRAME ) ; final Ellipse2D BIGCENTER_BACKGROUND = new Ellipse2D . Double ( IMAGE_WIDTH * 0.44392523169517517 , IMAGE_HEIGHT * 0.44392523169517517 , IMAGE_WIDTH * 0.11214950680732727 , IMAGE_HEIGHT * 0.11214950680732727 ) ; final Point2D BIGCENTER_BACKGROUND_START = new Point2D . Double ( 0 , BIGCENTER_BACKGROUND . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGCENTER_BACKGROUND_STOP = new Point2D . Double ( 0 , BIGCENTER_BACKGROUND . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGCENTER_BACKGROUND_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] BIGCENTER_BACKGROUND_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGCENTER_BACKGROUND_COLORS = new Color [ ] { new Color ( 26 , 27 , 32 , 255 ) , new Color ( 96 , 97 , 102 , 255 ) } ; break ; case BRASS : BIGCENTER_BACKGROUND_COLORS = new Color [ ] { new Color ( 98 , 75 , 49 , 255 ) , new Color ( 149 , 109 , 54 , 255 ) } ; break ; case SILVER : default : BIGCENTER_BACKGROUND_COLORS = new Color [ ] { new Color ( 118 , 121 , 126 , 255 ) , new Color ( 191 , 191 , 191 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGCENTER_BACKGROUND_START , BIGCENTER_BACKGROUND_STOP ) ; final LinearGradientPaint BIGCENTER_BACKGROUND_GRADIENT = new LinearGradientPaint ( BIGCENTER_BACKGROUND_START , BIGCENTER_BACKGROUND_STOP , BIGCENTER_BACKGROUND_FRACTIONS , BIGCENTER_BACKGROUND_COLORS ) ; G2 . setPaint ( BIGCENTER_BACKGROUND_GRADIENT ) ; G2 . fill ( BIGCENTER_BACKGROUND ) ; final Ellipse2D BIGCENTER_FOREGROUNDFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4532710313796997 , IMAGE_HEIGHT * 0.4532710313796997 , IMAGE_WIDTH * 0.09345793724060059 , IMAGE_HEIGHT * 0.09345793724060059 ) ; final Point2D BIGCENTER_FOREGROUNDFRAME_START = new Point2D . Double ( 0 , BIGCENTER_FOREGROUNDFRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGCENTER_FOREGROUNDFRAME_STOP = new Point2D . Double ( 0 , BIGCENTER_FOREGROUNDFRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGCENTER_FOREGROUNDFRAME_FRACTIONS = { 0.0f , 0.47f , 1.0f } ; final Color [ ] BIGCENTER_FOREGROUNDFRAME_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGCENTER_FOREGROUNDFRAME_COLORS = new Color [ ] { new Color ( 191 , 191 , 191 , 255 ) , new Color ( 56 , 57 , 61 , 255 ) , new Color ( 143 , 144 , 146 , 255 ) } ; break ; case BRASS : BIGCENTER_FOREGROUNDFRAME_COLORS = new Color [ ] { new Color ( 147 , 108 , 54 , 255 ) , new Color ( 82 , 66 , 50 , 255 ) , new Color ( 147 , 108 , 54 , 255 ) } ; break ; case SILVER : default : BIGCENTER_FOREGROUNDFRAME_COLORS = new Color [ ] { new Color ( 191 , 191 , 191 , 255 ) , new Color ( 116 , 116 , 116 , 255 ) , new Color ( 143 , 144 , 146 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGCENTER_FOREGROUNDFRAME_START , BIGCENTER_FOREGROUNDFRAME_STOP ) ; final LinearGradientPaint BIGCENTER_FOREGROUNDFRAME_GRADIENT = new LinearGradientPaint ( BIGCENTER_FOREGROUNDFRAME_START , BIGCENTER_FOREGROUNDFRAME_STOP , BIGCENTER_FOREGROUNDFRAME_FRACTIONS , BIGCENTER_FOREGROUNDFRAME_COLORS ) ; G2 . setPaint ( BIGCENTER_FOREGROUNDFRAME_GRADIENT ) ; G2 . fill ( BIGCENTER_FOREGROUNDFRAME ) ; final Ellipse2D BIGCENTER_FOREGROUND = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4579439163208008 , IMAGE_HEIGHT * 0.4579439163208008 , IMAGE_WIDTH * 0.08411216735839844 , IMAGE_HEIGHT * 0.08411216735839844 ) ; final Point2D BIGCENTER_FOREGROUND_START = new Point2D . Double ( 0 , BIGCENTER_FOREGROUND . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGCENTER_FOREGROUND_STOP = new Point2D . Double ( 0 , BIGCENTER_FOREGROUND . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGCENTER_FOREGROUND_FRACTIONS = { 0.0f , 0.21f , 0.5f , 0.78f , 1.0f } ; final Color [ ] BIGCENTER_FOREGROUND_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGCENTER_FOREGROUND_COLORS = new Color [ ] { new Color ( 191 , 191 , 191 , 255 ) , new Color ( 94 , 93 , 99 , 255 ) , new Color ( 43 , 42 , 47 , 255 ) , new Color ( 78 , 79 , 81 , 255 ) , new Color ( 143 , 144 , 146 , 255 ) } ; break ; case BRASS : BIGCENTER_FOREGROUND_COLORS = new Color [ ] { new Color ( 223 , 208 , 174 , 255 ) , new Color ( 159 , 136 , 104 , 255 ) , new Color ( 122 , 94 , 62 , 255 ) , new Color ( 159 , 136 , 104 , 255 ) , new Color ( 223 , 208 , 174 , 255 ) } ; break ; case SILVER : default : BIGCENTER_FOREGROUND_COLORS = new Color [ ] { new Color ( 215 , 215 , 215 , 255 ) , new Color ( 139 , 142 , 145 , 255 ) , new Color ( 100 , 100 , 100 , 255 ) , new Color ( 139 , 142 , 145 , 255 ) , new Color ( 215 , 215 , 215 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGCENTER_FOREGROUND_START , BIGCENTER_FOREGROUND_STOP ) ; final LinearGradientPaint BIGCENTER_FOREGROUND_GRADIENT = new LinearGradientPaint ( BIGCENTER_FOREGROUND_START , BIGCENTER_FOREGROUND_STOP , BIGCENTER_FOREGROUND_FRACTIONS , BIGCENTER_FOREGROUND_COLORS ) ; G2 . setPaint ( BIGCENTER_FOREGROUND_GRADIENT ) ; G2 . fill ( BIGCENTER_FOREGROUND ) ; break ; case BIG_CHROME_KNOB : // G2 . drawImage ( KNOB _ FACTORY . create _ KNOB _ Image ( ( int ) Math . ceil ( IMAGE _ WIDTH * 0.14018690586090088 ) , KnobType . BIG _ CHROME _ KNOB ) , ( int ) Math . ceil ( IMAGE _ WIDTH * 0.42990654706954956 ) , ( int ) Math . ceil ( IMAGE _ WIDTH * 0.42990654706954956 ) , null ) ; final Ellipse2D CHROMEKNOB_BACKFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.42990654706954956 , IMAGE_HEIGHT * 0.42990654706954956 , IMAGE_WIDTH * 0.14018690586090088 , IMAGE_HEIGHT * 0.14018690586090088 ) ; final Point2D CHROMEKNOB_BACKFRAME_START = new Point2D . Double ( ( 0.46261682242990654 * IMAGE_WIDTH ) , ( 0.4392523364485981 * IMAGE_HEIGHT ) ) ; final Point2D CHROMEKNOB_BACKFRAME_STOP = new Point2D . Double ( ( ( 0.46261682242990654 + 0.0718114890783315 ) * IMAGE_WIDTH ) , ( ( 0.4392523364485981 + 0.1149224055539082 ) * IMAGE_HEIGHT ) ) ; final float [ ] CHROMEKNOB_BACKFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] CHROMEKNOB_BACKFRAME_COLORS = { new Color ( 129 , 139 , 140 , 255 ) , new Color ( 166 , 171 , 175 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( CHROMEKNOB_BACKFRAME_START , CHROMEKNOB_BACKFRAME_STOP ) ; final LinearGradientPaint CHROMEKNOB_BACKFRAME_GRADIENT = new LinearGradientPaint ( CHROMEKNOB_BACKFRAME_START , CHROMEKNOB_BACKFRAME_STOP , CHROMEKNOB_BACKFRAME_FRACTIONS , CHROMEKNOB_BACKFRAME_COLORS ) ; G2 . setPaint ( CHROMEKNOB_BACKFRAME_GRADIENT ) ; G2 . fill ( CHROMEKNOB_BACKFRAME ) ; final Ellipse2D CHROMEKNOB_BACK = new Ellipse2D . Double ( IMAGE_WIDTH * 0.43457943201065063 , IMAGE_HEIGHT * 0.43457943201065063 , IMAGE_WIDTH * 0.13084113597869873 , IMAGE_HEIGHT * 0.13084113597869873 ) ; final Point2D CHROMEKNOB_BACK_CENTER = new Point2D . Double ( CHROMEKNOB_BACK . getCenterX ( ) , CHROMEKNOB_BACK . getCenterY ( ) ) ; final float [ ] CHROMEKNOB_BACK_FRACTIONS = { 0.0f , 0.09f , 0.12f , 0.16f , 0.25f , 0.29f , 0.33f , 0.38f , 0.48f , 0.52f , 0.65f , 0.69f , 0.8f , 0.83f , 0.87f , 0.97f , 1.0f } ; final Color [ ] CHROMEKNOB_BACK_COLORS = { new Color ( 255 , 255 , 255 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 136 , 136 , 138 , 255 ) , new Color ( 164 , 185 , 190 , 255 ) , new Color ( 158 , 179 , 182 , 255 ) , new Color ( 112 , 112 , 112 , 255 ) , new Color ( 221 , 227 , 227 , 255 ) , new Color ( 155 , 176 , 179 , 255 ) , new Color ( 156 , 176 , 177 , 255 ) , new Color ( 254 , 255 , 255 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 156 , 180 , 180 , 255 ) , new Color ( 198 , 209 , 211 , 255 ) , new Color ( 246 , 248 , 247 , 255 ) , new Color ( 204 , 216 , 216 , 255 ) , new Color ( 164 , 188 , 190 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) } ; final ConicalGradientPaint CHROMEKNOB_BACK_GRADIENT = new ConicalGradientPaint ( false , CHROMEKNOB_BACK_CENTER , 0 , CHROMEKNOB_BACK_FRACTIONS , CHROMEKNOB_BACK_COLORS ) ; G2 . setPaint ( CHROMEKNOB_BACK_GRADIENT ) ; G2 . fill ( CHROMEKNOB_BACK ) ; final Ellipse2D CHROMEKNOB_FOREFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4672897160053253 , IMAGE_HEIGHT * 0.4672897160053253 , IMAGE_WIDTH * 0.06542053818702698 , IMAGE_HEIGHT * 0.06542053818702698 ) ; final Point2D CHROMEKNOB_FOREFRAME_START = new Point2D . Double ( ( 0.48130841121495327 * IMAGE_WIDTH ) , ( 0.4719626168224299 * IMAGE_HEIGHT ) ) ; final Point2D CHROMEKNOB_FOREFRAME_STOP = new Point2D . Double ( ( ( 0.48130841121495327 + 0.033969662360372466 ) * IMAGE_WIDTH ) , ( ( 0.4719626168224299 + 0.05036209552904459 ) * IMAGE_HEIGHT ) ) ; final float [ ] CHROMEKNOB_FOREFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] CHROMEKNOB_FOREFRAME_COLORS = { new Color ( 225 , 235 , 232 , 255 ) , new Color ( 196 , 207 , 207 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( CHROMEKNOB_FOREFRAME_START , CHROMEKNOB_FOREFRAME_STOP ) ; final LinearGradientPaint CHROMEKNOB_FOREFRAME_GRADIENT = new LinearGradientPaint ( CHROMEKNOB_FOREFRAME_START , CHROMEKNOB_FOREFRAME_STOP , CHROMEKNOB_FOREFRAME_FRACTIONS , CHROMEKNOB_FOREFRAME_COLORS ) ; G2 . setPaint ( CHROMEKNOB_FOREFRAME_GRADIENT ) ; G2 . fill ( CHROMEKNOB_FOREFRAME ) ; final Ellipse2D CHROMEKNOB_FORE = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4719626307487488 , IMAGE_HEIGHT * 0.4719626307487488 , IMAGE_WIDTH * 0.05607473850250244 , IMAGE_HEIGHT * 0.05607473850250244 ) ; final Point2D CHROMEKNOB_FORE_START = new Point2D . Double ( ( 0.48130841121495327 * IMAGE_WIDTH ) , ( 0.4766355140186916 * IMAGE_HEIGHT ) ) ; final Point2D CHROMEKNOB_FORE_STOP = new Point2D . Double ( ( ( 0.48130841121495327 + 0.03135661140957459 ) * IMAGE_WIDTH ) , ( ( 0.4766355140186916 + 0.04648808818065655 ) * IMAGE_HEIGHT ) ) ; final float [ ] CHROMEKNOB_FORE_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] CHROMEKNOB_FORE_COLORS = { new Color ( 237 , 239 , 237 , 255 ) , new Color ( 148 , 161 , 161 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( CHROMEKNOB_FORE_START , CHROMEKNOB_FORE_STOP ) ; final LinearGradientPaint CHROMEKNOB_FORE_GRADIENT = new LinearGradientPaint ( CHROMEKNOB_FORE_START , CHROMEKNOB_FORE_STOP , CHROMEKNOB_FORE_FRACTIONS , CHROMEKNOB_FORE_COLORS ) ; G2 . setPaint ( CHROMEKNOB_FORE_GRADIENT ) ; G2 . fill ( CHROMEKNOB_FORE ) ; break ; case METAL_KNOB : final Ellipse2D METALKNOB_FRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4579439163208008 , IMAGE_HEIGHT * 0.4579439163208008 , IMAGE_WIDTH * 0.08411216735839844 , IMAGE_HEIGHT * 0.08411216735839844 ) ; final Point2D METALKNOB_FRAME_START = new Point2D . Double ( 0 , METALKNOB_FRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOB_FRAME_STOP = new Point2D . Double ( 0 , METALKNOB_FRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOB_FRAME_FRACTIONS = { 0.0f , 0.47f , 1.0f } ; final Color [ ] METALKNOB_FRAME_COLORS = { new Color ( 92 , 95 , 101 , 255 ) , new Color ( 46 , 49 , 53 , 255 ) , new Color ( 22 , 23 , 26 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( METALKNOB_FRAME_START , METALKNOB_FRAME_STOP ) ; final LinearGradientPaint METALKNOB_FRAME_GRADIENT = new LinearGradientPaint ( METALKNOB_FRAME_START , METALKNOB_FRAME_STOP , METALKNOB_FRAME_FRACTIONS , METALKNOB_FRAME_COLORS ) ; G2 . setPaint ( METALKNOB_FRAME_GRADIENT ) ; G2 . fill ( METALKNOB_FRAME ) ; final Ellipse2D METALKNOB_MAIN = new Ellipse2D . Double ( IMAGE_WIDTH * 0.46261683106422424 , IMAGE_HEIGHT * 0.46261683106422424 , IMAGE_WIDTH * 0.0747663676738739 , IMAGE_HEIGHT * 0.0747663676738739 ) ; final Point2D METALKNOB_MAIN_START = new Point2D . Double ( 0 , METALKNOB_MAIN . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOB_MAIN_STOP = new Point2D . Double ( 0 , METALKNOB_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOB_MAIN_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOB_MAIN_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : METALKNOB_MAIN_COLORS = new Color [ ] { new Color ( 0x2B2A2F ) , new Color ( 0x1A1B20 ) } ; break ; case BRASS : METALKNOB_MAIN_COLORS = new Color [ ] { new Color ( 0x966E36 ) , new Color ( 0x7C5F3D ) } ; break ; case SILVER : default : METALKNOB_MAIN_COLORS = new Color [ ] { new Color ( 204 , 204 , 204 , 255 ) , new Color ( 87 , 92 , 98 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( METALKNOB_MAIN_START , METALKNOB_MAIN_STOP ) ; final LinearGradientPaint METALKNOB_MAIN_GRADIENT = new LinearGradientPaint ( METALKNOB_MAIN_START , METALKNOB_MAIN_STOP , METALKNOB_MAIN_FRACTIONS , METALKNOB_MAIN_COLORS ) ; G2 . setPaint ( METALKNOB_MAIN_GRADIENT ) ; G2 . fill ( METALKNOB_MAIN ) ; final GeneralPath METALKNOB_LOWERHL = new GeneralPath ( ) ; METALKNOB_LOWERHL . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; METALKNOB_LOWERHL . moveTo ( IMAGE_WIDTH * 0.5186915887850467 , IMAGE_HEIGHT * 0.5280373831775701 ) ; METALKNOB_LOWERHL . curveTo ( IMAGE_WIDTH * 0.5186915887850467 , IMAGE_HEIGHT * 0.5186915887850467 , IMAGE_WIDTH * 0.5093457943925234 , IMAGE_HEIGHT * 0.514018691588785 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.514018691588785 ) ; METALKNOB_LOWERHL . curveTo ( IMAGE_WIDTH * 0.48598130841121495 , IMAGE_HEIGHT * 0.514018691588785 , IMAGE_WIDTH * 0.4766355140186916 , IMAGE_HEIGHT * 0.5186915887850467 , IMAGE_WIDTH * 0.4766355140186916 , IMAGE_HEIGHT * 0.5280373831775701 ) ; METALKNOB_LOWERHL . curveTo ( IMAGE_WIDTH * 0.48130841121495327 , IMAGE_HEIGHT * 0.5327102803738317 , IMAGE_WIDTH * 0.49065420560747663 , IMAGE_HEIGHT * 0.5373831775700935 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.5373831775700935 ) ; METALKNOB_LOWERHL . curveTo ( IMAGE_WIDTH * 0.5046728971962616 , IMAGE_HEIGHT * 0.5373831775700935 , IMAGE_WIDTH * 0.514018691588785 , IMAGE_HEIGHT * 0.5327102803738317 , IMAGE_WIDTH * 0.5186915887850467 , IMAGE_HEIGHT * 0.5280373831775701 ) ; METALKNOB_LOWERHL . closePath ( ) ; final Point2D METALKNOB_LOWERHL_CENTER = new Point2D . Double ( ( 0.5 * IMAGE_WIDTH ) , ( 0.5373831775700935 * IMAGE_HEIGHT ) ) ; final float [ ] METALKNOB_LOWERHL_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOB_LOWERHL_COLORS = { new Color ( 255 , 255 , 255 , 153 ) , new Color ( 255 , 255 , 255 , 0 ) } ; final RadialGradientPaint METALKNOB_LOWERHL_GRADIENT = new RadialGradientPaint ( METALKNOB_LOWERHL_CENTER , ( float ) ( 0.03271028037383177 * IMAGE_WIDTH ) , METALKNOB_LOWERHL_FRACTIONS , METALKNOB_LOWERHL_COLORS ) ; G2 . setPaint ( METALKNOB_LOWERHL_GRADIENT ) ; G2 . fill ( METALKNOB_LOWERHL ) ; final GeneralPath METALKNOB_UPPERHL = new GeneralPath ( ) ; METALKNOB_UPPERHL . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; METALKNOB_UPPERHL . moveTo ( IMAGE_WIDTH * 0.5327102803738317 , IMAGE_HEIGHT * 0.48130841121495327 ) ; METALKNOB_UPPERHL . curveTo ( IMAGE_WIDTH * 0.5280373831775701 , IMAGE_HEIGHT * 0.4672897196261682 , IMAGE_WIDTH * 0.514018691588785 , IMAGE_HEIGHT * 0.45794392523364486 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.45794392523364486 ) ; METALKNOB_UPPERHL . curveTo ( IMAGE_WIDTH * 0.48130841121495327 , IMAGE_HEIGHT * 0.45794392523364486 , IMAGE_WIDTH * 0.4672897196261682 , IMAGE_HEIGHT * 0.4672897196261682 , IMAGE_WIDTH * 0.46261682242990654 , IMAGE_HEIGHT * 0.48130841121495327 ) ; METALKNOB_UPPERHL . curveTo ( IMAGE_WIDTH * 0.4672897196261682 , IMAGE_HEIGHT * 0.48598130841121495 , IMAGE_WIDTH * 0.48130841121495327 , IMAGE_HEIGHT * 0.49065420560747663 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.49065420560747663 ) ; METALKNOB_UPPERHL . curveTo ( IMAGE_WIDTH * 0.514018691588785 , IMAGE_HEIGHT * 0.49065420560747663 , IMAGE_WIDTH * 0.5280373831775701 , IMAGE_HEIGHT * 0.48598130841121495 , IMAGE_WIDTH * 0.5327102803738317 , IMAGE_HEIGHT * 0.48130841121495327 ) ; METALKNOB_UPPERHL . closePath ( ) ; final Point2D METALKNOB_UPPERHL_CENTER = new Point2D . Double ( ( 0.4953271028037383 * IMAGE_WIDTH ) , ( 0.45794392523364486 * IMAGE_HEIGHT ) ) ; final float [ ] METALKNOB_UPPERHL_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOB_UPPERHL_COLORS = { new Color ( 255 , 255 , 255 , 191 ) , new Color ( 255 , 255 , 255 , 0 ) } ; final RadialGradientPaint METALKNOB_UPPERHL_GRADIENT = new RadialGradientPaint ( METALKNOB_UPPERHL_CENTER , ( float ) ( 0.04906542056074766 * IMAGE_WIDTH ) , METALKNOB_UPPERHL_FRACTIONS , METALKNOB_UPPERHL_COLORS ) ; G2 . setPaint ( METALKNOB_UPPERHL_GRADIENT ) ; G2 . fill ( METALKNOB_UPPERHL ) ; final Ellipse2D METALKNOB_INNERFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.47663551568984985 , IMAGE_HEIGHT * 0.4813084006309509 , IMAGE_WIDTH * 0.04205608367919922 , IMAGE_HEIGHT * 0.04205608367919922 ) ; final Point2D METALKNOB_INNERFRAME_START = new Point2D . Double ( 0 , METALKNOB_INNERFRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOB_INNERFRAME_STOP = new Point2D . Double ( 0 , METALKNOB_INNERFRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOB_INNERFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOB_INNERFRAME_COLORS = { new Color ( 0 , 0 , 0 , 255 ) , new Color ( 204 , 204 , 204 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( METALKNOB_INNERFRAME_START , METALKNOB_INNERFRAME_STOP ) ; final LinearGradientPaint METALKNOB_INNERFRAME_GRADIENT = new LinearGradientPaint ( METALKNOB_INNERFRAME_START , METALKNOB_INNERFRAME_STOP , METALKNOB_INNERFRAME_FRACTIONS , METALKNOB_INNERFRAME_COLORS ) ; G2 . setPaint ( METALKNOB_INNERFRAME_GRADIENT ) ; G2 . fill ( METALKNOB_INNERFRAME ) ; final Ellipse2D METALKNOB_INNERBACKGROUND = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4813084006309509 , IMAGE_HEIGHT * 0.4859813153743744 , IMAGE_WIDTH * 0.03271031379699707 , IMAGE_HEIGHT * 0.03271028399467468 ) ; final Point2D METALKNOB_INNERBACKGROUND_START = new Point2D . Double ( 0 , METALKNOB_INNERBACKGROUND . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOB_INNERBACKGROUND_STOP = new Point2D . Double ( 0 , METALKNOB_INNERBACKGROUND . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOB_INNERBACKGROUND_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOB_INNERBACKGROUND_COLORS = { new Color ( 1 , 6 , 11 , 255 ) , new Color ( 50 , 52 , 56 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( METALKNOB_INNERBACKGROUND_START , METALKNOB_INNERBACKGROUND_STOP ) ; final LinearGradientPaint METALKNOB_INNERBACKGROUND_GRADIENT = new LinearGradientPaint ( METALKNOB_INNERBACKGROUND_START , METALKNOB_INNERBACKGROUND_STOP , METALKNOB_INNERBACKGROUND_FRACTIONS , METALKNOB_INNERBACKGROUND_COLORS ) ; G2 . setPaint ( METALKNOB_INNERBACKGROUND_GRADIENT ) ; G2 . fill ( METALKNOB_INNERBACKGROUND ) ; break ; } } // Draw min bottom if ( postPositionList . contains ( PostPosition . MIN_BOTTOM ) ) { G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.336448609828949 ) , ( int ) ( IMAGE_HEIGHT * 0.8037382960319519 ) , null ) ; } // Draw max bottom post if ( postPositionList . contains ( PostPosition . MAX_BOTTOM ) ) { G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.6261682510375977 ) , ( int ) ( IMAGE_HEIGHT * 0.8037382960319519 ) , null ) ; } // Draw min center bottom post if ( postPositionList . contains ( PostPosition . MAX_CENTER_BOTTOM ) ) { G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.5233644843101501 ) , ( int ) ( IMAGE_HEIGHT * 0.8317757248878479 ) , null ) ; } // Draw max center top post if ( postPositionList . contains ( PostPosition . MAX_CENTER_TOP ) ) { G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.5233644843101501 ) , ( int ) ( IMAGE_HEIGHT * 0.13084112107753754 ) , null ) ; } // Draw max right post if ( postPositionList . contains ( PostPosition . MAX_RIGHT ) ) { G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.8317757248878479 ) , ( int ) ( IMAGE_HEIGHT * 0.514018714427948 ) , null ) ; } // Draw min left post if ( postPositionList . contains ( PostPosition . MIN_LEFT ) ) { G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.13084112107753754 ) , ( int ) ( IMAGE_HEIGHT * 0.514018714427948 ) , null ) ; } // Draw lower center post final AffineTransform OLD_TRANSFORM = G2 . getTransform ( ) ; final Point2D KNOB_CENTER = new Point2D . Double ( ) ; if ( postPositionList . contains ( PostPosition . LOWER_CENTER ) ) { switch ( getKnobType ( ) ) { case SMALL_STD_KNOB : final Ellipse2D LOWERCENTER_KNOB_FRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4579439163208008 , IMAGE_HEIGHT * 0.6915887594223022 , IMAGE_WIDTH * 0.08411216735839844 , IMAGE_HEIGHT * 0.08411216735839844 ) ; switch ( getOrientation ( ) ) { case WEST : KNOB_CENTER . setLocation ( LOWERCENTER_KNOB_FRAME . getCenterX ( ) , LOWERCENTER_KNOB_FRAME . getCenterY ( ) ) ; G2 . rotate ( Math . PI / 2 , KNOB_CENTER . getX ( ) , KNOB_CENTER . getY ( ) ) ; break ; } final Point2D LOWERCENTER_KNOB_FRAME_START = new Point2D . Double ( 0 , LOWERCENTER_KNOB_FRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D LOWERCENTER_KNOB_FRAME_STOP = new Point2D . Double ( 0 , LOWERCENTER_KNOB_FRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] LOWERCENTER_KNOB_FRAME_FRACTIONS = { 0.0f , 0.46f , 1.0f } ; final Color [ ] LOWERCENTER_KNOB_FRAME_COLORS = { new Color ( 180 , 180 , 180 , 255 ) , new Color ( 63 , 63 , 63 , 255 ) , new Color ( 40 , 40 , 40 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( LOWERCENTER_KNOB_FRAME_START , LOWERCENTER_KNOB_FRAME_STOP ) ; final LinearGradientPaint LOWERCENTER_KNOB_FRAME_GRADIENT = new LinearGradientPaint ( LOWERCENTER_KNOB_FRAME_START , LOWERCENTER_KNOB_FRAME_STOP , LOWERCENTER_KNOB_FRAME_FRACTIONS , LOWERCENTER_KNOB_FRAME_COLORS ) ; G2 . setPaint ( LOWERCENTER_KNOB_FRAME_GRADIENT ) ; G2 . fill ( LOWERCENTER_KNOB_FRAME ) ; final Ellipse2D LOWERCENTER_KNOB_MAIN = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4672897160053253 , IMAGE_HEIGHT * 0.7009345889091492 , IMAGE_WIDTH * 0.06542053818702698 , IMAGE_HEIGHT * 0.06542056798934937 ) ; final Point2D LOWERCENTER_KNOB_MAIN_START = new Point2D . Double ( 0 , LOWERCENTER_KNOB_MAIN . getBounds2D ( ) . getMinY ( ) ) ; final Point2D LOWERCENTER_KNOB_MAIN_STOP = new Point2D . Double ( 0 , LOWERCENTER_KNOB_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] LOWERCENTER_KNOB_MAIN_FRACTIONS = { 0.0f , 0.5f , 1.0f } ; final Color [ ] LOWERCENTER_KNOB_MAIN_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : LOWERCENTER_KNOB_MAIN_COLORS = new Color [ ] { new Color ( 0xBFBFBF ) , new Color ( 0x2B2A2F ) , new Color ( 0x7D7E80 ) } ; break ; case BRASS : LOWERCENTER_KNOB_MAIN_COLORS = new Color [ ] { new Color ( 0xDFD0AE ) , new Color ( 0x7A5E3E ) , new Color ( 0xCFBE9D ) } ; break ; case SILVER : default : LOWERCENTER_KNOB_MAIN_COLORS = new Color [ ] { new Color ( 0xD7D7D7 ) , new Color ( 0x747474 ) , new Color ( 0xD7D7D7 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( LOWERCENTER_KNOB_MAIN_START , LOWERCENTER_KNOB_MAIN_STOP ) ; final LinearGradientPaint LOWERCENTER_KNOB_MAIN_GRADIENT = new LinearGradientPaint ( LOWERCENTER_KNOB_MAIN_START , LOWERCENTER_KNOB_MAIN_STOP , LOWERCENTER_KNOB_MAIN_FRACTIONS , LOWERCENTER_KNOB_MAIN_COLORS ) ; G2 . setPaint ( LOWERCENTER_KNOB_MAIN_GRADIENT ) ; G2 . fill ( LOWERCENTER_KNOB_MAIN ) ; final Ellipse2D LOWERCENTER_KNOB_INNERSHADOW = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4672897160053253 , IMAGE_HEIGHT * 0.7009345889091492 , IMAGE_WIDTH * 0.06542053818702698 , IMAGE_HEIGHT * 0.06542056798934937 ) ; final Point2D LOWERCENTER_KNOB_INNERSHADOW_CENTER = new Point2D . Double ( ( 0.4953271028037383 * IMAGE_WIDTH ) , ( 0.7242990654205608 * IMAGE_HEIGHT ) ) ; final float [ ] LOWERCENTER_KNOB_INNERSHADOW_FRACTIONS = { 0.0f , 0.75f , 0.76f , 1.0f } ; final Color [ ] LOWERCENTER_KNOB_INNERSHADOW_COLORS = { new Color ( 0 , 0 , 0 , 0 ) , new Color ( 0 , 0 , 0 , 0 ) , new Color ( 0 , 0 , 0 , 1 ) , new Color ( 0 , 0 , 0 , 51 ) } ; final RadialGradientPaint LOWERCENTER_KNOB_INNERSHADOW_GRADIENT = new RadialGradientPaint ( LOWERCENTER_KNOB_INNERSHADOW_CENTER , ( float ) ( 0.03271028037383177 * IMAGE_WIDTH ) , LOWERCENTER_KNOB_INNERSHADOW_FRACTIONS , LOWERCENTER_KNOB_INNERSHADOW_COLORS ) ; G2 . setPaint ( LOWERCENTER_KNOB_INNERSHADOW_GRADIENT ) ; G2 . fill ( LOWERCENTER_KNOB_INNERSHADOW ) ; break ; case BIG_STD_KNOB : final Ellipse2D BIGLOWERCENTER_BACKGROUNDFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4392523467540741 , IMAGE_HEIGHT * 0.672897219657898 , IMAGE_WIDTH * 0.1214953362941742 , IMAGE_HEIGHT * 0.1214953064918518 ) ; switch ( getOrientation ( ) ) { case WEST : KNOB_CENTER . setLocation ( BIGLOWERCENTER_BACKGROUNDFRAME . getCenterX ( ) , BIGLOWERCENTER_BACKGROUNDFRAME . getCenterY ( ) ) ; G2 . rotate ( Math . PI / 2 , KNOB_CENTER . getX ( ) , KNOB_CENTER . getY ( ) ) ; break ; } final Point2D BIGLOWERCENTER_BACKGROUNDFRAME_START = new Point2D . Double ( 0 , BIGLOWERCENTER_BACKGROUNDFRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGLOWERCENTER_BACKGROUNDFRAME_STOP = new Point2D . Double ( 0 , BIGLOWERCENTER_BACKGROUNDFRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGLOWERCENTER_BACKGROUNDFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] BIGLOWERCENTER_BACKGROUNDFRAME_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGLOWERCENTER_BACKGROUNDFRAME_COLORS = new Color [ ] { new Color ( 129 , 133 , 136 , 255 ) , new Color ( 61 , 61 , 73 , 255 ) } ; break ; case BRASS : BIGLOWERCENTER_BACKGROUNDFRAME_COLORS = new Color [ ] { new Color ( 143 , 117 , 80 , 255 ) , new Color ( 100 , 76 , 49 , 255 ) } ; break ; case SILVER : default : BIGLOWERCENTER_BACKGROUNDFRAME_COLORS = new Color [ ] { new Color ( 152 , 152 , 152 , 255 ) , new Color ( 118 , 121 , 126 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGLOWERCENTER_BACKGROUNDFRAME_START , BIGLOWERCENTER_BACKGROUNDFRAME_STOP ) ; final LinearGradientPaint BIGLOWERCENTER_BACKGROUNDFRAME_GRADIENT = new LinearGradientPaint ( BIGLOWERCENTER_BACKGROUNDFRAME_START , BIGLOWERCENTER_BACKGROUNDFRAME_STOP , BIGLOWERCENTER_BACKGROUNDFRAME_FRACTIONS , BIGLOWERCENTER_BACKGROUNDFRAME_COLORS ) ; G2 . setPaint ( BIGLOWERCENTER_BACKGROUNDFRAME_GRADIENT ) ; G2 . fill ( BIGLOWERCENTER_BACKGROUNDFRAME ) ; final Ellipse2D BIGLOWERCENTER_BACKGROUND = new Ellipse2D . Double ( IMAGE_WIDTH * 0.44392523169517517 , IMAGE_HEIGHT * 0.677570104598999 , IMAGE_WIDTH * 0.11214950680732727 , IMAGE_HEIGHT * 0.11214953660964966 ) ; final Point2D BIGLOWERCENTER_BACKGROUND_START = new Point2D . Double ( 0 , BIGLOWERCENTER_BACKGROUND . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGLOWERCENTER_BACKGROUND_STOP = new Point2D . Double ( 0 , BIGLOWERCENTER_BACKGROUND . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGLOWERCENTER_BACKGROUND_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] BIGLOWERCENTER_BACKGROUND_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGLOWERCENTER_BACKGROUND_COLORS = new Color [ ] { new Color ( 26 , 27 , 32 , 255 ) , new Color ( 96 , 97 , 102 , 255 ) } ; break ; case BRASS : BIGLOWERCENTER_BACKGROUND_COLORS = new Color [ ] { new Color ( 98 , 75 , 49 , 255 ) , new Color ( 149 , 109 , 54 , 255 ) } ; break ; case SILVER : default : BIGLOWERCENTER_BACKGROUND_COLORS = new Color [ ] { new Color ( 118 , 121 , 126 , 255 ) , new Color ( 191 , 191 , 191 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGLOWERCENTER_BACKGROUND_START , BIGLOWERCENTER_BACKGROUND_STOP ) ; final LinearGradientPaint BIGLOWERCENTER_BACKGROUND_GRADIENT = new LinearGradientPaint ( BIGLOWERCENTER_BACKGROUND_START , BIGLOWERCENTER_BACKGROUND_STOP , BIGLOWERCENTER_BACKGROUND_FRACTIONS , BIGLOWERCENTER_BACKGROUND_COLORS ) ; G2 . setPaint ( BIGLOWERCENTER_BACKGROUND_GRADIENT ) ; G2 . fill ( BIGLOWERCENTER_BACKGROUND ) ; final Ellipse2D BIGLOWERCENTER_FOREGROUNDFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4532710313796997 , IMAGE_HEIGHT * 0.6869158744812012 , IMAGE_WIDTH * 0.09345793724060059 , IMAGE_HEIGHT * 0.09345793724060059 ) ; final Point2D BIGLOWERCENTER_FOREGROUNDFRAME_START = new Point2D . Double ( 0 , BIGLOWERCENTER_FOREGROUNDFRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGLOWERCENTER_FOREGROUNDFRAME_STOP = new Point2D . Double ( 0 , BIGLOWERCENTER_FOREGROUNDFRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGLOWERCENTER_FOREGROUNDFRAME_FRACTIONS = { 0.0f , 0.47f , 1.0f } ; final Color [ ] BIGLOWERCENTER_FOREGROUNDFRAME_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGLOWERCENTER_FOREGROUNDFRAME_COLORS = new Color [ ] { new Color ( 191 , 191 , 191 , 255 ) , new Color ( 56 , 57 , 61 , 255 ) , new Color ( 143 , 144 , 146 , 255 ) } ; break ; case BRASS : BIGLOWERCENTER_FOREGROUNDFRAME_COLORS = new Color [ ] { new Color ( 147 , 108 , 54 , 255 ) , new Color ( 82 , 66 , 50 , 255 ) , new Color ( 147 , 108 , 54 , 255 ) } ; break ; case SILVER : default : BIGLOWERCENTER_FOREGROUNDFRAME_COLORS = new Color [ ] { new Color ( 191 , 191 , 191 , 255 ) , new Color ( 116 , 116 , 116 , 255 ) , new Color ( 143 , 144 , 146 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGLOWERCENTER_FOREGROUNDFRAME_START , BIGLOWERCENTER_FOREGROUNDFRAME_STOP ) ; final LinearGradientPaint BIGLOWERCENTER_FOREGROUNDFRAME_GRADIENT = new LinearGradientPaint ( BIGLOWERCENTER_FOREGROUNDFRAME_START , BIGLOWERCENTER_FOREGROUNDFRAME_STOP , BIGLOWERCENTER_FOREGROUNDFRAME_FRACTIONS , BIGLOWERCENTER_FOREGROUNDFRAME_COLORS ) ; G2 . setPaint ( BIGLOWERCENTER_FOREGROUNDFRAME_GRADIENT ) ; G2 . fill ( BIGLOWERCENTER_FOREGROUNDFRAME ) ; final Ellipse2D BIGLOWERCENTER_FOREGROUND = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4579439163208008 , IMAGE_HEIGHT * 0.6915887594223022 , IMAGE_WIDTH * 0.08411216735839844 , IMAGE_HEIGHT * 0.08411216735839844 ) ; final Point2D BIGLOWERCENTER_FOREGROUND_START = new Point2D . Double ( 0 , BIGLOWERCENTER_FOREGROUND . getBounds2D ( ) . getMinY ( ) ) ; final Point2D BIGLOWERCENTER_FOREGROUND_STOP = new Point2D . Double ( 0 , BIGLOWERCENTER_FOREGROUND . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] BIGLOWERCENTER_FOREGROUND_FRACTIONS = { 0.0f , 0.21f , 0.5f , 0.78f , 1.0f } ; final Color [ ] BIGLOWERCENTER_FOREGROUND_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : BIGLOWERCENTER_FOREGROUND_COLORS = new Color [ ] { new Color ( 191 , 191 , 191 , 255 ) , new Color ( 94 , 93 , 99 , 255 ) , new Color ( 43 , 42 , 47 , 255 ) , new Color ( 78 , 79 , 81 , 255 ) , new Color ( 143 , 144 , 146 , 255 ) } ; break ; case BRASS : BIGLOWERCENTER_FOREGROUND_COLORS = new Color [ ] { new Color ( 223 , 208 , 174 , 255 ) , new Color ( 159 , 136 , 104 , 255 ) , new Color ( 122 , 94 , 62 , 255 ) , new Color ( 159 , 136 , 104 , 255 ) , new Color ( 223 , 208 , 174 , 255 ) } ; break ; case SILVER : default : BIGLOWERCENTER_FOREGROUND_COLORS = new Color [ ] { new Color ( 215 , 215 , 215 , 255 ) , new Color ( 139 , 142 , 145 , 255 ) , new Color ( 100 , 100 , 100 , 255 ) , new Color ( 139 , 142 , 145 , 255 ) , new Color ( 215 , 215 , 215 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( BIGLOWERCENTER_FOREGROUND_START , BIGLOWERCENTER_FOREGROUND_STOP ) ; final LinearGradientPaint BIGLOWERCENTER_FOREGROUND_GRADIENT = new LinearGradientPaint ( BIGLOWERCENTER_FOREGROUND_START , BIGLOWERCENTER_FOREGROUND_STOP , BIGLOWERCENTER_FOREGROUND_FRACTIONS , BIGLOWERCENTER_FOREGROUND_COLORS ) ; G2 . setPaint ( BIGLOWERCENTER_FOREGROUND_GRADIENT ) ; G2 . fill ( BIGLOWERCENTER_FOREGROUND ) ; break ; case BIG_CHROME_KNOB : final Ellipse2D CHROMEKNOB_BACKFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4000000059604645 , IMAGE_HEIGHT * 0.6333333253860474 , IMAGE_WIDTH * 0.20000001788139343 , IMAGE_HEIGHT * 0.19999998807907104 ) ; switch ( getOrientation ( ) ) { case WEST : KNOB_CENTER . setLocation ( CHROMEKNOB_BACKFRAME . getCenterX ( ) , CHROMEKNOB_BACKFRAME . getCenterY ( ) ) ; G2 . rotate ( Math . PI / 2 , KNOB_CENTER . getX ( ) , KNOB_CENTER . getY ( ) ) ; break ; } final Point2D CHROMEKNOB_BACKFRAME_START = new Point2D . Double ( ( 0.44666666666666666 * IMAGE_WIDTH ) , ( 0.6466666666666666 * IMAGE_HEIGHT ) ) ; final Point2D CHROMEKNOB_BACKFRAME_STOP = new Point2D . Double ( ( ( 0.44666666666666666 + 0.10245105775175295 ) * IMAGE_WIDTH ) , ( ( 0.6466666666666666 + 0.16395596525690903 ) * IMAGE_HEIGHT ) ) ; final float [ ] CHROMEKNOB_BACKFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] CHROMEKNOB_BACKFRAME_COLORS = { new Color ( 129 , 139 , 140 , 255 ) , new Color ( 166 , 171 , 175 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( CHROMEKNOB_BACKFRAME_START , CHROMEKNOB_BACKFRAME_STOP ) ; final LinearGradientPaint CHROMEKNOB_BACKFRAME_GRADIENT = new LinearGradientPaint ( CHROMEKNOB_BACKFRAME_START , CHROMEKNOB_BACKFRAME_STOP , CHROMEKNOB_BACKFRAME_FRACTIONS , CHROMEKNOB_BACKFRAME_COLORS ) ; G2 . setPaint ( CHROMEKNOB_BACKFRAME_GRADIENT ) ; G2 . fill ( CHROMEKNOB_BACKFRAME ) ; final Ellipse2D CHROMEKNOB_BACK = new Ellipse2D . Double ( IMAGE_WIDTH * 0.40666666626930237 , IMAGE_HEIGHT * 0.6399999856948853 , IMAGE_WIDTH * 0.18666663765907288 , IMAGE_HEIGHT * 0.18666666746139526 ) ; final Point2D CHROMEKNOB_BACK_CENTER = new Point2D . Double ( CHROMEKNOB_BACK . getCenterX ( ) , CHROMEKNOB_BACK . getCenterY ( ) ) ; final float [ ] CHROMEKNOB_BACK_FRACTIONS = { 0.0f , 0.09f , 0.12f , 0.16f , 0.25f , 0.29f , 0.33f , 0.38f , 0.48f , 0.52f , 0.65f , 0.69f , 0.8f , 0.83f , 0.87f , 0.97f , 1.0f } ; final Color [ ] CHROMEKNOB_BACK_COLORS = { new Color ( 255 , 255 , 255 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 136 , 136 , 138 , 255 ) , new Color ( 164 , 185 , 190 , 255 ) , new Color ( 158 , 179 , 182 , 255 ) , new Color ( 112 , 112 , 112 , 255 ) , new Color ( 221 , 227 , 227 , 255 ) , new Color ( 155 , 176 , 179 , 255 ) , new Color ( 156 , 176 , 177 , 255 ) , new Color ( 254 , 255 , 255 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) , new Color ( 156 , 180 , 180 , 255 ) , new Color ( 198 , 209 , 211 , 255 ) , new Color ( 246 , 248 , 247 , 255 ) , new Color ( 204 , 216 , 216 , 255 ) , new Color ( 164 , 188 , 190 , 255 ) , new Color ( 255 , 255 , 255 , 255 ) } ; final ConicalGradientPaint CHROMEKNOB_BACK_GRADIENT = new ConicalGradientPaint ( false , CHROMEKNOB_BACK_CENTER , 0 , CHROMEKNOB_BACK_FRACTIONS , CHROMEKNOB_BACK_COLORS ) ; G2 . setPaint ( CHROMEKNOB_BACK_GRADIENT ) ; G2 . fill ( CHROMEKNOB_BACK ) ; final Ellipse2D CHROMEKNOB_FOREFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4533333480358124 , IMAGE_HEIGHT * 0.6866666674613953 , IMAGE_WIDTH * 0.09333333373069763 , IMAGE_HEIGHT * 0.09333330392837524 ) ; final Point2D CHROMEKNOB_FOREFRAME_START = new Point2D . Double ( ( 0.47333333333333333 * IMAGE_WIDTH ) , ( 0.6933333333333334 * IMAGE_HEIGHT ) ) ; final Point2D CHROMEKNOB_FOREFRAME_STOP = new Point2D . Double ( ( ( 0.47333333333333333 + 0.04846338496746472 ) * IMAGE_WIDTH ) , ( ( 0.6933333333333334 + 0.07184992295477029 ) * IMAGE_HEIGHT ) ) ; final float [ ] CHROMEKNOB_FOREFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] CHROMEKNOB_FOREFRAME_COLORS = { new Color ( 225 , 235 , 232 , 255 ) , new Color ( 196 , 207 , 207 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( CHROMEKNOB_FOREFRAME_START , CHROMEKNOB_FOREFRAME_STOP ) ; final LinearGradientPaint CHROMEKNOB_FOREFRAME_GRADIENT = new LinearGradientPaint ( CHROMEKNOB_FOREFRAME_START , CHROMEKNOB_FOREFRAME_STOP , CHROMEKNOB_FOREFRAME_FRACTIONS , CHROMEKNOB_FOREFRAME_COLORS ) ; G2 . setPaint ( CHROMEKNOB_FOREFRAME_GRADIENT ) ; G2 . fill ( CHROMEKNOB_FOREFRAME ) ; final Ellipse2D CHROMEKNOB_FORE = new Ellipse2D . Double ( IMAGE_WIDTH * 0.46000000834465027 , IMAGE_HEIGHT * 0.6933333277702332 , IMAGE_WIDTH * 0.08000001311302185 , IMAGE_HEIGHT * 0.07999998331069946 ) ; final Point2D CHROMEKNOB_FORE_START = new Point2D . Double ( ( 0.47333333333333333 * IMAGE_WIDTH ) , ( 0.7 * IMAGE_HEIGHT ) ) ; final Point2D CHROMEKNOB_FORE_STOP = new Point2D . Double ( ( ( 0.47333333333333333 + 0.04473543227765974 ) * IMAGE_WIDTH ) , ( ( 0.7 + 0.06632300580440334 ) * IMAGE_HEIGHT ) ) ; final float [ ] CHROMEKNOB_FORE_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] CHROMEKNOB_FORE_COLORS = { new Color ( 237 , 239 , 237 , 255 ) , new Color ( 148 , 161 , 161 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( CHROMEKNOB_FORE_START , CHROMEKNOB_FORE_STOP ) ; final LinearGradientPaint CHROMEKNOB_FORE_GRADIENT = new LinearGradientPaint ( CHROMEKNOB_FORE_START , CHROMEKNOB_FORE_STOP , CHROMEKNOB_FORE_FRACTIONS , CHROMEKNOB_FORE_COLORS ) ; G2 . setPaint ( CHROMEKNOB_FORE_GRADIENT ) ; G2 . fill ( CHROMEKNOB_FORE ) ; break ; case METAL_KNOB : final Ellipse2D METALKNOBLC_FRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4579439163208008 , IMAGE_HEIGHT * 0.6915887594223022 , IMAGE_WIDTH * 0.08411216735839844 , IMAGE_HEIGHT * 0.08411216735839844 ) ; switch ( getOrientation ( ) ) { case WEST : KNOB_CENTER . setLocation ( METALKNOBLC_FRAME . getCenterX ( ) , METALKNOBLC_FRAME . getCenterY ( ) ) ; G2 . rotate ( Math . PI / 2 , KNOB_CENTER . getX ( ) , KNOB_CENTER . getY ( ) ) ; break ; } final Point2D METALKNOBLC_FRAME_START = new Point2D . Double ( 0 , METALKNOBLC_FRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOBLC_FRAME_STOP = new Point2D . Double ( 0 , METALKNOBLC_FRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOBLC_FRAME_FRACTIONS = { 0.0f , 0.47f , 1.0f } ; final Color [ ] METALKNOBLC_FRAME_COLORS = { new Color ( 92 , 95 , 101 , 255 ) , new Color ( 46 , 49 , 53 , 255 ) , new Color ( 22 , 23 , 26 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( METALKNOBLC_FRAME_START , METALKNOBLC_FRAME_STOP ) ; final LinearGradientPaint METALKNOBLC_FRAME_GRADIENT = new LinearGradientPaint ( METALKNOBLC_FRAME_START , METALKNOBLC_FRAME_STOP , METALKNOBLC_FRAME_FRACTIONS , METALKNOBLC_FRAME_COLORS ) ; G2 . setPaint ( METALKNOBLC_FRAME_GRADIENT ) ; G2 . fill ( METALKNOBLC_FRAME ) ; final Ellipse2D METALKNOBLC_MAIN = new Ellipse2D . Double ( IMAGE_WIDTH * 0.46261683106422424 , IMAGE_HEIGHT * 0.6962617039680481 , IMAGE_WIDTH * 0.0747663676738739 , IMAGE_HEIGHT * 0.07476633787155151 ) ; final Point2D METALKNOBLC_MAIN_START = new Point2D . Double ( 0 , METALKNOBLC_MAIN . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOBLC_MAIN_STOP = new Point2D . Double ( 0 , METALKNOBLC_MAIN . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOBLC_MAIN_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOBLC_MAIN_COLORS ; switch ( getModel ( ) . getKnobStyle ( ) ) { case BLACK : METALKNOBLC_MAIN_COLORS = new Color [ ] { new Color ( 0x2B2A2F ) , new Color ( 0x1A1B20 ) } ; break ; case BRASS : METALKNOBLC_MAIN_COLORS = new Color [ ] { new Color ( 0x966E36 ) , new Color ( 0x7C5F3D ) } ; break ; case SILVER : default : METALKNOBLC_MAIN_COLORS = new Color [ ] { new Color ( 204 , 204 , 204 , 255 ) , new Color ( 87 , 92 , 98 , 255 ) } ; break ; } Util . INSTANCE . validateGradientPoints ( METALKNOBLC_MAIN_START , METALKNOBLC_MAIN_STOP ) ; final LinearGradientPaint METALKNOBLC_MAIN_GRADIENT = new LinearGradientPaint ( METALKNOBLC_MAIN_START , METALKNOBLC_MAIN_STOP , METALKNOBLC_MAIN_FRACTIONS , METALKNOBLC_MAIN_COLORS ) ; G2 . setPaint ( METALKNOBLC_MAIN_GRADIENT ) ; G2 . fill ( METALKNOBLC_MAIN ) ; final GeneralPath METALKNOBLC_LOWERHL = new GeneralPath ( ) ; METALKNOBLC_LOWERHL . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; METALKNOBLC_LOWERHL . moveTo ( IMAGE_WIDTH * 0.5186915887850467 , IMAGE_HEIGHT * 0.7616822429906542 ) ; METALKNOBLC_LOWERHL . curveTo ( IMAGE_WIDTH * 0.5186915887850467 , IMAGE_HEIGHT * 0.7523364485981309 , IMAGE_WIDTH * 0.5093457943925234 , IMAGE_HEIGHT * 0.7476635514018691 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.7476635514018691 ) ; METALKNOBLC_LOWERHL . curveTo ( IMAGE_WIDTH * 0.48598130841121495 , IMAGE_HEIGHT * 0.7476635514018691 , IMAGE_WIDTH * 0.4766355140186916 , IMAGE_HEIGHT * 0.7523364485981309 , IMAGE_WIDTH * 0.4766355140186916 , IMAGE_HEIGHT * 0.7616822429906542 ) ; METALKNOBLC_LOWERHL . curveTo ( IMAGE_WIDTH * 0.48130841121495327 , IMAGE_HEIGHT * 0.7663551401869159 , IMAGE_WIDTH * 0.49065420560747663 , IMAGE_HEIGHT * 0.7710280373831776 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.7710280373831776 ) ; METALKNOBLC_LOWERHL . curveTo ( IMAGE_WIDTH * 0.5046728971962616 , IMAGE_HEIGHT * 0.7710280373831776 , IMAGE_WIDTH * 0.514018691588785 , IMAGE_HEIGHT * 0.7663551401869159 , IMAGE_WIDTH * 0.5186915887850467 , IMAGE_HEIGHT * 0.7616822429906542 ) ; METALKNOBLC_LOWERHL . closePath ( ) ; final Point2D METALKNOBLC_LOWERHL_CENTER = new Point2D . Double ( ( 0.5 * IMAGE_WIDTH ) , ( 0.7710280373831776 * IMAGE_HEIGHT ) ) ; final float [ ] METALKNOBLC_LOWERHL_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOBLC_LOWERHL_COLORS = { new Color ( 255 , 255 , 255 , 153 ) , new Color ( 255 , 255 , 255 , 0 ) } ; final RadialGradientPaint METALKNOBLC_LOWERHL_GRADIENT = new RadialGradientPaint ( METALKNOBLC_LOWERHL_CENTER , ( float ) ( 0.03271028037383177 * IMAGE_WIDTH ) , METALKNOBLC_LOWERHL_FRACTIONS , METALKNOBLC_LOWERHL_COLORS ) ; G2 . setPaint ( METALKNOBLC_LOWERHL_GRADIENT ) ; G2 . fill ( METALKNOBLC_LOWERHL ) ; final GeneralPath METALKNOBLC_UPPERHL = new GeneralPath ( ) ; METALKNOBLC_UPPERHL . setWindingRule ( Path2D . WIND_EVEN_ODD ) ; METALKNOBLC_UPPERHL . moveTo ( IMAGE_WIDTH * 0.5327102803738317 , IMAGE_HEIGHT * 0.7149532710280374 ) ; METALKNOBLC_UPPERHL . curveTo ( IMAGE_WIDTH * 0.5280373831775701 , IMAGE_HEIGHT * 0.7009345794392523 , IMAGE_WIDTH * 0.514018691588785 , IMAGE_HEIGHT * 0.6915887850467289 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.6915887850467289 ) ; METALKNOBLC_UPPERHL . curveTo ( IMAGE_WIDTH * 0.48130841121495327 , IMAGE_HEIGHT * 0.6915887850467289 , IMAGE_WIDTH * 0.4672897196261682 , IMAGE_HEIGHT * 0.7009345794392523 , IMAGE_WIDTH * 0.46261682242990654 , IMAGE_HEIGHT * 0.7149532710280374 ) ; METALKNOBLC_UPPERHL . curveTo ( IMAGE_WIDTH * 0.4672897196261682 , IMAGE_HEIGHT * 0.719626168224299 , IMAGE_WIDTH * 0.48130841121495327 , IMAGE_HEIGHT * 0.7242990654205608 , IMAGE_WIDTH * 0.5 , IMAGE_HEIGHT * 0.7242990654205608 ) ; METALKNOBLC_UPPERHL . curveTo ( IMAGE_WIDTH * 0.514018691588785 , IMAGE_HEIGHT * 0.7242990654205608 , IMAGE_WIDTH * 0.5280373831775701 , IMAGE_HEIGHT * 0.719626168224299 , IMAGE_WIDTH * 0.5327102803738317 , IMAGE_HEIGHT * 0.7149532710280374 ) ; METALKNOBLC_UPPERHL . closePath ( ) ; final Point2D METALKNOBLC_UPPERHL_CENTER = new Point2D . Double ( ( 0.4953271028037383 * IMAGE_WIDTH ) , ( 0.6915887850467289 * IMAGE_HEIGHT ) ) ; final float [ ] METALKNOBLC_UPPERHL_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOBLC_UPPERHL_COLORS = { new Color ( 255 , 255 , 255 , 191 ) , new Color ( 255 , 255 , 255 , 0 ) } ; final RadialGradientPaint METALKNOBLC_UPPERHL_GRADIENT = new RadialGradientPaint ( METALKNOBLC_UPPERHL_CENTER , ( float ) ( 0.04906542056074766 * IMAGE_WIDTH ) , METALKNOBLC_UPPERHL_FRACTIONS , METALKNOBLC_UPPERHL_COLORS ) ; G2 . setPaint ( METALKNOBLC_UPPERHL_GRADIENT ) ; G2 . fill ( METALKNOBLC_UPPERHL ) ; final Ellipse2D METALKNOBLC_INNERFRAME = new Ellipse2D . Double ( IMAGE_WIDTH * 0.47663551568984985 , IMAGE_HEIGHT * 0.7149532437324524 , IMAGE_WIDTH * 0.04205608367919922 , IMAGE_HEIGHT * 0.04205608367919922 ) ; final Point2D METALKNOBLC_INNERFRAME_START = new Point2D . Double ( 0 , METALKNOBLC_INNERFRAME . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOBLC_INNERFRAME_STOP = new Point2D . Double ( 0 , METALKNOBLC_INNERFRAME . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOBLC_INNERFRAME_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOBLC_INNERFRAME_COLORS = { new Color ( 0 , 0 , 0 , 255 ) , new Color ( 204 , 204 , 204 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( METALKNOBLC_INNERFRAME_START , METALKNOBLC_INNERFRAME_STOP ) ; final LinearGradientPaint METALKNOBLC_INNERFRAME_GRADIENT = new LinearGradientPaint ( METALKNOBLC_INNERFRAME_START , METALKNOBLC_INNERFRAME_STOP , METALKNOBLC_INNERFRAME_FRACTIONS , METALKNOBLC_INNERFRAME_COLORS ) ; G2 . setPaint ( METALKNOBLC_INNERFRAME_GRADIENT ) ; G2 . fill ( METALKNOBLC_INNERFRAME ) ; final Ellipse2D METALKNOBLC_INNERBACKGROUND = new Ellipse2D . Double ( IMAGE_WIDTH * 0.4813084006309509 , IMAGE_HEIGHT * 0.7196261882781982 , IMAGE_WIDTH * 0.03271031379699707 , IMAGE_HEIGHT * 0.032710254192352295 ) ; final Point2D METALKNOBLC_INNERBACKGROUND_START = new Point2D . Double ( 0 , METALKNOBLC_INNERBACKGROUND . getBounds2D ( ) . getMinY ( ) ) ; final Point2D METALKNOBLC_INNERBACKGROUND_STOP = new Point2D . Double ( 0 , METALKNOBLC_INNERBACKGROUND . getBounds2D ( ) . getMaxY ( ) ) ; final float [ ] METALKNOBLC_INNERBACKGROUND_FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] METALKNOBLC_INNERBACKGROUND_COLORS = { new Color ( 1 , 6 , 11 , 255 ) , new Color ( 50 , 52 , 56 , 255 ) } ; Util . INSTANCE . validateGradientPoints ( METALKNOBLC_INNERBACKGROUND_START , METALKNOBLC_INNERBACKGROUND_STOP ) ; final LinearGradientPaint METALKNOBLC_INNERBACKGROUND_GRADIENT = new LinearGradientPaint ( METALKNOBLC_INNERBACKGROUND_START , METALKNOBLC_INNERBACKGROUND_STOP , METALKNOBLC_INNERBACKGROUND_FRACTIONS , METALKNOBLC_INNERBACKGROUND_COLORS ) ; G2 . setPaint ( METALKNOBLC_INNERBACKGROUND_GRADIENT ) ; G2 . fill ( METALKNOBLC_INNERBACKGROUND ) ; break ; } } // Reset orientation G2 . setTransform ( OLD_TRANSFORM ) ; // Draw radialvertical gauge right post if ( postPositionList . contains ( PostPosition . SMALL_GAUGE_MAX_RIGHT ) ) { switch ( getOrientation ( ) ) { case WEST : KNOB_CENTER . setLocation ( IMAGE_WIDTH * 0.7803738117218018 + SINGLE_POST . getWidth ( ) / 2.0 , IMAGE_HEIGHT * 0.44859811663627625 + SINGLE_POST . getHeight ( ) / 2.0 ) ; G2 . rotate ( Math . PI / 2 , KNOB_CENTER . getX ( ) , KNOB_CENTER . getY ( ) ) ; break ; } G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.7803738117218018 ) , ( int ) ( IMAGE_HEIGHT * 0.44859811663627625 ) , null ) ; G2 . setTransform ( OLD_TRANSFORM ) ; } // Draw radialvertical gauge left post if ( postPositionList . contains ( PostPosition . SMALL_GAUGE_MIN_LEFT ) ) { switch ( getOrientation ( ) ) { case WEST : KNOB_CENTER . setLocation ( IMAGE_WIDTH * 0.1822429895401001 + SINGLE_POST . getWidth ( ) / 2.0 , IMAGE_HEIGHT * 0.44859811663627625 + SINGLE_POST . getHeight ( ) / 2.0 ) ; G2 . rotate ( Math . PI / 2 , KNOB_CENTER . getX ( ) , KNOB_CENTER . getY ( ) ) ; break ; } G2 . drawImage ( SINGLE_POST , ( int ) ( IMAGE_WIDTH * 0.1822429895401001 ) , ( int ) ( IMAGE_HEIGHT * 0.44859811663627625 ) , null ) ; G2 . setTransform ( OLD_TRANSFORM ) ; } G2 . dispose ( ) ; return image ;
public class AmazonLightsailClient { /** * Adds public ports to an Amazon Lightsail instance . * The < code > open instance public ports < / code > operation supports tag - based access control via resource tags applied * to the resource identified by instanceName . For more information , see the < a * href = " https : / / lightsail . aws . amazon . com / ls / docs / en / articles / amazon - lightsail - controlling - access - using - tags " * > Lightsail Dev Guide < / a > . * @ param openInstancePublicPortsRequest * @ return Result of the OpenInstancePublicPorts operation returned by the service . * @ throws ServiceException * A general service exception . * @ throws InvalidInputException * Lightsail throws this exception when user input does not conform to the validation rules of an input * field . < / p > < note > * Domain - related APIs are only available in the N . Virginia ( us - east - 1 ) Region . Please set your AWS Region * configuration to us - east - 1 to create , view , or edit these resources . * @ throws NotFoundException * Lightsail throws this exception when it cannot find a resource . * @ throws OperationFailureException * Lightsail throws this exception when an operation fails to execute . * @ throws AccessDeniedException * Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to * access a resource . * @ throws AccountSetupInProgressException * Lightsail throws this exception when an account is still in the setup in progress state . * @ throws UnauthenticatedException * Lightsail throws this exception when the user has not been authenticated . * @ sample AmazonLightsail . OpenInstancePublicPorts * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / lightsail - 2016-11-28 / OpenInstancePublicPorts " * target = " _ top " > AWS API Documentation < / a > */ @ Override public OpenInstancePublicPortsResult openInstancePublicPorts ( OpenInstancePublicPortsRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeOpenInstancePublicPorts ( request ) ;
public class StoreFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertPluginBundleTypeToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcCsgPrimitive3D ( ) { } }
if ( ifcCsgPrimitive3DEClass == null ) { ifcCsgPrimitive3DEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 130 ) ; } return ifcCsgPrimitive3DEClass ;
public class SeaGlassComboPopup { /** * Configures the list which is used to hold the combo box items in the * popup . This method is called when the UI class is created . */ @ Override protected void configureList ( ) { } }
list . setFont ( comboBox . getFont ( ) ) ; list . setBorder ( null ) ; list . setCellRenderer ( comboBox . getRenderer ( ) ) ; list . setFocusable ( false ) ; list . setSelectionMode ( ListSelectionModel . SINGLE_SELECTION ) ; int selectedIndex = comboBox . getSelectedIndex ( ) ; if ( selectedIndex == - 1 ) { list . clearSelection ( ) ; } else { list . setSelectedIndex ( selectedIndex ) ; list . ensureIndexIsVisible ( selectedIndex ) ; } installListListeners ( ) ;
public class EncryptionUtil { /** * Gets the Encryptor . * @ param key the key * @ param salt the salt * @ return the Encryptor * @ throws NoSuchAlgorithmException the no such algorithm exception * @ throws UnsupportedEncodingException the unsupported encoding exception * @ throws InvalidKeySpecException the invalid key spec exception */ public static EncryptionUtil getInstance ( String key , String salt ) throws NoSuchAlgorithmException , UnsupportedEncodingException , InvalidKeySpecException { } }
if ( instance == null ) { synchronized ( EncryptionUtil . class ) { if ( instance == null ) { instance = new EncryptionUtil ( ) ; generateKeyIfNotAvailable ( key , salt ) ; } } } return instance ;
public class QueryUpdateOnSubscribe { /** * Notify observer of an error . * @ param e * @ param subscriber */ private void handleException ( Throwable e , Subscriber < ? super T > subscriber ) { } }
debug ( "onError: " , e . getMessage ( ) ) ; Exceptions . throwOrReport ( e , subscriber ) ;
public class BottomSheet { /** * Replaces the item at a specific index with a divider . * @ param index * The index of the item , which should be replaced , as an { @ link Integer } value * @ param titleId * The resource id of the title of the divider , which should be added , as an { @ link * Integer } value . The resource id must correspond to a valid string resource */ public final void setDivider ( final int index , @ StringRes final int titleId ) { } }
Divider divider = new Divider ( ) ; divider . setTitle ( getContext ( ) , titleId ) ; adapter . set ( index , divider ) ; adaptGridViewHeight ( ) ;
public class WebAppSecurityConfigImpl { /** * { @ inheritDoc } */ @ Override public boolean getAllowFailOverToBasicAuth ( ) { } }
if ( allowFailOverToBasicAuth || ( allowFailOverToAuthMethod != null && allowFailOverToAuthMethod . equalsIgnoreCase ( LoginConfiguration . BASIC ) ) ) { return true ; } else return false ;
public class CmsObject { /** * Reads all deleted ( historical ) resources below the given path , * including the full tree below the path , if required . < p > * The result list may include resources with the same name of * resources ( with different id ' s ) . < p > * Use in conjunction with the { @ link # restoreDeletedResource ( CmsUUID ) } * method . < p > * @ param resourcename the parent path to read the resources from * @ param readTree < code > true < / code > to read all sub resources * @ return a list of < code > { @ link I _ CmsHistoryResource } < / code > objects * @ throws CmsException if something goes wrong * @ see # readResource ( CmsUUID , int ) * @ see # readResources ( String , CmsResourceFilter , boolean ) */ public List < I_CmsHistoryResource > readDeletedResources ( String resourcename , boolean readTree ) throws CmsException { } }
CmsResource resource = readResource ( resourcename , CmsResourceFilter . ALL ) ; return m_securityManager . readDeletedResources ( m_context , resource , readTree ) ;
public class AbstractQuery { /** * Add an criteria to the query . The criteria will be connected using ' AND ' . * @ param criteria must not be { @ literal null } . * @ return */ @ SuppressWarnings ( "unchecked" ) public final < T extends SolrDataQuery > T addCriteria ( Criteria criteria ) { } }
Assert . notNull ( criteria , "Cannot add null criteria." ) ; if ( this . criteria == null ) { this . criteria = criteria ; } else { if ( this . criteria instanceof Crotch ) { ( ( Crotch ) this . criteria ) . add ( criteria ) ; } else { Crotch tree = new Crotch ( ) ; tree . add ( this . criteria ) ; tree . add ( criteria ) ; this . criteria = tree ; } } return ( T ) this ;
public class SwipeBackLayout { /** * Scroll out contentView and finish the activity */ public void scrollToFinishActivity ( ) { } }
final int childWidth = mContentView . getWidth ( ) ; final int childHeight = mContentView . getHeight ( ) ; int left = 0 , top = 0 ; if ( ( mEdgeFlag & EDGE_LEFT ) != 0 ) { left = childWidth + mShadowLeft . getIntrinsicWidth ( ) + OVERSCROLL_DISTANCE ; mTrackingEdge = EDGE_LEFT ; } else if ( ( mEdgeFlag & EDGE_RIGHT ) != 0 ) { left = - childWidth - mShadowRight . getIntrinsicWidth ( ) - OVERSCROLL_DISTANCE ; mTrackingEdge = EDGE_RIGHT ; } else if ( ( mEdgeFlag & EDGE_BOTTOM ) != 0 ) { top = - childHeight - mShadowBottom . getIntrinsicHeight ( ) - OVERSCROLL_DISTANCE ; mTrackingEdge = EDGE_BOTTOM ; } mDragHelper . smoothSlideViewTo ( mContentView , left , top ) ; invalidate ( ) ;
public class Utils { /** * Returns a list with a copy of the data from the iterable . */ public static < T > List < T > toList ( Iterable < T > iter ) { } }
List < T > buf = new ArrayList < > ( ) ; for ( T v : iter ) { buf . add ( v ) ; } return buf ;
public class SocketAddressResolver { /** * Resolves a { @ link ConnectionPoint } to a { @ link java . net . SocketAddress } . * @ param inetSocketAddress must not be { @ literal null } * @ param dnsResolver must not be { @ literal null } * @ return the resolved { @ link SocketAddress } */ public static SocketAddress resolve ( InetSocketAddress inetSocketAddress , DnsResolver dnsResolver ) { } }
try { InetAddress inetAddress = dnsResolver . resolve ( inetSocketAddress . getHostString ( ) ) [ 0 ] ; return new InetSocketAddress ( inetAddress , inetSocketAddress . getPort ( ) ) ; } catch ( UnknownHostException e ) { return new InetSocketAddress ( inetSocketAddress . getHostString ( ) , inetSocketAddress . getPort ( ) ) ; }
public class JsJmsMessageImpl { /** * Return a Set of just the non - smoke - and - mirrors property names * @ return A set containing the names of all the non - smoke - and - mirrors properties */ private final Set < String > getNonSmokeAndMirrorsPropertyNameSet ( ) { } }
/* Get the names of all the properties in the JMS Property Maps */ /* We need a copy so that we can add extra items , and so can the caller */ Set < String > names = new HashSet < String > ( ) ; // Add the names for the two flavours of properties , without creating lists // and maps unnecessarily . if ( mayHaveJmsUserProperties ( ) ) { names . addAll ( getJmsUserPropertyMap ( ) . keySet ( ) ) ; } if ( mayHaveMappedJmsSystemProperties ( ) ) { names . addAll ( getJmsSystemPropertyMap ( ) . keySet ( ) ) ; } // The MQMD properties may be in the JmsSystemPropertyMap AND the MQMSetPropertiesMap // however , the Set will cater for this as it doesn ' t allow duplicates . if ( hasMQMDPropertiesSet ( ) ) { names . addAll ( getMQMDSetPropertiesMap ( ) . keySet ( ) ) ; } return names ;
public class InjectionHelper { /** * Sets field on object with specified value . * @ param instance to set field on * @ param field to set * @ param value to be set */ private static void setField ( final Object instance , final Field field , final Object value ) { } }
final boolean accessability = field . isAccessible ( ) ; try { field . setAccessible ( true ) ; field . set ( instance , value ) ; } catch ( Exception e ) { InjectionException . rethrow ( e ) ; } finally { field . setAccessible ( accessability ) ; }
public class ListPipelinesResult { /** * The list of pipelines . * @ param pipelines * The list of pipelines . */ public void setPipelines ( java . util . Collection < PipelineSummary > pipelines ) { } }
if ( pipelines == null ) { this . pipelines = null ; return ; } this . pipelines = new java . util . ArrayList < PipelineSummary > ( pipelines ) ;
public class FlowEventService { /** * Stores a batch of events * @ param events * @ throws IOException */ public void addEvents ( List < FlowEvent > events ) throws IOException { } }
List < Put > puts = new ArrayList < Put > ( events . size ( ) ) ; for ( FlowEvent e : events ) { puts . add ( createPutForEvent ( e ) ) ; } Table eventTable = null ; try { eventTable = hbaseConnection . getTable ( TableName . valueOf ( Constants . FLOW_EVENT_TABLE ) ) ; eventTable . put ( puts ) ; } finally { if ( eventTable != null ) { eventTable . close ( ) ; } }
public class ServerRfSessionImpl { /** * / * ( non - Javadoc ) * @ see org . jdiameter . common . impl . app . AppSessionImpl # onTimer ( java . lang . String ) */ @ Override public void onTimer ( String timerName ) { } }
if ( timerName . equals ( IDLE_SESSION_TIMER_NAME ) ) { checkIdleAppSession ( ) ; } else if ( timerName . equals ( TIMER_NAME_TS ) ) { if ( context != null ) { try { context . sessionTimeoutElapses ( ServerRfSessionImpl . this ) ; } catch ( InternalException e ) { logger . debug ( "Failure on processing expired Ts" , e ) ; } } setState ( IDLE ) ; } else { logger . warn ( "Received an unknown timer '{}' for Session-ID '{}'" , timerName , getSessionId ( ) ) ; }
public class DateTimesHelper { /** * Converts a { @ code DateTime } object to an API date time preserving the * time zone . */ public T toDateTime ( DateTime dateTime ) { } }
try { D dateObj = dateClass . newInstance ( ) ; PropertyUtils . setProperty ( dateObj , "year" , dateTime . getYear ( ) ) ; PropertyUtils . setProperty ( dateObj , "month" , dateTime . getMonthOfYear ( ) ) ; PropertyUtils . setProperty ( dateObj , "day" , dateTime . getDayOfMonth ( ) ) ; T dateTimeObj = dateTimeClass . newInstance ( ) ; PropertyUtils . setProperty ( dateTimeObj , "date" , dateObj ) ; PropertyUtils . setProperty ( dateTimeObj , "hour" , dateTime . getHourOfDay ( ) ) ; PropertyUtils . setProperty ( dateTimeObj , "minute" , dateTime . getMinuteOfHour ( ) ) ; PropertyUtils . setProperty ( dateTimeObj , "second" , dateTime . getSecondOfMinute ( ) ) ; // Starting in v201811 , timeZoneID was renamed to timeZoneId if ( PropertyUtils . isWriteable ( dateTimeObj , "timeZoneID" ) ) { PropertyUtils . setProperty ( dateTimeObj , "timeZoneID" , dateTime . getZone ( ) . toTimeZone ( ) . getID ( ) ) ; } else { PropertyUtils . setProperty ( dateTimeObj , "timeZoneId" , dateTime . getZone ( ) . toTimeZone ( ) . getID ( ) ) ; } return dateTimeObj ; } catch ( InstantiationException e ) { throw new IllegalStateException ( "Could not instantiate class." , e ) ; } catch ( IllegalAccessException e ) { throw new IllegalStateException ( "Could not instantiate class." , e ) ; } catch ( InvocationTargetException e ) { throw new IllegalStateException ( "Could not set field." , e ) ; } catch ( NoSuchMethodException e ) { throw new IllegalStateException ( "Could not set field." , e ) ; }
public class FSInputChecker { /** * A utility function that tries to read up to < code > len < / code > bytes from * < code > stm < / code > * @ param stm an input stream * @ param buf destiniation buffer * @ param offset offset at which to store data * @ param len number of bytes to read * @ return actual number of bytes read * @ throws IOException if there is any IO error */ protected static int readFully ( InputStream stm , byte [ ] buf , int offset , int len ) throws IOException { } }
int n = 0 ; for ( ; ; ) { int nread = stm . read ( buf , offset + n , len - n ) ; if ( nread <= 0 ) return ( n == 0 ) ? nread : n ; n += nread ; if ( n >= len ) return n ; }
public class ThrottledApiHandler { /** * Get a listing of all masteries * This method does not count towards the rate limit and is not affected by the throttle * @ param data Additional information to retrieve * @ param version Data dragon version for returned data * @ param locale Locale code for returned data * @ return The masteries * @ see < a href = https : / / developer . riotgames . com / api / methods # ! / 649/2173 > Official API documentation < / a > */ public Future < MasteryList > getMasteries ( MasteryData data , String version , String locale ) { } }
return new DummyFuture < > ( handler . getMasteries ( data , version , locale ) ) ;
public class ServerMessageBlock2Request { /** * { @ inheritDoc } * @ see jcifs . internal . CommonServerMessageBlockRequest # allowChain ( jcifs . internal . CommonServerMessageBlockRequest ) */ @ Override public boolean allowChain ( CommonServerMessageBlockRequest next ) { } }
return getConfig ( ) . isAllowCompound ( getClass ( ) . getSimpleName ( ) ) && getConfig ( ) . isAllowCompound ( next . getClass ( ) . getSimpleName ( ) ) ;
public class ThymeleafEngineConfigBuilder { /** * Sets a new set of dialects for this template engine , referenced by the * prefixes they will be using . * This operation can only be executed before processing templates for the * first time . Once a template is processed , the template engine is * considered to be < i > initialized < / i > , and from then on any attempt to * change its configuration will result in an exception . * @ param dialects * the new map of { @ link IDialect } objects to be used , referenced * by their prefixes . * @ return this for fluent use */ public ThymeleafEngineConfigBuilder < P > setDialectsByPrefix ( final Map < String , IDialect > dialects ) { } }
dialectsByPrefix ( ) . clear ( ) ; dialectsByPrefix ( ) . putAll ( dialects ) ; return this ;
public class Properties { /** * Remove the last part of a property path . * @ param propertyPath * Example : foo . bar . key * @ return Example : foo . bar */ @ SuppressWarnings ( "unused" ) private String removeLastToken ( String propertyPath ) { } }
String [ ] propertyKeyArray = propertyPath . split ( "\\." ) ; StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < propertyKeyArray . length - 2 ; i ++ ) { sb . append ( propertyKeyArray [ i ] ) ; sb . append ( '.' ) ; } sb . append ( propertyKeyArray [ propertyKeyArray . length - 2 ] ) ; return sb . toString ( ) ;
public class AccountsInner { /** * Updates the specified Data Lake Analytics account to include the additional Data Lake Store account . * @ param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account . * @ param accountName The name of the Data Lake Analytics account to which to add the Data Lake Store account . * @ param dataLakeStoreAccountName The name of the Data Lake Store account to add . * @ param parameters The details of the Data Lake Store account . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudException thrown if the request is rejected by server * @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void addDataLakeStoreAccount ( String resourceGroupName , String accountName , String dataLakeStoreAccountName , AddDataLakeStoreParameters parameters ) { } }
addDataLakeStoreAccountWithServiceResponseAsync ( resourceGroupName , accountName , dataLakeStoreAccountName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class DelayedGitServiceInitializer { /** * Releases any used resources and waiting threads . * @ throws IOException */ @ Override public void close ( ) throws IOException { } }
if ( git != null ) { IOUtils . closeQuietly ( git ) ; git = null ; } latch . countDown ( ) ; try { latch . notifyAll ( ) ; } catch ( Exception e ) { logger . trace ( "Failed to notifyAll" ) ; } try { locker . notifyAll ( ) ; } catch ( Exception e ) { logger . trace ( "Failed to notifyAll" ) ; }
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link Purchase } { @ code > } } */ @ XmlElementDecl ( namespace = "http://schema.intuit.com/finance/v3" , name = "Purchase" , substitutionHeadNamespace = "http://schema.intuit.com/finance/v3" , substitutionHeadName = "IntuitObject" ) public JAXBElement < Purchase > createPurchase ( Purchase value ) { } }
return new JAXBElement < Purchase > ( _Purchase_QNAME , Purchase . class , null , value ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getSFName ( ) { } }
if ( sfNameEEnum == null ) { sfNameEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 532 ) ; } return sfNameEEnum ;
public class PTSaxton2006 { /** * Equation 5 for calculating Saturated moisture ( 0 kPa ) , normal density , % v * @ param slsnd Sand weight percentage by layer ( [ 0,100 ] % ) * @ param slcly Clay weight percentage by layer ( [ 0,100 ] % ) * @ param omPct Organic matter weight percentage by layer ( [ 0,100 ] % ) , ( = * SLOC * 1.72) */ public static String calcSaturatedMoisture ( String slsnd , String slcly , String omPct ) { } }
String mt33 = calcMoisture33Kpa ( slsnd , slcly , omPct ) ; String mtSAT33 = calcMoistureSAT33Kpa ( slsnd , slcly , omPct ) ; String ret = sum ( mt33 , mtSAT33 , product ( slsnd , "-0.097" ) , "4.3" ) ; LOG . debug ( "Calculate result for Saturated moisture (0 kPa), normal density, %v is {}" , ret ) ; return ret ;
public class EventLogQueue { /** * On delete . * @ param log * the log */ private void onDelete ( EventLog log ) { } }
if ( deleteEvents == null ) { deleteEvents = new ConcurrentHashMap < Object , EventLog > ( ) ; } deleteEvents . put ( log . getEntityId ( ) , log ) ;
public class ClassLoaderUtils { /** * Gets an InputStream to a resource of a specified name . First , the * caller ' s classloader is used to load the resource and if it fails the * thread ' s context classloader is used to load the resource . */ public static InputStream getResourceAsStream ( String name ) { } }
// try with caller classloader ClassLoader loader = getClassLoaderContextAt ( 3 ) ; InputStream in = ( loader == null ) ? null : loader . getResourceAsStream ( name ) ; if ( in == null ) { // try with context classloader if set & different ClassLoader contextLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( contextLoader != null && contextLoader != loader ) { in = contextLoader . getResourceAsStream ( name ) ; } } return in ;
public class AtmosphereSocket { /** * { @ inheritDoc } */ @ Override protected void addFunction ( final long timeout , final TimeUnit tu ) { } }
functions . add ( new FunctionWrapper ( "" , new Function < TransportNotSupported > ( ) { @ Override public void on ( TransportNotSupported transportNotSupported ) { request . transport ( ) . remove ( 0 ) ; if ( request . transport ( ) . size ( ) > 0 ) { try { if ( request . queryString ( ) . get ( "X-Atmosphere-Transport" ) != null ) { Request . TRANSPORT rt = request . transport ( ) . get ( 0 ) ; String t = rt == Request . TRANSPORT . LONG_POLLING ? "long-polling" : rt . name ( ) ; request . queryString ( ) . put ( "X-Atmosphere-Transport" , Arrays . asList ( new String [ ] { t } ) ) ; } open ( request , timeout , tu ) ; } catch ( IOException e ) { logger . error ( "" , e ) ; } } else { throw new Error ( "No suitable transport supported by the server" ) ; } } } ) ) ;
public class ProxyCertificateUtil { /** * Determines if a specified certificate type indicates a GSI - 2 proxy * certificate . * @ param certType the certificate type to check . * @ return true if certType is a GSI - 2 proxy , false otherwise . */ public static boolean isGsi2Proxy ( GSIConstants . CertificateType certType ) { } }
return certType == GSIConstants . CertificateType . GSI_2_PROXY || certType == GSIConstants . CertificateType . GSI_2_LIMITED_PROXY ;
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertMPSRGLengthToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class CollUtil { /** * 加入全部 * @ param < T > 集合元素类型 * @ param collection 被加入的集合 { @ link Collection } * @ param values 要加入的内容数组 * @ return 原集合 * @ since 3.0.8 */ public static < T > Collection < T > addAll ( Collection < T > collection , T [ ] values ) { } }
if ( null != collection && null != values ) { for ( T value : values ) { collection . add ( value ) ; } } return collection ;
public class Quaterniond { /** * / * ( non - Javadoc ) * @ see org . joml . Quaterniondc # slerp ( org . joml . Quaterniondc , double , org . joml . Quaterniond ) */ public Quaterniond slerp ( Quaterniondc target , double alpha , Quaterniond dest ) { } }
double cosom = x * target . x ( ) + y * target . y ( ) + z * target . z ( ) + w * target . w ( ) ; double absCosom = Math . abs ( cosom ) ; double scale0 , scale1 ; if ( 1.0 - absCosom > 1E-6 ) { double sinSqr = 1.0 - absCosom * absCosom ; double sinom = 1.0 / Math . sqrt ( sinSqr ) ; double omega = Math . atan2 ( sinSqr * sinom , absCosom ) ; scale0 = Math . sin ( ( 1.0 - alpha ) * omega ) * sinom ; scale1 = Math . sin ( alpha * omega ) * sinom ; } else { scale0 = 1.0 - alpha ; scale1 = alpha ; } scale1 = cosom >= 0.0 ? scale1 : - scale1 ; dest . x = scale0 * x + scale1 * target . x ( ) ; dest . y = scale0 * y + scale1 * target . y ( ) ; dest . z = scale0 * z + scale1 * target . z ( ) ; dest . w = scale0 * w + scale1 * target . w ( ) ; return dest ;
public class DefaultOptionParser { /** * Handle any command line token . * @ param token the command line token to handle * @ throws OptionParserException if option parsing fails */ private void handleToken ( String token ) throws OptionParserException { } }
currentToken = token ; if ( ! "--" . equals ( token ) ) { if ( currentOption != null && currentOption . acceptsValue ( ) && ! currentOption . isWithEqualSign ( ) && isArgument ( token ) ) { String t = OptionUtils . stripLeadingAndTrailingQuotes ( token ) ; currentOption . addValue ( t ) ; } else if ( token . startsWith ( "--" ) ) { String t = OptionUtils . stripLeadingHyphens ( token ) ; handleLongOption ( t ) ; } else if ( token . startsWith ( "-" ) && token . length ( ) > 1 ) { String t = OptionUtils . stripLeadingHyphens ( token ) ; handleShortAndLongOption ( t ) ; } else { handleUnknownToken ( token ) ; } } if ( currentOption != null && ! currentOption . acceptsValue ( ) ) { currentOption = null ; }
public class CachedScheduledThreadPool { /** * After initialDelay executes commands with period delay or command throws exception . * @ param initialDelay * @ param period * @ param unit * @ param commands * @ return * @ see java . util . concurrent . ScheduledThreadPoolExecutor # scheduleAtFixedDelay ( java . lang . Runnable , long , long , java . util . concurrent . TimeUnit ) */ public ScheduledFuture < ? > iterateAtFixedRate ( long initialDelay , long period , TimeUnit unit , Runnable ... commands ) { } }
return iterateAtFixedRate ( initialDelay , period , unit , new ArrayIterator < > ( commands ) ) ;
public class AuditData { /** * < pre > * Detailed information about CreateVersion call . * < / pre > * < code > . google . appengine . v1 . CreateVersionMethod create _ version = 2 ; < / code > */ public com . google . appengine . v1 . CreateVersionMethodOrBuilder getCreateVersionOrBuilder ( ) { } }
if ( methodCase_ == 2 ) { return ( com . google . appengine . v1 . CreateVersionMethod ) method_ ; } return com . google . appengine . v1 . CreateVersionMethod . getDefaultInstance ( ) ;
public class QueryableStateClient { /** * Returns a future holding the request result . * @ param jobId JobID of the job the queryable state belongs to . * @ param queryableStateName Name under which the state is queryable . * @ param key The key we are interested in . * @ param keyTypeInfoThe { @ link TypeInformation } of the key . * @ param stateDescriptorThe { @ link StateDescriptor } of the state we want to query . * @ return Future holding the immutable { @ link State } object containing the result . */ @ PublicEvolving public < K , S extends State , V > CompletableFuture < S > getKvState ( final JobID jobId , final String queryableStateName , final K key , final TypeInformation < K > keyTypeInfo , final StateDescriptor < S , V > stateDescriptor ) { } }
return getKvState ( jobId , queryableStateName , key , VoidNamespace . INSTANCE , keyTypeInfo , VoidNamespaceTypeInfo . INSTANCE , stateDescriptor ) ;
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getEAG ( ) { } }
if ( eagEClass == null ) { eagEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 233 ) ; } return eagEClass ;
public class CloudTasksClient { /** * Gets the access control policy for a [ Queue ] [ google . cloud . tasks . v2 . Queue ] . Returns an empty * policy if the resource exists and does not have a policy set . * < p > Authorization requires the following [ Google IAM ] ( https : / / cloud . google . com / iam ) permission * on the specified resource parent : * < p > & # 42 ; ` cloudtasks . queues . getIamPolicy ` * < p > Sample code : * < pre > < code > * try ( CloudTasksClient cloudTasksClient = CloudTasksClient . create ( ) ) { * QueueName resource = QueueName . of ( " [ PROJECT ] " , " [ LOCATION ] " , " [ QUEUE ] " ) ; * Policy response = cloudTasksClient . getIamPolicy ( resource ) ; * < / code > < / pre > * @ param resource REQUIRED : The resource for which the policy is being requested . ` resource ` is * usually specified as a path . For example , a Project resource is specified as * ` projects / { project } ` . * @ throws com . google . api . gax . rpc . ApiException if the remote call fails */ public final Policy getIamPolicy ( QueueName resource ) { } }
GetIamPolicyRequest request = GetIamPolicyRequest . newBuilder ( ) . setResource ( resource == null ? null : resource . toString ( ) ) . build ( ) ; return getIamPolicy ( request ) ;
public class AmazonAppStreamClient { /** * Deletes the specified Directory Config object from AppStream 2.0 . This object includes the information required * to join streaming instances to an Active Directory domain . * @ param deleteDirectoryConfigRequest * @ return Result of the DeleteDirectoryConfig operation returned by the service . * @ throws ResourceInUseException * The specified resource is in use . * @ throws ResourceNotFoundException * The specified resource was not found . * @ sample AmazonAppStream . DeleteDirectoryConfig * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / appstream - 2016-12-01 / DeleteDirectoryConfig " * target = " _ top " > AWS API Documentation < / a > */ @ Override public DeleteDirectoryConfigResult deleteDirectoryConfig ( DeleteDirectoryConfigRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeDeleteDirectoryConfig ( request ) ;
public class ImplConvertRaster { /** * A faster convert that works directly with a specific raster */ public static void bufferedToGray ( DataBufferInt buffer , WritableRaster src , GrayU8 dst ) { } }
int [ ] srcData = buffer . getData ( ) ; byte [ ] data = dst . data ; int srcStride = stride ( src ) ; int srcOffset = getOffset ( src ) ; // CONCURRENT _ BELOW BoofConcurrency . loopFor ( 0 , dst . height , y - > { for ( int y = 0 ; y < dst . height ; y ++ ) { int indexSrc = srcOffset + y * srcStride ; int indexDst = dst . startIndex + y * dst . stride ; for ( int x = 0 ; x < dst . width ; x ++ ) { int rgb = srcData [ indexSrc ++ ] ; int r = ( rgb >>> 16 ) & 0xFF ; int g = ( rgb >>> 8 ) & 0xFF ; int b = rgb & 0xFF ; int ave = ( r + g + b ) / 3 ; data [ indexDst ++ ] = ( byte ) ave ; } } // CONCURRENT _ ABOVE } ) ;
public class Matcher { /** * Returns the start index of the subsequence captured by the given * named - capturing group during the previous match operation . * @ param name The name of a named capturing group in this matcher ' s pattern * @ return The index of the first character captured by the group , * or < tt > - 1 < / tt > if the match was successful but the group * itself did not match anything */ @ Override public int start ( String name ) { } }
Integer id = re . groupId ( name ) ; if ( id == null ) throw new IllegalArgumentException ( "<" + name + "> isn't defined" ) ; return start ( id ) ;
public class DocumentUrl { /** * Get Resource Url for TransformDocumentContent * @ param crop Crops the image based on the specified coordinates . The reference point for positive coordinates is the top - left corner of the image , and the reference point for negative coordinates is the bottom - right corner of the image . Usage : Example : removes 10 pixels from all edges of the image . leaves the image uncropped . * @ param documentId Unique identifier for a document , used by content and document calls . Document IDs are associated with document types , document type lists , sites , and tenants . * @ param documentListName Name of content documentListName to delete * @ param height Specifies an exact height dimension for the image , in pixels . * @ param max Specifies a pixel limitation for the largest side of an image . * @ param maxHeight Specifies a pixel limitation for the height of the image , preserving the aspect ratio if the image needs resizing . * @ param maxWidth Specifies a pixel limitation for the width of the image , preserving the aspect ratio if the image needs resizing . * @ param quality Adjusts the image compression . Accepts values from 0-100 , where 100 = highest quality , least compression . * @ param width Specifies an exact width dimension for the image , in pixels . * @ return String Resource Url */ public static MozuUrl transformDocumentContentUrl ( String crop , String documentId , String documentListName , Integer height , Integer max , Integer maxHeight , Integer maxWidth , Integer quality , Integer width ) { } }
UrlFormatter formatter = new UrlFormatter ( "/api/content/documentlists/{documentListName}/documents/{documentId}/transform?width={width}&height={height}&maxWidth={maxWidth}&maxHeight={maxHeight}&crop={crop}&quality={quality}" ) ; formatter . formatUrl ( "crop" , crop ) ; formatter . formatUrl ( "documentId" , documentId ) ; formatter . formatUrl ( "documentListName" , documentListName ) ; formatter . formatUrl ( "height" , height ) ; formatter . formatUrl ( "max" , max ) ; formatter . formatUrl ( "maxHeight" , maxHeight ) ; formatter . formatUrl ( "maxWidth" , maxWidth ) ; formatter . formatUrl ( "quality" , quality ) ; formatter . formatUrl ( "width" , width ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ;
public class KunderaCriteriaBuilder { /** * ( non - Javadoc ) * @ see * javax . persistence . criteria . CriteriaBuilder # max ( javax . persistence . criteria * . Expression ) */ @ Override public < N extends Number > Expression < N > max ( Expression < N > arg0 ) { } }
// TODO Auto - generated method stub return null ;
public class OfferService { /** * Remove blocks from blockReceived queues */ void removeReceivedBlocks ( Block [ ] removeList ) { } }
long start = AvatarDataNode . now ( ) ; synchronized ( receivedAndDeletedBlockList ) { ReceivedBlockInfo block = new ReceivedBlockInfo ( ) ; block . setDelHints ( ReceivedBlockInfo . WILDCARD_HINT ) ; for ( Block bi : removeList ) { block . set ( bi . getBlockId ( ) , bi . getNumBytes ( ) , bi . getGenerationStamp ( ) ) ; while ( receivedAndDeletedBlockList . remove ( block ) ) { LOG . info ( "Block deletion command deleted from receivedDeletedBlockList " + bi ) ; } } } long stop = AvatarDataNode . now ( ) ; LOG . info ( "Pruning blocks from the received list took " + ( stop - start ) + "ms for: " + removeList . length + "blocks, queue length: " + receivedAndDeletedBlockList . size ( ) ) ;
public class ByteArrayMethods { /** * Optimized byte array equality check for byte arrays . * @ return true if the arrays are equal , false otherwise */ public static boolean arrayEquals ( Object leftBase , long leftOffset , Object rightBase , long rightOffset , final long length ) { } }
int i = 0 ; // check if stars align and we can get both offsets to be aligned if ( ( leftOffset % 8 ) == ( rightOffset % 8 ) ) { while ( ( leftOffset + i ) % 8 != 0 && i < length ) { if ( Platform . getByte ( leftBase , leftOffset + i ) != Platform . getByte ( rightBase , rightOffset + i ) ) { return false ; } i += 1 ; } } // for architectures that support unaligned accesses , chew it up 8 bytes at a time if ( unaligned || ( ( ( leftOffset + i ) % 8 == 0 ) && ( ( rightOffset + i ) % 8 == 0 ) ) ) { while ( i <= length - 8 ) { if ( Platform . getLong ( leftBase , leftOffset + i ) != Platform . getLong ( rightBase , rightOffset + i ) ) { return false ; } i += 8 ; } } // this will finish off the unaligned comparisons , or do the entire aligned // comparison whichever is needed . while ( i < length ) { if ( Platform . getByte ( leftBase , leftOffset + i ) != Platform . getByte ( rightBase , rightOffset + i ) ) { return false ; } i += 1 ; } return true ;
public class QuoteUtil { /** * Append into buf the provided string , adding quotes if needed . * Quoting is determined if any of the characters in the < code > delim < / code > are found in the input < code > str < / code > . * @ param buf the buffer to append to * @ param str the string to possibly quote * @ param delim the delimiter characters that will trigger automatic quoting */ public static void quoteIfNeeded ( StringBuilder buf , String str , String delim ) { } }
if ( str == null ) { return ; } // check for delimiters in input string int len = str . length ( ) ; if ( len == 0 ) { return ; } int ch ; for ( int i = 0 ; i < len ; i ++ ) { ch = str . codePointAt ( i ) ; if ( delim . indexOf ( ch ) >= 0 ) { // found a delimiter codepoint . we need to quote it . quote ( buf , str ) ; return ; } } // no special delimiters used , no quote needed . buf . append ( str ) ;
public class BoxRequestEvent { /** * Sets the maximum number of events to return in the list of events . * @ param limit max number of events to request . * @ return the get events request */ public R setLimit ( final int limit ) { } }
mQueryMap . put ( FIELD_LIMIT , Integer . toString ( limit ) ) ; return ( R ) this ;
public class TransformingInterceptorsServer { /** * New { @ link ConnectionHandler } that echoes all data received . * @ return Connection handler . */ private static ConnectionHandler < Integer , Integer > numberIncrementingHandler ( ) { } }
return conn -> conn . writeAndFlushOnEach ( conn . getInput ( ) . map ( anInt -> ++ anInt ) ) ;
public class AtomContainerAtomPermutor { /** * Generate the atom container with this permutation of the atoms . * @ param permutation the permutation to use * @ return the */ @ Override public IAtomContainer containerFromPermutation ( int [ ] permutation ) { } }
try { IAtomContainer permutedContainer = ( IAtomContainer ) atomContainer . clone ( ) ; IAtom [ ] atoms = new IAtom [ atomContainer . getAtomCount ( ) ] ; for ( int i = 0 ; i < atomContainer . getAtomCount ( ) ; i ++ ) { atoms [ permutation [ i ] ] = permutedContainer . getAtom ( i ) ; } permutedContainer . setAtoms ( atoms ) ; return permutedContainer ; } catch ( CloneNotSupportedException c ) { return null ; }
public class WSRdbXaResourceImpl { /** * Start work on behalf of a transaction branch specified in xid If TMJOIN is specified , the start is for joining a transaction * previously seen by the resource manager . If TMRESUME is specified , the start is to resume a suspended transaction specified * in the parameter xid . If neither TMJOIN nor TMRESUME is specified and the transaction specified by xid has previously * been seen by the resource manager , the resource manager throws the XAException exception with XAER _ DUPID error code . * @ param Xid xid - A global transaction identifier to be associated with the resource * @ param int flags - One of TMNOFLAGS , TMJOIN , or TMRESUME * @ exception XAException - An error has occurred . Possible exceptions are XA _ RB * , XAER _ RMERR , XAER _ RMFAIL , * XAER _ DUPID , XAER _ OUTSIDE , XAER _ NOTA , XAER _ INVAL , or XAER _ PROTO . */ public void start ( Xid xid , int flags ) throws XAException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "start" , new Object [ ] { ivManagedConnection , AdapterUtil . toString ( xid ) , AdapterUtil . getXAResourceStartFlagString ( flags ) } ) ; // if the MC marked Stale , it means the user requested a purge pool with an immediate option // so don ' t allow any work to continue . In this case , we throw XAER _ RMFAIL xa error // which indicates that the resource manager is not available if ( ivManagedConnection . _mcStale ) { Tr . error ( tc , "INVALID_CONNECTION" ) ; XAException x = new XAException ( XAException . XAER_RMFAIL ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "start" , new Object [ ] { "MC is stale throwing XAER_RMFAIL" , ivManagedConnection } ) ; throw x ; } if ( dsConfig . get ( ) . enableMultithreadedAccessDetection ) ivManagedConnection . detectMultithreadedAccess ( ) ; this . ivXid = xid ; try { // TODO if we add dsConfig . transactionBranchesLooselyCoupled , then for Oracle , do // flags | = 0x10000 ; / / value of oracle . jdbc . xa . OracleXAResource . ORATRANSLOOSE ivXaRes . start ( xid , flags ) ; ivStateManager . setState ( WSStateManager . XA_START ) ; } catch ( TransactionException te ) { // Exception means setState failed because it was invalid to set the state in this case FFDCFilter . processException ( te , "com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.start" , "615" , this ) ; Tr . error ( tc , "INVALID_TX_STATE" , new Object [ ] { "XAResource.start()" , ivManagedConnection . getTransactionStateAsString ( ) } ) ; try { ivXaRes . end ( xid , XAResource . TMNOFLAGS ) ; ivXaRes . rollback ( xid ) ; } catch ( XAException eatXA ) { FFDCFilter . processException ( eatXA , "com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.start" , "624" , this ) ; traceXAException ( eatXA , currClass ) ; // eat this exception because in the next line we will throw one } XAException xae = AdapterUtil . createXAException ( "INVALID_TX_STATE" , new Object [ ] { "XAResource.start" , ivManagedConnection . getTransactionStateAsString ( ) } , XAException . XA_RBPROTO ) ; traceXAException ( xae , currClass ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "start" , "Exception" ) ; throw xae ; } catch ( XAException xae ) { FFDCFilter . processException ( xae , "com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.start" , "639" , this ) ; traceXAException ( xae , currClass ) ; checkXAException ( xae ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "start" , "Exception" ) ; throw xae ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { String cId = null ; try { cId = ivManagedConnection . mcf . getCorrelator ( ivManagedConnection ) ; } catch ( SQLException x ) { // will just log the exception here and ignore it since its in trace Tr . debug ( this , tc , "got an exception trying to get the correlator in rollback, exception is: " , x ) ; } if ( cId != null ) { StringBuffer stbuf = new StringBuffer ( 200 ) ; stbuf . append ( "Correlator: DB2, ID: " ) ; stbuf . append ( cId ) ; if ( xid != null ) { stbuf . append ( "Transaction ID : " ) ; stbuf . append ( xid ) ; } stbuf . append ( " BEGIN" ) ; Tr . debug ( this , tc , stbuf . toString ( ) ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( this , tc , "start" ) ;
public class JWTPayload { /** * Sets the type claim that is used to declare a type for the contents of this JWT Claims Set or { @ code null } for none . * Overriding is only supported for the purpose of calling the super implementation and changing * the return type , but nothing else . */ public JWTPayload setType ( String type ) { } }
this . type = type ; this . put ( PayloadConstants . TYPE , type ) ; return this ;
public class BackboneGeneration { /** * Computes the negative backbone variables for a given formula . * @ param formula the given formula * @ return the negative backbone or { @ code null } if the formula is UNSAT */ public static Backbone computeNegative ( final Formula formula ) { } }
return compute ( formula , formula . variables ( ) , BackboneType . ONLY_NEGATIVE ) ;
public class BinaryHeapPriorityQueue { /** * iterative heapify up : move item o at index up until correctly placed */ private void heapifyUp ( Entry < E > entry ) { } }
while ( true ) { if ( entry . index == 0 ) { break ; } Entry < E > parentEntry = parent ( entry ) ; if ( compare ( entry , parentEntry ) <= 0 ) { break ; } swap ( entry , parentEntry ) ; }
public class AmazonNeptuneClient { /** * Copies the specified DB cluster parameter group . * @ param copyDBClusterParameterGroupRequest * @ return Result of the CopyDBClusterParameterGroup operation returned by the service . * @ throws DBParameterGroupNotFoundException * < i > DBParameterGroupName < / i > does not refer to an existing DB parameter group . * @ throws DBParameterGroupQuotaExceededException * Request would result in user exceeding the allowed number of DB parameter groups . * @ throws DBParameterGroupAlreadyExistsException * A DB parameter group with the same name exists . * @ sample AmazonNeptune . CopyDBClusterParameterGroup * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / neptune - 2014-10-31 / CopyDBClusterParameterGroup " * target = " _ top " > AWS API Documentation < / a > */ @ Override public DBClusterParameterGroup copyDBClusterParameterGroup ( CopyDBClusterParameterGroupRequest request ) { } }
request = beforeClientExecution ( request ) ; return executeCopyDBClusterParameterGroup ( request ) ;
public class ServerSetup { /** * Creates default properties for a JavaMail session . * Concrete server implementations can add protocol specific settings . * For details see * < ul > * < li > http : / / docs . oracle . com / javaee / 6 / api / javax / mail / package - summary . html for some general settings < / li > * < li > https : / / javamail . java . net / nonav / docs / api / com / sun / mail / smtp / package - summary . html for valid SMTP properties . < / li > * < li > https : / / javamail . java . net / nonav / docs / api / com / sun / mail / imap / package - summary . html for valid IMAP properties < / li > * < li > https : / / javamail . java . net / nonav / docs / api / com / sun / mail / pop3 / package - summary . html for valid POP3 properties . < / li > * < / ul * @ param properties additional and optional properties which overwrite automatically added properties . Can be null . * @ param debug sets JavaMail debug properties * @ return default properties . */ public Properties configureJavaMailSessionProperties ( Properties properties , boolean debug ) { } }
Properties props = new Properties ( ) ; if ( debug ) { props . setProperty ( "mail.debug" , "true" ) ; // System . setProperty ( " mail . socket . debug " , " true " ) ; } // Set local host address ( makes tests much faster . If this is not set java mail always looks for the address ) props . setProperty ( MAIL_DOT + getProtocol ( ) + ".localaddress" , String . valueOf ( ServerSetup . getLocalHostAddress ( ) ) ) ; props . setProperty ( MAIL_DOT + getProtocol ( ) + ".port" , String . valueOf ( getPort ( ) ) ) ; props . setProperty ( MAIL_DOT + getProtocol ( ) + ".host" , String . valueOf ( getBindAddress ( ) ) ) ; if ( isSecure ( ) ) { props . put ( MAIL_DOT + getProtocol ( ) + ".starttls.enable" , Boolean . TRUE ) ; props . setProperty ( MAIL_DOT + getProtocol ( ) + ".socketFactory.class" , DummySSLSocketFactory . class . getName ( ) ) ; props . setProperty ( MAIL_DOT + getProtocol ( ) + ".socketFactory.fallback" , "false" ) ; } // Timeouts props . setProperty ( MAIL_DOT + getProtocol ( ) + ".connectiontimeout" , Long . toString ( getConnectionTimeout ( ) < 0L ? ServerSetup . CONNECTION_TIMEOUT : getConnectionTimeout ( ) ) ) ; props . setProperty ( MAIL_DOT + getProtocol ( ) + ".timeout" , Long . toString ( getReadTimeout ( ) < 0L ? ServerSetup . READ_TIMEOUT : getReadTimeout ( ) ) ) ; // Note : " mail . " + setup . getProtocol ( ) + " . writetimeout " breaks TLS / SSL Dummy Socket and makes tests run 6x slower ! ! ! // Therefore we do not by default configure writetimeout . if ( getWriteTimeout ( ) >= 0L ) { props . setProperty ( MAIL_DOT + getProtocol ( ) + ".writetimeout" , Long . toString ( getWriteTimeout ( ) ) ) ; } // Protocol specific extensions if ( getProtocol ( ) . startsWith ( PROTOCOL_SMTP ) ) { props . setProperty ( "mail.transport.protocol" , getProtocol ( ) ) ; props . setProperty ( "mail.transport.protocol.rfc822" , getProtocol ( ) ) ; } // Auto configure stores . props . setProperty ( "mail.store.protocol" , getProtocol ( ) ) ; // Merge with optional additional properties if ( null != properties && ! properties . isEmpty ( ) ) { props . putAll ( properties ) ; } return props ;
public class EtcdClient { /** * Setting the value of a key with ttl and optional prevExist ( update key ttl ) * @ param key the key * @ param value the value * @ param ttl the ttl * @ param prevExist exists before */ public void set ( String key , String value , int ttl , Boolean prevExist ) throws EtcdClientException { } }
Preconditions . checkNotNull ( key ) ; Preconditions . checkNotNull ( value ) ; List < BasicNameValuePair > list = Lists . newArrayList ( ) ; list . add ( new BasicNameValuePair ( "value" , value ) ) ; if ( ttl > 0 ) { list . add ( new BasicNameValuePair ( "ttl" , String . valueOf ( ttl ) ) ) ; } if ( prevExist != null ) { list . add ( new BasicNameValuePair ( "prevExist" , String . valueOf ( prevExist ) ) ) ; } put ( key , list , null , new int [ ] { 200 , 201 } ) ;
public class BNFHeadersImpl { /** * Overlay whitespace into the input buffer using the provided starting and * stopping positions . * @ param buffer * @ param start * @ param stop */ private void scribbleWhiteSpace ( WsByteBuffer buffer , int start , int stop ) { } }
if ( buffer . hasArray ( ) ) { // buffer has a backing array so directly update that final byte [ ] data = buffer . array ( ) ; final int offset = buffer . arrayOffset ( ) ; int myStart = start + offset ; int myStop = stop + offset ; for ( int i = myStart ; i < myStop ; i ++ ) { data [ i ] = BNFHeaders . SPACE ; } } else { // overlay whitespace into the buffer byte [ ] localWhitespace = whitespace ; if ( null == localWhitespace ) { localWhitespace = getWhiteSpace ( ) ; } buffer . position ( start ) ; int len = stop - start ; while ( len > 0 ) { if ( localWhitespace . length >= len ) { buffer . put ( localWhitespace , 0 , len ) ; break ; // out of while } int partial = localWhitespace . length ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Scribbling " + partial + " bytes of whitespace" ) ; } buffer . put ( localWhitespace , 0 , partial ) ; len -= partial ; } }
public class Streams { /** * Copy a limited number of bytes from the input stream to the output * stream . * @ param input Stream to read bytes from . * @ param output Stream to write bytes to . * @ param size The size of the buffer to use while copying . * @ param length The maximum number of bytes to copy . * @ return The total number of bytes copied . * @ throws IOException Failed to copy bytes . */ public static long copySome ( final InputStream input , final OutputStream output , final int size , final long length ) throws IOException { } }
return copySome ( input , output , new byte [ size ] , length ) ;
public class NotesApi { /** * Get a Pager of all notes for a single merge request * < pre > < code > GitLab Endpoint : GET / projects / : id / merge _ requests / : merge _ request _ iid / notes < / code > < / pre > * @ param projectIdOrPath the project in the form of an Integer ( ID ) , String ( path ) , or Project instance * @ param mergeRequestIid the merge request IID to get the notes for * @ param sortOrder return merge request notes sorted in the specified sort order , default is DESC * @ param orderBy return merge request notes ordered by CREATED _ AT or UPDATED _ AT , default is CREATED _ AT * @ param itemsPerPage the number of notes per page * @ return the list of notes in the specified range * @ throws GitLabApiException if any exception occurs */ public Pager < Note > getMergeRequestNotes ( Object projectIdOrPath , Integer mergeRequestIid , SortOrder sortOrder , Note . OrderBy orderBy , int itemsPerPage ) throws GitLabApiException { } }
GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "sort" , sortOrder ) . withParam ( "order_by" , orderBy ) . withParam ( PAGE_PARAM , 1 ) . withParam ( PER_PAGE_PARAM , itemsPerPage ) ; return ( new Pager < Note > ( this , Note . class , itemsPerPage , formData . asMap ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "merge_requests" , mergeRequestIid , "notes" ) ) ;
public class BigQueryStorageClient { /** * Creates additional streams for a ReadSession . This API can be used to dynamically adjust the * parallelism of a batch processing task upwards by adding additional workers . * < p > Sample code : * < pre > < code > * try ( BigQueryStorageClient bigQueryStorageClient = BigQueryStorageClient . create ( ) ) { * ReadSession session = ReadSession . newBuilder ( ) . build ( ) ; * int requestedStreams = 0; * BatchCreateReadSessionStreamsResponse response = bigQueryStorageClient . batchCreateReadSessionStreams ( session , requestedStreams ) ; * < / code > < / pre > * @ param session Required . Must be a non - expired session obtained from a call to * CreateReadSession . Only the name field needs to be set . * @ param requestedStreams Required . Number of new streams requested . Must be positive . Number of * added streams may be less than this , see CreateReadSessionRequest for more information . * @ throws com . google . api . gax . rpc . ApiException if the remote call fails */ public final BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams ( ReadSession session , int requestedStreams ) { } }
BatchCreateReadSessionStreamsRequest request = BatchCreateReadSessionStreamsRequest . newBuilder ( ) . setSession ( session ) . setRequestedStreams ( requestedStreams ) . build ( ) ; return batchCreateReadSessionStreams ( request ) ;
public class SymoplibParser { /** * A parser for the symop . lib file provided by CCP4 . Note : this file is not getting re - distributed by BioJava . * It can be downloaded from : * http : / / www . ccp4 . ac . uk / cvs / viewvc . cgi / libccp4 / data / symop . lib ? revision = 1.10 & view = markup * Note : this file is not needed by BioJava . BioJava loads equivalent information from the file spacegroups . xml * @ param symoplibIS * @ return */ public static TreeMap < Integer , SpaceGroup > parseSymopLib ( InputStream symoplibIS ) { } }
TreeMap < Integer , SpaceGroup > map = new TreeMap < Integer , SpaceGroup > ( ) ; name2sgs = new HashMap < String , SpaceGroup > ( ) ; try { BufferedReader br = new BufferedReader ( new InputStreamReader ( symoplibIS ) ) ; String line ; SpaceGroup currentSG = null ; while ( ( line = br . readLine ( ) ) != null ) { if ( ! line . startsWith ( " " ) ) { if ( currentSG != null ) { map . put ( currentSG . getId ( ) , currentSG ) ; name2sgs . put ( currentSG . getShortSymbol ( ) , currentSG ) ; if ( currentSG . getAltShortSymbol ( ) != null ) { // we add also alternative name to map so we can look it up name2sgs . put ( currentSG . getAltShortSymbol ( ) , currentSG ) ; } } int idxFirstSpace = line . indexOf ( ' ' ) ; int idxSecondSpace = line . indexOf ( ' ' , idxFirstSpace + 1 ) ; int idxThirdSpace = line . indexOf ( ' ' , idxSecondSpace + 1 ) ; int id = Integer . parseInt ( line . substring ( 0 , idxFirstSpace ) ) ; int multiplicity = Integer . parseInt ( line . substring ( idxFirstSpace + 1 , idxSecondSpace ) ) ; int primitiveMultiplicity = Integer . parseInt ( line . substring ( idxSecondSpace + 1 , idxThirdSpace ) ) ; Matcher m = namePat . matcher ( line ) ; String shortSymbol = null ; String altShortSymbol = null ; String brav = null ; if ( m . matches ( ) ) { brav = m . group ( 1 ) ; altShortSymbol = m . group ( 2 ) ; // null if there is no match if ( altShortSymbol != null ) altShortSymbol = altShortSymbol . trim ( ) . replaceAll ( "'" , "" ) ; shortSymbol = m . group ( 3 ) ; } currentSG = new SpaceGroup ( id , multiplicity , primitiveMultiplicity , shortSymbol , altShortSymbol , BravaisLattice . getByName ( brav ) ) ; } else { currentSG . addTransformation ( line . trim ( ) ) ; } } br . close ( ) ; // and we add the last SG map . put ( currentSG . getId ( ) , currentSG ) ; name2sgs . put ( currentSG . getShortSymbol ( ) , currentSG ) ; if ( currentSG . getAltShortSymbol ( ) != null ) { // we add also alternative name to map so we can look it up name2sgs . put ( currentSG . getAltShortSymbol ( ) , currentSG ) ; } } catch ( IOException e ) { logger . error ( "Fatal error! Can't read symop.lib file. Error: " + e . getMessage ( ) + ". " ) ; System . exit ( 1 ) ; } for ( SpaceGroup sg : map . values ( ) ) { sg . initializeCellTranslations ( ) ; } return map ;
public class JmxMetricPoller { /** * Try to convert an object into a number . Boolean values will return 1 if * true and 0 if false . If the value is null or an unknown data type null * will be returned . */ private static Number asNumber ( Object value ) { } }
Number num = null ; if ( value == null ) { num = null ; } else if ( value instanceof Number ) { num = ( Number ) value ; } else if ( value instanceof Boolean ) { num = ( ( Boolean ) value ) ? 1 : 0 ; } return num ;
public class RewriteConfigFactory { /** * This factory method will parse a line formed like : * Example : * RewriteCond % { REMOTE _ HOST } ^ host1 . * [ OR ] * @ param line * @ return */ private static Object parse ( String line ) { } }
StringTokenizer tokenizer = new StringTokenizer ( line ) ; if ( tokenizer . hasMoreTokens ( ) ) { String token = tokenizer . nextToken ( ) ; if ( token . equals ( "RewriteCond" ) ) { // RewriteCond TestString CondPattern [ Flags ] RewriteCond condition = new RewriteCond ( ) ; if ( tokenizer . countTokens ( ) < 2 ) { throw UndertowServletLogger . ROOT_LOGGER . invalidRewriteConfiguration ( line ) ; } condition . setTestString ( tokenizer . nextToken ( ) ) ; condition . setCondPattern ( tokenizer . nextToken ( ) ) ; if ( tokenizer . hasMoreTokens ( ) ) { String flags = tokenizer . nextToken ( ) ; if ( flags . startsWith ( "[" ) && flags . endsWith ( "]" ) ) { flags = flags . substring ( 1 , flags . length ( ) - 1 ) ; } StringTokenizer flagsTokenizer = new StringTokenizer ( flags , "," ) ; while ( flagsTokenizer . hasMoreElements ( ) ) { parseCondFlag ( line , condition , flagsTokenizer . nextToken ( ) ) ; } } return condition ; } else if ( token . equals ( "RewriteRule" ) ) { // RewriteRule Pattern Substitution [ Flags ] RewriteRule rule = new RewriteRule ( ) ; if ( tokenizer . countTokens ( ) < 2 ) { throw UndertowServletLogger . ROOT_LOGGER . invalidRewriteConfiguration ( line ) ; } rule . setPatternString ( tokenizer . nextToken ( ) ) ; rule . setSubstitutionString ( tokenizer . nextToken ( ) ) ; if ( tokenizer . hasMoreTokens ( ) ) { String flags = tokenizer . nextToken ( ) ; if ( flags . startsWith ( "[" ) && flags . endsWith ( "]" ) ) { flags = flags . substring ( 1 , flags . length ( ) - 1 ) ; } StringTokenizer flagsTokenizer = new StringTokenizer ( flags , "," ) ; while ( flagsTokenizer . hasMoreElements ( ) ) { parseRuleFlag ( line , rule , flagsTokenizer . nextToken ( ) ) ; } } return rule ; } else if ( token . equals ( "RewriteMap" ) ) { // RewriteMap name rewriteMapClassName whateverOptionalParameterInWhateverFormat if ( tokenizer . countTokens ( ) < 2 ) { throw UndertowServletLogger . ROOT_LOGGER . invalidRewriteConfiguration ( line ) ; } String name = tokenizer . nextToken ( ) ; String rewriteMapClassName = tokenizer . nextToken ( ) ; RewriteMap map = null ; try { map = ( RewriteMap ) ( Class . forName ( rewriteMapClassName ) . newInstance ( ) ) ; } catch ( Exception e ) { throw UndertowServletLogger . ROOT_LOGGER . invalidRewriteMap ( rewriteMapClassName ) ; } if ( tokenizer . hasMoreTokens ( ) ) { map . setParameters ( tokenizer . nextToken ( ) ) ; } Object [ ] result = new Object [ 2 ] ; result [ 0 ] = name ; result [ 1 ] = map ; return result ; } else if ( token . startsWith ( "#" ) ) { // it ' s a comment , ignore it } else { throw UndertowServletLogger . ROOT_LOGGER . invalidRewriteConfiguration ( line ) ; } } return null ;
public class WorkflowServiceImpl { /** * Start a new workflow with StartWorkflowRequest , which allows task to be executed in a domain . * @ param startWorkflowRequest StartWorkflow request for the workflow you want to start . * @ return the id of the workflow instance that can be use for tracking . */ @ Service public String startWorkflow ( StartWorkflowRequest startWorkflowRequest ) { } }
return startWorkflow ( startWorkflowRequest . getName ( ) , startWorkflowRequest . getVersion ( ) , startWorkflowRequest . getCorrelationId ( ) , startWorkflowRequest . getInput ( ) , startWorkflowRequest . getExternalInputPayloadStoragePath ( ) , startWorkflowRequest . getTaskToDomain ( ) , startWorkflowRequest . getWorkflowDef ( ) ) ;
public class StringUtils { /** * returns - 1 if the two strings are within the given threshold of each other , - 1 otherwise */ public static int levenshteinDistance ( CharSequence one , CharSequence another , int threshold ) { } }
int n = one . length ( ) ; int m = another . length ( ) ; // if one string is empty , the edit distance is necessarily the length of the other if ( n == 0 ) { return m <= threshold ? m : - 1 ; } else if ( m == 0 ) { return n <= threshold ? n : - 1 ; } if ( n > m ) { // swap the two strings to consume less memory final CharSequence tmp = one ; one = another ; another = tmp ; n = m ; m = another . length ( ) ; } int p [ ] = new int [ n + 1 ] ; // ' previous ' cost array , horizontally int d [ ] = new int [ n + 1 ] ; // cost array , horizontally int _d [ ] ; // placeholder to assist in swapping p and d // fill in starting table values final int boundary = Math . min ( n , threshold ) + 1 ; for ( int i = 0 ; i < boundary ; i ++ ) { p [ i ] = i ; } // these fills ensure that the value above the rightmost entry of our // stripe will be ignored in following loop iterations Arrays . fill ( p , boundary , p . length , Integer . MAX_VALUE ) ; Arrays . fill ( d , Integer . MAX_VALUE ) ; for ( int j = 1 ; j <= m ; j ++ ) { final char t_j = another . charAt ( j - 1 ) ; d [ 0 ] = j ; // compute stripe indices , constrain to array size final int min = Math . max ( 1 , j - threshold ) ; final int max = ( j > Integer . MAX_VALUE - threshold ) ? n : Math . min ( n , j + threshold ) ; // the stripe may lead off of the table if s and t are of different sizes if ( min > max ) { return - 1 ; } // ignore entry left of leftmost if ( min > 1 ) { d [ min - 1 ] = Integer . MAX_VALUE ; } // iterates through [ min , max ] in s for ( int i = min ; i <= max ; i ++ ) { if ( one . charAt ( i - 1 ) == t_j ) { // diagonally left and up d [ i ] = p [ i - 1 ] ; } else { // 1 + minimum of cell to the left , to the top , diagonally left and up d [ i ] = 1 + Math . min ( Math . min ( d [ i - 1 ] , p [ i ] ) , p [ i - 1 ] ) ; } } // copy current distance counts to ' previous row ' distance counts _d = p ; p = d ; d = _d ; } // if p [ n ] is greater than the threshold , there ' s no guarantee on it being the correct // distance if ( p [ n ] <= threshold ) { return p [ n ] ; } return - 1 ;
public class SpriteManager { /** * When an animated view is determining what entity in its view is under the mouse pointer , it * may require a list of sprites that are " hit " by a particular pixel . The sprites ' bounds are * first checked and sprites with bounds that contain the supplied point are further checked * for a non - transparent at the specified location . * @ param list the list to fill with any intersecting sprites , the sprites with the highest * render order provided first . * @ param x the x ( screen ) coordinate to be checked . * @ param y the y ( screen ) coordinate to be checked . */ public void getHitSprites ( List < Sprite > list , int x , int y ) { } }
for ( int ii = _sprites . size ( ) - 1 ; ii >= 0 ; ii -- ) { Sprite sprite = _sprites . get ( ii ) ; if ( sprite . hitTest ( x , y ) ) { list . add ( sprite ) ; } }
public class SecurityActions { /** * Sets the run as identity * @ param principal the identity */ public static void pushRunAsIdentity ( final RunAsIdentity principal ) { } }
AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { @ Override public Void run ( ) { SecurityContext sc = getSecurityContext ( ) ; if ( sc == null ) throw MESSAGES . noSecurityContext ( ) ; sc . setOutgoingRunAs ( principal ) ; return null ; } } ) ;
public class MarkdownProcessor { /** * Reads all lines from our reader . * Takes care of markdown link references . * @ return A Block containing all lines . * @ throws IOException * If an IO error occurred . */ @ Nonnull private Block _readLines ( @ Nonnull final Reader aReader ) throws IOException { } }
final Block aBlock = new Block ( ) ; final StringBuilder aSB = new StringBuilder ( 80 ) ; int c = aReader . read ( ) ; LinkRef aLastLinkRef = null ; while ( c != - 1 ) { aSB . setLength ( 0 ) ; int nPos = 0 ; boolean bEOL = false ; while ( ! bEOL ) { switch ( c ) { case - 1 : bEOL = true ; break ; case '\n' : c = aReader . read ( ) ; if ( c == '\r' ) c = aReader . read ( ) ; bEOL = true ; break ; case '\r' : c = aReader . read ( ) ; if ( c == '\n' ) c = aReader . read ( ) ; bEOL = true ; break ; case '\t' : { final int nTabPos = nPos + ( 4 - ( nPos & 3 ) ) ; while ( nPos < nTabPos ) { aSB . append ( ' ' ) ; nPos ++ ; } c = aReader . read ( ) ; break ; } default : nPos ++ ; aSB . append ( ( char ) c ) ; c = aReader . read ( ) ; break ; } } final Line aLine = new Line ( ) ; aLine . m_sValue = aSB . toString ( ) ; aLine . init ( ) ; // Check for link definitions boolean bIsLinkRef = false ; String sID = null ; String sLink = null ; String sComment = null ; if ( ! aLine . m_bIsEmpty && aLine . m_nLeading < 4 && aLine . m_sValue . charAt ( aLine . m_nLeading ) == '[' ) { aLine . m_nPos = aLine . m_nLeading + 1 ; // Read ID up to ' ] ' sID = aLine . readUntil ( ']' ) ; // Is ID valid and are there any more characters ? if ( sID != null && aLine . m_nPos + 2 < aLine . m_sValue . length ( ) ) { // Check for ' : ' ( [ . . . ] : . . . ) if ( aLine . m_sValue . charAt ( aLine . m_nPos + 1 ) == ':' ) { aLine . m_nPos += 2 ; aLine . skipSpaces ( ) ; // Check for link syntax if ( aLine . m_sValue . charAt ( aLine . m_nPos ) == '<' ) { aLine . m_nPos ++ ; sLink = aLine . readUntil ( '>' ) ; aLine . m_nPos ++ ; } else sLink = aLine . readUntil ( ' ' , '\n' ) ; // Is link valid ? if ( sLink != null ) { // Any non - whitespace characters following ? if ( aLine . skipSpaces ( ) ) { final char ch = aLine . m_sValue . charAt ( aLine . m_nPos ) ; // Read comment if ( ch == '\"' || ch == '\'' || ch == '(' ) { aLine . m_nPos ++ ; sComment = aLine . readUntil ( ch == '(' ? ')' : ch ) ; // Valid linkRef only if comment is valid if ( sComment != null ) bIsLinkRef = true ; } } else bIsLinkRef = true ; } } } } // To make compiler happy : add ! = null checks if ( bIsLinkRef && sID != null && sLink != null ) { if ( sID . equalsIgnoreCase ( "$profile$" ) ) { m_bUseExtensions = sLink . equalsIgnoreCase ( "extended" ) ; m_aEmitter . setUseExtensions ( m_bUseExtensions ) ; aLastLinkRef = null ; } else { // Store linkRef and skip line final LinkRef aLinkRef = new LinkRef ( sLink , sComment , sComment != null && ( sLink . length ( ) == 1 && sLink . charAt ( 0 ) == '*' ) ) ; m_aEmitter . addLinkRef ( sID , aLinkRef ) ; if ( sComment == null ) aLastLinkRef = aLinkRef ; } } else { sComment = null ; // Check for multi - line linkRef if ( ! aLine . m_bIsEmpty && aLastLinkRef != null ) { aLine . m_nPos = aLine . m_nLeading ; final char ch = aLine . m_sValue . charAt ( aLine . m_nPos ) ; if ( ch == '\"' || ch == '\'' || ch == '(' ) { aLine . m_nPos ++ ; sComment = aLine . readUntil ( ch == '(' ? ')' : ch ) ; } if ( sComment != null ) aLastLinkRef . setTitle ( sComment ) ; aLastLinkRef = null ; } // No multi - line linkRef , store line if ( sComment == null ) { aLine . m_nPos = 0 ; aBlock . appendLine ( aLine ) ; } } } return aBlock ;
public class ByteArrayUtil { /** * Get a < i > int < / i > from the given byte array starting at the given offset * in little endian order . * There is no bounds checking . * @ param array source byte array * @ param offset source offset * @ return the < i > int < / i > */ public static int getIntLE ( final byte [ ] array , final int offset ) { } }
return ( array [ offset ] & 0XFF ) | ( ( array [ offset + 1 ] & 0XFF ) << 8 ) | ( ( array [ offset + 2 ] & 0XFF ) << 16 ) | ( ( array [ offset + 3 ] & 0XFF ) << 24 ) ;
public class CPDefinitionOptionRelPersistenceImpl { /** * Returns a range of all the cp definition option rels where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CPDefinitionOptionRelModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order . * @ param groupId the group ID * @ param start the lower bound of the range of cp definition option rels * @ param end the upper bound of the range of cp definition option rels ( not inclusive ) * @ return the range of matching cp definition option rels */ @ Override public List < CPDefinitionOptionRel > findByGroupId ( long groupId , int start , int end ) { } }
return findByGroupId ( groupId , start , end , null ) ;
public class UtilAbstractAction { /** * Check for action forwarding * We expect the request parameter to be of the form < br / > * forward = name < p > . * @ param request Needed to locate session * @ return String forward to here . null if no forward found . * @ throws Throwable */ private String checkForwardto ( final HttpServletRequest request ) throws Throwable { } }
String reqpar = request . getParameter ( "forwardto" ) ; return reqpar ;
public class CollectionOneToOneMatcher { /** * { @ inheritDoc } */ public boolean matches ( Iterable < ? extends T > target ) { } }
if ( ( target instanceof Collection ) && ( ( Collection < ? > ) target ) . size ( ) != matchers . size ( ) ) { return false ; } Iterator < ? extends ElementMatcher < ? super T > > iterator = matchers . iterator ( ) ; for ( T value : target ) { if ( ! iterator . hasNext ( ) || ! iterator . next ( ) . matches ( value ) ) { return false ; } } return true ;
public class Utils { /** * This must NOT run on any IO worker thread */ public static long sumFutures ( List < Future < Object > > futures ) { } }
long total = 0 ; for ( Future < Object > f : futures ) { try { total += ( Long ) f . get ( ) ; } catch ( Exception ignore ) { System . out . println ( "### sumFutures got exception!" ) ; } } return total ;
public class TvShowsActivity { /** * Method triggered when the iv _ fan _ art widget is clicked . This method shows a toast with the tv * show selected . */ @ OnClick ( R . id . iv_fan_art ) void onFanArtClicked ( ) { } }
Toast . makeText ( this , tvShowSelected . getTitle ( ) , Toast . LENGTH_LONG ) . show ( ) ;
public class UpdateAudienceSegments { /** * Runs the example . * @ param adManagerServices the services factory . * @ param session the session . * @ param audienceSegmentId the ID of the first party audience segment to update . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if the API request failed due to other errors . */ public static void runExample ( AdManagerServices adManagerServices , AdManagerSession session , long audienceSegmentId ) throws RemoteException { } }
// Get the AudienceSegmentService . AudienceSegmentServiceInterface audienceSegmentService = adManagerServices . get ( session , AudienceSegmentServiceInterface . class ) ; // Create a statement to only select a specified first party audience // segment . StatementBuilder statementBuilder = new StatementBuilder ( ) . where ( "WHERE id = :audienceSegmentId and type = :type" ) . orderBy ( "id ASC" ) . limit ( 1 ) . withBindVariableValue ( "audienceSegmentId" , audienceSegmentId ) . withBindVariableValue ( "type" , "FIRST_PARTY" ) ; // Get the audience segment . RuleBasedFirstPartyAudienceSegment audienceSegment = ( RuleBasedFirstPartyAudienceSegment ) audienceSegmentService . getAudienceSegmentsByStatement ( statementBuilder . toStatement ( ) ) . getResults ( ) [ 0 ] ; // Update the member expiration days . audienceSegment . setMembershipExpirationDays ( 180 ) ; // Update the audience segment on the server . AudienceSegment [ ] audienceSegments = audienceSegmentService . updateAudienceSegments ( new FirstPartyAudienceSegment [ ] { audienceSegment } ) ; for ( AudienceSegment updatedAudienceSegment : audienceSegments ) { System . out . printf ( "Audience segment with ID %d and name '%s' was updated.%n" , updatedAudienceSegment . getId ( ) , updatedAudienceSegment . getName ( ) ) ; }
public class ObjectMarshallingStrategyStoreImpl { /** * / * ( non - Javadoc ) * @ see org . kie . api . marshalling . impl . ObjectMarshallingStrategyStore # getStrategyObject ( java . lang . String ) */ public ObjectMarshallingStrategy getStrategyObject ( String strategyName ) { } }
if ( StringUtils . isEmpty ( strategyName ) ) { return null ; } if ( strategyName . startsWith ( "org.drools.marshalling.impl" ) ) { strategyName = strategyName . replaceFirst ( "org.drools.marshalling.impl" , "org.drools.core.marshalling.impl" ) ; } for ( int i = 0 ; i < this . strategiesList . length ; ++ i ) { if ( strategiesList [ i ] . getName ( ) . equals ( strategyName ) ) { return strategiesList [ i ] ; } } throw new RuntimeException ( "Unable to find PlaceholderResolverStrategy for name : " + strategyName ) ;