code
stringlengths
10
174k
nl
stringlengths
3
129k
public void remove(String name){ if (impl.formalArguments == null) { if (impl.hasFormalArgs) { throw new IllegalArgumentException("no such attribute: " + name); } return; } FormalArgument arg=impl.formalArguments.get(name); if (arg == null) { throw new IllegalArgumentException("no such att...
Remove an attribute value entirely (can't remove attribute definitions).
public final IntGrid2D add(int withThisMuch){ if (withThisMuch == 0.0) return this; int[] fieldx=null; final int width=this.width; final int height=this.height; for (int x=0; x < width; x++) { fieldx=field[x]; for (int y=0; y < height; y++) { assert sim.util.LocationLog.it(this,new Int2D(x,y))...
Sets each value in the grid to that value added to <i>withThisMuch</i> Returns the modified grid.
private boolean less(int i,int j){ return keys[pq[i]].compareTo(keys[pq[j]]) < 0; }
General helper functions.
@TransactionAttribute(TransactionAttributeType.MANDATORY) public void sendMail(Organization organization,EmailType type,Object[] params,Marketplace marketplace) throws MailOperationException { String mail=organization.getEmail(); if (mail == null || mail.trim().length() == 0) { logger.logInfo(Log4jLogger.SYSTEM...
Send mail to organization.
public void enableDebugMode(boolean b){ renderer.enableDebugMode(b); viewChanged(MapViewEvent.Type.NEW_RENDERER); }
Controls whether kd-tree informations, node identifiers etc. are shown.
public HttpEntityWrapper(HttpEntity wrapped){ super(); if (wrapped == null) { throw new IllegalArgumentException("wrapped entity must not be null"); } wrappedEntity=wrapped; }
Creates a new entity wrapper.
public static void readAttributeSet(ObjectInputStream in,MutableAttributeSet a) throws ClassNotFoundException, IOException { int n=in.readInt(); for (int i=0; i < n; i++) { Object key=in.readObject(); Object value=in.readObject(); if (thawKeyMap != null) { Object staticKey=thawKeyMap.get(key); ...
Reads a set of attributes from the given object input stream that have been previously written out with <code>writeAttributeSet</code>. This will try to restore keys that were static objects to the static objects in the current virtual machine considering only those keys that have been registered with the <code>regist...
private static JFreeChart createChart(){ Number[][] data=new Integer[][]{{new Integer(-3),new Integer(-2)},{new Integer(-1),new Integer(1)},{new Integer(2),new Integer(3)}}; CategoryDataset dataset=DatasetUtilities.createCategoryDataset("S","C",data); return ChartFactory.createStackedAreaChart("Stacked Area Chart...
Create a stacked bar chart with sample data in the range -3 to +3.
public void rotate(float angle){ impl.rotate(nativeGraphics,angle); }
Rotates the coordinate system around a radian angle using the affine transform
public OutputLimitClause afterTimePeriodExpression(TimePeriodExpression afterTimePeriodExpression){ this.afterTimePeriodExpression=afterTimePeriodExpression; return this; }
Sets the after-keyword time period.
@Override public boolean hasDurableHandlerStore(){ return true; }
determine whether this allocator supports to store non-volatile handler or not. (it is a placeholder)
public void reset(){ Metamodel.resetModuleManager(); }
Resets the metamodel. This will impact any Ceylon code running on the same ClassLoader, across threads, and will crash them if they are not done running.
private void writeQNameAttribute(java.lang.String namespace,java.lang.String attName,javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String attributeNamespace=qname.getNamespaceURI(); java.lang.String attributePrefix=xmlWriter.getPre...
Util method to write an attribute without the ns prefix
public BoolStack(int size){ m_allocatedSize=size; m_values=new boolean[size]; m_index=-1; }
Construct a IntVector, using the given block size.
public Fraction invert(){ if (numerator == 0) { throw new ArithmeticException("Unable to invert zero."); } if (numerator == Integer.MIN_VALUE) { throw new ArithmeticException("overflow: can't negate numerator"); } if (numerator < 0) { return new Fraction(-denominator,-numerator); } return new ...
<p>Gets a fraction that is the inverse (1/fraction) of this one.</p> <p>The returned fraction is not reduced.</p>
public static void openURL(Component parent,String url,boolean showDialog){ String osName=System.getProperty("os.name"); try { if (osName.startsWith("Mac OS")) { Class<?> fileMgr=Class.forName("com.apple.eio.FileManager"); Method openURL=fileMgr.getDeclaredMethod("openURL",new Class[]{String.class})...
opens the URL in a browser.
@Override public String generateToolTip(XYZDataset dataset,int series,int item){ return generateLabelString(dataset,series,item); }
Generates a tool tip text item for a particular item within a series.
public String encode(Token token){ if (iobBeginMap.containsKey(token.getBegin())) { return "B-" + iobBeginMap.get(token.getBegin()); } if (iobInsideMap.containsKey(token.getBegin())) { return "I-" + iobInsideMap.get(token.getBegin()); } return "O"; }
Returns the IOB tag for a given token.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case N4JSPackage.PARAMETERIZED_CALL_EXPRESSION__TYPE_ARGS: return getTypeArgs(); case N4JSPackage.PARAMETERIZED_CALL_EXPRESSION__TARGET: return getTarget(); case N4JSPackage.PARAMETERIZED_CALL_EXPRESSION__ARGUMENTS:...
<!-- begin-user-doc --> <!-- end-user-doc -->
public String toVerboseString(){ StringBuffer result=new StringBuffer(); result.append("Database ["); result.append(getName()); result.append("] tables:"); for (int idx=0; idx < getTableCount(); idx++) { result.append(" "); result.append(getTable(idx).toVerboseString()); } return result.toString()...
Returns a verbose string representation of this database.
synchronized void maybeThrowDeterministicException() throws IOException { if (failures != null) { for (int i=0; i < failures.size(); i++) { try { failures.get(i).eval(this); } catch ( Throwable t) { if (LuceneTestCase.VERBOSE) { System.out.println("MockDirectoryWrapper:...
Iterate through the failures list, giving each object a chance to throw an IOE
public void updateSunToCurrentTime(Time time,int canvasWidth,int canvasHeight){ calculateSunlightRatio(time); calculateSunRotation(0.0f,time,canvasWidth,canvasHeight); }
Updates the Sun Position to the current time.
public Wildcard createWildcard(){ WildcardImpl wildcard=new WildcardImpl(); return wildcard; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public Address zipCode(String zipCode){ this.zipCode=zipCode; return this; }
Sets the zip code as a string.
public DERSequence(ASN1EncodableVector v){ super(v); }
create a sequence containing a vector of objects.
public void writeTyped(int type,Xdrable item) throws IOException { int size; if (item == null) { writeInt(1); write(type); size=1; } else { size=item.getLength() + 1; writeInt(size); write(type); item.write(this); } writeAlignment(size); }
Write an <code>Xdrable</code> to this output stream.
public int read(InputStream in) throws IOException { ByteBuffer buffer=getByteBuffer(); int size=size(); int remaining=size - buffer.position(); if (remaining == 0) remaining=size; int alreadyRead=size - remaining; if (buffer.hasArray()) { int offset=buffer.arrayOffset() + getByteBufferPosition(); ...
Reads this struct from the specified input stream (convenience method when using Stream I/O). For better performance, use of Block I/O (e.g. <code>java.nio.channels.*</code>) is recommended. This method behaves appropriately when not all of the data is available from the input stream. Incomplete data is extremely commo...
public Rotate3dAnimation(float fromDegrees,float toDegrees,float centerX,float centerY,float depthZ,boolean reverse){ mFromDegrees=fromDegrees; mToDegrees=toDegrees; mCenterX=centerX; mCenterY=centerY; mDepthZ=depthZ; mReverse=reverse; }
Creates a new 3D rotation on the Y axis. The rotation is defined by its start angle and its end angle. Both angles are in degrees. The rotation is performed around a center point on the 2D space, definied by a pair of X and Y coordinates, called centerX and centerY. When the animation starts, a translation on the Z axi...
public static <T>T loadSpringBean(URL springXmlUrl,String beanName) throws IgniteCheckedException { A.notNull(springXmlUrl,"springXmlUrl"); A.notNull(beanName,"beanName"); IgniteSpringHelper spring=SPRING.create(false); return spring.loadBean(springXmlUrl,beanName); }
Loads spring bean by name.
public static boolean isApplicationInBackground(Context context){ ActivityManager am=(ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE); List<RunningTaskInfo> taskList=am.getRunningTasks(1); if (taskList != null && !taskList.isEmpty()) { ComponentName topActivity=taskList.get(0).topActivity; ...
whether application is in background <ul> <li>need use permission android.permission.GET_TASKS in Manifest.xml</li> </ul>
public boolean isVariable(long arc){ switch ((int)arc) { case 9: case 8: case 7: case 6: case 5: case 4: case 3: case 11: case 2: case 10: case 1: return true; default : break; } return false; }
Returns true if "arc" identifies a scalar object.
static void checkAccess(final int access,final int possibleAccess){ if ((access & ~possibleAccess) != 0) { throw new IllegalArgumentException("Invalid access flags: " + access); } int pub=(access & Opcodes.ACC_PUBLIC) == 0 ? 0 : 1; int pri=(access & Opcodes.ACC_PRIVATE) == 0 ? 0 : 1; int pro=(access & Opc...
Checks that the given access flags do not contain invalid flags. This method also checks that mutually incompatible flags are not set simultaneously.
@Override public void aggregateMeasure(AbstractScannedResult scannedResult,MeasureAggregator[] aggrgeator){ for (short i=0; i < measuresOrdinal.length; i++) { if (isMeasureExistsInCurrentBlock[i]) { aggrgeator[measureColumnStartIndex + i].agg(scannedResult.getMeasureChunk(measuresOrdinal[i]),scannedResult.g...
Below method will be used to aggregate the measure value
public void nextBytes(byte[] bytes,int start,int len){ doNextBytes(bytes,start,len); }
Fill part of bytes with random values.
public static boolean hasNestedExceptions(InvocationSequenceData data){ return (null != data.isNestedExceptions()) && data.isNestedExceptions().booleanValue(); }
Checks whether this data object has nested SQL statements.
protected boolean compare(Instance inst1,Instance inst2){ boolean result; int i; result=(inst1.numAttributes() == inst2.numAttributes()); if (result) { for (i=0; i < inst1.numAttributes(); i++) { if (Double.isNaN(inst1.value(i)) && (Double.isNaN(inst2.value(i)))) { continue; } if (...
compares two Instance
protected void sequence_AnnotatedExportableElement_InterfaceImplementsList_Members_TypeVariables(ISerializationContext context,N4InterfaceDeclaration semanticObject){ genericSequencer.createSequence(context,semanticObject); }
Contexts: AnnotatedExportableElement<Yield> returns N4InterfaceDeclaration AnnotatedExportableElement returns N4InterfaceDeclaration Constraint: ( annotationList=AnnotatedExportableElement_N4InterfaceDeclaration_1_2_0_1_0 declaredModifiers+=N4Modifier* typingStrategy=TypingStrategyDefSiteOperator? name=BindingIdenti...
public static final HashMap<String,Integer> countCombinations(Instances D,int L){ HashMap<String,Integer> map=new HashMap<String,Integer>(); for (int i=0; i < D.numInstances(); i++) { String y=MLUtils.toBitString(D.instance(i),L); Integer c=map.get(y); map.put(y,c == null ? 1 : c + 1); } return map;...
CountCombinations - return a mapping of each distinct label combination and its count. NOTE: A sparse representation would be much better for many applications, i.e., instead of using toBitString(...), use toSparseRepresentation(...) instead.
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){ switch (featureID) { case UmplePackage.ORDINAL_OP___GREATER_OP_1: return ((InternalEList<?>)getGreaterOp_1()).basicRemove(otherEnd,msgs); case UmplePackage.ORDINAL_OP___LESS_OP_1: return ((InternalELi...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void init(boolean forEncryption,CipherParameters param){ if (param instanceof ParametersWithRandom) { ParametersWithRandom rParam=(ParametersWithRandom)param; key=(RSAKeyParameters)rParam.getParameters(); } else { key=(RSAKeyParameters)param; } this.forEncryption=forEncryption; }
initialise the RSA engine.
public void writeRawBytes(final ByteString value,int offset,int length) throws IOException { if (limit - position >= length) { value.copyTo(buffer,offset,position,length); position+=length; totalBytesWritten+=length; } else { final int bytesWritten=limit - position; value.copyTo(buffer,offset,p...
Write part of a byte string.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
private void fireInvitationRejectionListeners(String invitee,String reason){ InvitationRejectionListener[] listeners; synchronized (invitationRejectionListeners) { listeners=new InvitationRejectionListener[invitationRejectionListeners.size()]; invitationRejectionListeners.toArray(listeners); } for ( Invi...
Fires invitation rejection listeners.
public Set<String> classNames(){ return element.classNames(); }
Gets the element's CSS classes.
public void add(E newObject){ list.add(newObject); int currentIndex=list.size() - 1; while (currentIndex > 0) { int parentIndex=(currentIndex - 1) / 2; if (comparator.compare(list.get(currentIndex),list.get(parentIndex)) > 0) { E temp=list.get(currentIndex); list.set(currentIndex,list.get(pare...
Add a new object into the heap
public static Statement union(boolean distinct,Statement... subQueries){ QueryStatement stmt=new QueryStatement(); String unionOperator=distinct ? " UNION " : " UNION ALL "; for (int i=0; i < subQueries.length; i++) { if (i > 0) stmt.statement.append(unionOperator); stmt.statement.append(subQueries[i]...
Producing an UNION statement that combine the results of two or more SELECT statements.
private GuacamoleProperties(){ }
GuacamoleProperties is a utility class and cannot be instantiated.
public void printStackTrace(PrintWriter s){ super.printStackTrace(s); }
Prints this <code>URIReferenceException</code>, its backtrace and the cause's backtrace to the specified print writer.
public static String decode(byte[] utf8) throws CharacterCodingException { return decode(ByteBuffer.wrap(utf8),true); }
Converts the provided byte array to a String using the UTF-8 encoding. If the input is malformed, replace by a default value.
public static ColorStateList valueOf(int color){ synchronized (sCache) { WeakReference<ColorStateList> ref=sCache.get(color); ColorStateList csl=ref != null ? ref.get() : null; if (csl != null) { return csl; } csl=new ColorStateList(EMPTY,new int[]{color}); sCache.put(color,new WeakReferen...
Creates or retrieves a ColorStateList that always returns a single color.
public boolean contains(String user){ return getEntry(user) != null; }
Returns true if the specified XMPP address is an entry in this group.
@Override protected boolean isFrontierEmpty(){ return frontier.isEmpty(); }
Checks whether the frontier contains not yet expanded nodes.
public static OrderByClause create(){ return new OrderByClause(); }
Create an empty order-by clause.
public void clear(){ oredCriteria.clear(); orderByClause=null; distinct=false; }
This method was generated by MyBatis Generator. This method corresponds to the database table subscriber
public synchronized void clear(){ listeners=EmptyArray; }
Removes all listeners from this list.
public Token(int length,byte id){ this.length=length; this.id=id; }
Creates a new token.
@Override public void insertBack(int x){ if (size == items.length) { resize((int)(size * 1.01)); } items[size]=x; size=size + 1; }
Inserts X into the back of the list.
public void remove(BTDownload downloader){ super.remove(downloader); downloader.remove(); }
Overrides the default remove. <p/> Takes action upon downloaded theme files, asking if the user wants to apply the theme. <p/> Removes a download from the list if the user has configured their system to automatically clear completed download and if the download is complete.
private CDatabaseManager(){ }
Creates a new Database manager object.
public void handlePeriodicMaintenance(Operation post){ post.complete(); }
Invoked by the host periodically, if ServiceOption.PERIODIC_MAINTENANCE is set. ServiceMaintenanceRequest object is set in the operation body, with the reasons field indicating the maintenance reason. An implementation of this method that needs to interact with the state of this service must do so as if it were a clien...
protected byte[] engineDoFinal(byte[] input,int inputOffset,int inputLen) throws IllegalBlockSizeException, BadPaddingException { throw new IllegalStateException("Cipher has not been initialized"); }
This operation is not supported by this cipher. Since it's impossible to initialize this cipher given the current Cipher.engineInit(...) implementation, IllegalStateException will always be thrown upon invocation.
@Override public String toString(){ if (this.getObject() == null) { return this.getStyle().getNullText(); } Class<?> clazz=this.getObject().getClass(); this.appendFieldsIn(clazz); while (clazz.getSuperclass() != null && clazz != this.getUpToClass()) { clazz=clazz.getSuperclass(); this.appendFields...
<p> Gets the String built by this builder. </p>
public Certificate[] engineGetCertificateChain(String alias){ Entry entry=entries.get(alias.toLowerCase(Locale.ENGLISH)); if (entry != null && entry instanceof PrivateKeyEntry) { if (((PrivateKeyEntry)entry).chain == null) { return null; } else { if (debug != null) { debug.println("Retr...
Returns the certificate chain associated with the given alias.
public BuyClientBuilder httpTimeout(final long httpConnectionTimeoutMs,final long httpReadWriteTimeoutMs){ this.httpConnectionTimeoutMs=httpConnectionTimeoutMs; this.httpReadWriteTimeoutMs=httpReadWriteTimeoutMs; return this; }
Sets the default http timeouts for new connections. A value of 0 means no timeout, otherwise values must be between 1 and Long.MAX_VALUE.
public final boolean asXml(){ return markupMode == MarkupRenderMode.XML; }
True iff DOM tree nodes should be rendered as XML.
private void addExportSnapshotSteps(Workflow workflow,ProtectionSystem rpSystem,URI exportGroupID,Map<URI,Integer> snapshots,List<URI> initiatorURIs) throws InternalException { ExportGroup exportGroup=_dbClient.queryObject(ExportGroup.class,exportGroupID); String exportStep=workflow.createStepId(); initTaskStatus...
Method that adds the export snapshot step.
public boolean isHeader(){ return isHeader(this.myHeader); }
Check that this HDU has a valid header.
public boolean execute(String action,JSONArray args,CallbackContext callbackContext) throws JSONException { if (this.cordova.getActivity().isFinishing()) return true; if (action.equals("beep")) { this.beep(args.getLong(0)); } else if (action.equals("alert")) { this.alert(args.getString(0),args.getStr...
Executes the request and returns PluginResult.
public void deleteSortLocationIfExists() throws CarbonSortKeyAndGroupByException { CarbonDataProcessorUtil.deleteSortLocationIfExists(this.tempFileLocation); }
This method will be used to delete sort temp location is it is exites
public TokenScanner(IDocument document,IJavaProject project){ String sourceLevel=project.getOption(JavaCore.COMPILER_SOURCE,true); String complianceLevel=project.getOption(JavaCore.COMPILER_COMPLIANCE,true); fScanner=ToolFactory.createScanner(true,false,false,sourceLevel,complianceLevel); fScanner.setSource(doc...
Creates a TokenScanner
public void addDropItem(final String name,final double probability,final int amount){ dropsItems.add(new DropItem(name,probability,amount)); }
adds a named item to the List of Items that will be dropped on dead if clearDropItemList hasn't been called first, this will change all creatures of this kind.
public static <K,V>HashMap<K,V> hashMap(int initialCapacity){ return new HashMap<K,V>(initialCapacity); }
Create a new HashMap.
public ImageResizer(Context context,int imageWidth,int imageHeight){ super(context); setImageSize(imageWidth,imageHeight); }
Initialize providing a single target image size (used for both width and height);
public final boolean a1Castle(){ return (castleMask & (1 << A1_CASTLE)) != 0; }
Return true if white long castling right has not been lost.
public void initialize() throws NetworkDeviceControllerException { SSHPrompt[] prompts={SSHPrompt.POUND,SSHPrompt.GREATER_THAN}; StringBuilder buf=new StringBuilder(); SSHPrompt got=waitFor(prompts,defaultTimeout,buf,true); String[] lines=buf.toString().split("[\n\r]+"); String lastLine=lines[lines.length - 1...
This initializes a new session, gathering the prompts, and setting the terminal length.
protected Object processXmlHttpResponse(CloseableHttpResponse response,String actionDescription,Class<?>... responseClass){ StatusLine responseStatusLine=response.getStatusLine(); Object responseObject=null; String xmlResponse=""; HttpErrorResponseException errorException=null; try { if (responseStatusLin...
Extracts an instance of the specified object class from the registration server response.
private void ok(){ int keepalive; int timeout; Intent intent=new Intent(); if (resultData == null) { resultData=new Bundle(); resultData.putString(ActivityConstants.message,ActivityConstants.empty); resultData.putString(ActivityConstants.topic,ActivityConstants.empty); resultData.putInt(Activity...
Packs all the options the user has chosen, along with defaults the user has not chosen
public NonRepeatableRequestException(String message){ super(message); }
Creates a new NonRepeatableEntityException with the specified detail message.
@Override public GitClient git(){ return new DefaultGitClient(url,authenticationManager); }
Returns the Git API client.
static boolean isRegistered(final Object value){ final Map<Object,Object> m=getRegistry(); return m != null && m.containsKey(value); }
<p> Returns <code>true</code> if the registry contains the given object. Used by the reflection methods to avoid infinite loops. </p>
public void clear(){ if (mSize != 0) { freeArrays(mHashes,mArray,mSize); mHashes=EMPTY_INTS; mArray=EMPTY_OBJECTS; mSize=0; } }
Make the array map empty. All storage is released.
public NotificationChain basicSetInitSequence(Sequence newInitSequence,NotificationChain msgs){ Sequence oldInitSequence=initSequence; initSequence=newInitSequence; if (eNotificationRequired()) { ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,SexecPackage.EXECUTION_FLOW__INIT_SEQUE...
<!-- begin-user-doc --> <!-- end-user-doc -->
protected S_ReflexImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public StrBuilder deleteFirst(final String str){ final int len=(str == null ? 0 : str.length()); if (len > 0) { final int index=indexOf(str,0); if (index >= 0) { deleteImpl(index,index + len,len); } } return this; }
Deletes the string wherever it occurs in the builder.
private form fillForm(WWindowStatus ws,String action,MLocation location,String targetBase,boolean addStart){ form myForm=null; myForm=new form(action).setName("WLocation"); myForm.setID("Location"); myForm.setTitle("Location"); myForm.addAttribute("selected","true"); myForm.setClass("panel"); myForm.setMe...
Fill Address Form
public SynchronizedHardReferenceQueue(final HardReferenceQueueEvictionListener<T> listener,final int capacity,final int nscan){ this.queue=new InnerHardReferenceQueue(listener,capacity,DEFAULT_NSCAN); }
Core impl.
public FacetResult search() throws IOException { FacetsCollector fc=new FacetsCollector(); searcher.search(new MatchAllDocsQuery(),fc); Facets facets=new DoubleRangeFacetCounts("field",getDistanceValueSource(),fc,getBoundingBoxQuery(ORIGIN_LATITUDE,ORIGIN_LONGITUDE,10.0),ONE_KM,TWO_KM,FIVE_KM,TEN_KM); return fa...
User runs a query and counts facets.
@Override protected void overrideIdentifierData(EmaApiIdentifierType identifier) throws EmaException { identifier.setEmbedLevel(EmaApi.EMA_EMBED_LEVEL_EXTERNAL_STR); }
Set specific embed level for this event in CallHome Identifier section.
private static ThreadState convertThreadState(final int value){ switch (value) { case 0: return ThreadState.RUNNING; case 1: return ThreadState.SUSPENDED; default : throw new IllegalArgumentException(String.format("Received invalid thread state %d",value)); } }
Converts the numerical value of a thread state into the proper enumeration value.
public static QueryLanguage valueOf(String qlName){ for ( QueryLanguage ql : QUERY_LANGUAGES) { if (ql.getName().equalsIgnoreCase(qlName)) { return ql; } } return null; }
Returns the query language whose name matches the specified name.
static String primitiveTypeLabel(char typeChar){ switch (typeChar) { case 'B': return "byte"; case 'C': return "char"; case 'D': return "double"; case 'F': return "float"; case 'I': return "int"; case 'J': return "long"; case 'S': return "short"; case 'V': return "void"; case 'Z': return "boolean"; default : Syst...
Converts a single-character primitive type into its human-readable equivalent.
public void removeMethod(SootMethod m){ checkLevel(SIGNATURES); if (!m.isDeclared() || m.getDeclaringClass() != this) throw new RuntimeException("incorrect declarer for remove: " + m.getName()); if (subSigToMethods.get(m.getNumberedSubSignature()) == null) { throw new RuntimeException("Attempt to remove met...
Removes the given method from this class.
public static void reportPropertyDescriptor(PropertyDescriptor pd){ System.out.println("property name: " + pd.getName()); System.out.println(" type: " + pd.getPropertyType()); System.out.println(" read: " + pd.getReadMethod()); System.out.println(" write: " + pd.getWriteMethod()); i...
Reports all the interesting information in an Indexed/PropertyDescrptor.
public void add(Value value){ Key subKey=makeSubKey(value); client.put(this.policy,subKey,new Bin(ListElementBinName,value)); client.operate(this.policy,this.key,ListOperation.append(this.binNameString,Value.get(subKey.digest))); }
Add value to list. Fail if value's key exists and list is configured for unique keys. If value is a map, the key is identified by "key" entry. Otherwise, the value is the key. If large list does not exist, create it. <p>
public int size(){ return counter.get(); }
return the size (i.e. Elements present in the Queue)
public void verifyIncludedAndExcludedSegments(SegmentedTimeline timeline,long n){ timeline.setExceptionSegments(new java.util.ArrayList()); SegmentedTimeline.Segment segment=timeline.getSegment(n); for (int i=0; i < 1000; i++) { int d=(i % timeline.getGroupSegmentCount()); if (d < timeline.getSegmentsIncl...
Tests that a timeline's included and excluded segments are being calculated correctly.
private boolean acquireDestroyReadLock(long millis) throws InterruptedException { boolean interrupted=Thread.interrupted(); try { if (interrupted && this.dlock.isInterruptibleLockRequest()) { throw new InterruptedException(); } while (true) { try { this.dm.getCancelCriterion().checkC...
Acquires a read lock on the destroy ReadWrite lock uninterruptibly using millis for try-lock attempt.
public Arg(QName qname,String expression,boolean isFromWithParam){ m_qname=qname; m_val=null; m_expression=expression; m_isFromWithParam=isFromWithParam; m_isVisible=!isFromWithParam; }
Construct a parameter argument that contains an expression.
private void startProtectionSystem(ProtectionSystem system) throws InternalException { ProtectionController controller=getProtectionController(system.getSystemType()); controller.connect(system.getId()); }
Invoke connect protection. Once system is verified to be registered. Statistics, Events will be collected for only registered systems.
public static void init(){ if (SecurityPolicy.get() != SecurityPolicy.NONE) { INSTANCE=new ToastSecurityManager(); System.setSecurityManager(INSTANCE); main=Thread.currentThread().getThreadGroup(); group=new ThreadGroup(Thread.currentThread().getThreadGroup(),"Toasted"); } }
Initialize the security manager. This is done by Toast during runtime and should NEVER be called by a module.