code
stringlengths
10
174k
nl
stringlengths
3
129k
private void enlarge(final int size){ int length1=2 * data.length; int length2=length + size; byte[] newData=new byte[length1 > length2 ? length1 : length2]; System.arraycopy(data,0,newData,0,length); data=newData; }
Enlarge this byte vector so that it can receive n more bytes.
public Output compile(StringContext context) throws CompilationException { final ImportStack importStack=new ImportStack(); return adapter.compile(context,importStack); }
Compile a string context.
public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){ ActionErrors errors=new ActionErrors(); if ((tipoBusqueda == TIPO_BUSQUEDA_POR_GESTOR) && StringUtils.isBlank(gestor)) errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionError(Constants.ERROR_REQUIRED,Messages.getString(TransferenciasCo...
Valida el formulario de busqueda.
public void replace(ClassNode type){ int size=stack.size(); try { if (size == 0) throw new ArrayIndexOutOfBoundsException("size==0"); } catch ( ArrayIndexOutOfBoundsException ai) { System.err.println("index problem in " + controller.getSourceUnit().getName()); throw ai; } stack.set(size - 1,...
replace top level element with new element of given type
public void write(int c) throws IOException { if (binaryMode) { super.write(c); return; } if (seenCR) { if (c != '\n') super.write(0); super.write(c); if (c != '\r') seenCR=false; } else { if (c == '\n') { super.write('\r'); super.write('\n'); return; } ...
Writes the int to the stream and does CR LF processing if necessary.
public void yypushback(int number){ if (number > yylength()) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos-=number; }
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method
private void addToken(int start,int end,int tokenType){ int so=start + offsetShift; addToken(zzBuffer,start,end,tokenType,so,false); }
Adds the token specified to the current linked list of tokens.
@Override public List<NativeModule> createNativeModules(ReactApplicationContext reactContext){ return new ArrayList<>(); }
Registers any react native modules that have been built.
public static void removeChannelIfDisconnected(Channel ch){ if (ch != null && !ch.isConnected()) { ch.removeAttribute(CHANNEL_KEY); } }
Description: <br>
public void onSuccess(int statusCode,JSONObject response){ onSuccess(response); }
Fired when a request returns successfully and contains a json object at the base of the response string. Override to handle in your own code.
public OrganizationRemovedException(String message,ApplicationExceptionBean bean,Throwable cause){ super(message,bean,cause); }
Constructs a new exception with the specified detail message, cause, and bean for JAX-WS exception serialization.
private List<InstalledApp> _initialize_data(){ String where_clause="_isignored = 0"; Activity activity=getActivity(); if (activity != null) { SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(activity); boolean show_system=pref.getBoolean(SettingsFragment.KEY_PREF_SHOW_SYSTEM,false); ...
This method loads the list of installed applications from the database, or generates it if no data exists.
private static String stripAppleSpanFromMarkup(String markup){ StringBuilder stripped=new StringBuilder(markup); int prefixBegIdx=stripped.indexOf(APPLE_SPAN_PREFIX); while (prefixBegIdx >= 0) { int prefixEndIdx=stripped.indexOf(">",prefixBegIdx) + 1; stripped.replace(prefixBegIdx,prefixEndIdx,""); in...
Strips the apple span appended by WebKit while generating the selection markup.
public BaseRowSet(){ listeners=new Vector<RowSetListener>(); }
Constructs a new <code>BaseRowSet</code> object initialized with a default <code>Vector</code> object for its <code>listeners</code> field. The other default values with which it is initialized are listed in Section 6.0 of the class comment for this class.
public NumberTextField(double initialValue,double multiply,double add){ this(null,initialValue,multiply,add); }
Creates a NumberTextField according to the provided parameters. initialValue specifies the initial number value. multiply and add work as follows: If the right arrow is pressed, then the current value is changed to newValue(value * multiply + add); similarly, if the left arrow is pressed, then the current value is cha...
public static void main(String[] args) throws Exception { String nameOfNRCTrain=""; String nameOfGUMLTTrain=""; String nameOfKLUETrain=""; int evalmodelmode=0; int trainmodelmode=0; Options options=new Options(); options.addOption("on",true,"output Name"); options.addOption("tf",true,"Name of the NRC Tr...
Main function
public String toString(){ return getName(); }
Returns the name of this class.
protected void analyze(SampledGraphProjection<?,?,?> graph,String output){ try { Level level=Logger.getRootLogger().getLevel(); Logger.getRootLogger().setLevel(Level.WARN); for ( PiEstimator estimator : estimators) { estimator.update(graph); } for ( Entry<String,AnalyzerTask> task : ta...
Analysis the sampled graph will all analyzer tasks.
public void receiveErrorgetAlarms(java.lang.Exception e){ }
auto generated Axis2 Error handler override this method for handling error response from getAlarms operation
@Override public void eUnset(int featureID){ switch (featureID) { case N4JSPackage.PARAMETERIZED_CALL_EXPRESSION__TYPE_ARGS: getTypeArgs().clear(); return; case N4JSPackage.PARAMETERIZED_CALL_EXPRESSION__TARGET: setTarget((Expression)null); return; case N4JSPackage.PARAMETERIZED_CALL_EXPRESSION__ARGUMENTS: getArg...
<!-- begin-user-doc --> <!-- end-user-doc -->
public static Text createText(Composite parent,int style,int hspan,int width,int height,int fill){ Text t=new Text(parent,style); t.setFont(parent.getFont()); GridData gd=new GridData(fill); gd.horizontalSpan=hspan; gd.widthHint=width; gd.heightHint=height; t.setLayoutData(gd); return t; }
Creates a new text widget
public static void showFlowgraphSettingsDialog(final JFrame parent){ final ZyGraphViewSettings settings=ConfigManager.instance().getDefaultFlowGraphSettings(); final CGraphSettingsDialog dlg=new CGraphSettingsDialog(parent,"Initial Flow graph Settings",settings,true,false); dlg.setVisible(true); ConfigManager.i...
Shows the initial flow graph settings dialog.
public static boolean isValidEmail(String email){ Matcher matcher=validEmailPattern.matcher(email); return matcher.find(); }
Check if word contains an email address
public boolean isRippleCentered(){ return this.mRippleCentered; }
Get whether the ripple originates from the touching point, or the center of the view.
@CloudUnitSecurable @ResponseBody @RequestMapping(value="/alias",method=RequestMethod.POST) public JsonResponse addAlias(@RequestBody JsonInput input) throws ServiceException, CheckException { if (logger.isDebugEnabled()) { logger.debug(input.toString()); } User user=this.authentificationUtils.getAuthentifica...
Add an alias for an application
public RelTraitSet traitSet(){ return getPlanner().emptyTraitSet(); }
Returns the default trait set for this cluster.
protected Instances makeTestDataset(int seed,int numInstances,int numNominal,int numNumeric,int numString,int numDate,int numRelational,int numClasses,int classType,boolean multiInstance) throws Exception { return makeTestDataset(seed,numInstances,numNominal,numNumeric,numString,numDate,numRelational,numClasses,class...
Make a simple set of instances, which can later be modified for use in specific tests.
@Override public ValueLob copyToTemp(){ ValueLob lob; if (type == CLOB) { lob=ValueLob.createClob(getReader(),precision); } else { lob=ValueLob.createBlob(getInputStream(),precision); } return lob; }
Create an independent copy of this temporary value. The file will not be deleted automatically.
public boolean containsValue(Object value){ if (value == null) { for (int i=0, isize=data.length; i < isize; i++) { HashEntry entry=data[i]; while (entry != null) { if (entry.getValue() == null) { return true; } entry=entry.next; } } } else { for (int...
Checks whether the map contains the specified value.
public boolean isOccupant(final RPEntity entity){ return targets.contains(entity.getID()); }
Check if an entity is an [acknowledged] occupant of this area.
public static SupportedCurrency findOrCreate(DataService mgr,String currencyCode) throws NonUniqueBusinessKeyException { SupportedCurrency result=(SupportedCurrency)mgr.find(new SupportedCurrency(currencyCode)); if (result == null) { result=persistCurrency(mgr,currencyCode); } return result; }
Returns the SupportedCurrency domain object for the given currency code. Creates the object if needed.
public String limitLen(int maxlen,String string,String suffix){ String ret=string; if (string.length() > maxlen) { ret=string.substring(0,maxlen - suffix.length()) + suffix; } return ret; }
Limits 'string' to 'maxlen' character. If the string gets curtailed, 'suffix' is appended to it.
@Override public void updateDataCycle(Cycle cycle){ dataCycle=cycle; dataCycleStream.onNext(dataCycle); }
Update current data cycle to reflect changes
public static IFilledList<ICallgraphView> loadCallgraphViews(final AbstractSQLProvider provider,final CModule module,final CTagManager viewTagManager,final CTagManager nodeTagManager) throws CouldntLoadDataException { return loadModuleCallgraphs(provider,module,viewTagManager,nodeTagManager,ViewType.NonNative); }
Loads the non-native call graph views of a module.
public void onSendTextFinished(String text,boolean done){ if (TextDirectionHeuristicsCompat.FIRSTSTRONG_LTR.isRtl(text,0,text.length())) { text=new StringBuilder(text).reverse().toString(); } Input.SendText action=new Input.SendText(text,done); action.execute(hostManager.getConnection(),null,null); }
Callbacks from Send text dialog
public ObjIdConcurrentMap(int initialCapacity,float loadFactor){ this(initialCapacity,loadFactor,DEFAULT_CONCURRENCY_LEVEL); }
Creates a new, empty map with the specified initial capacity and load factor and with the default concurrencyLevel (16).
public SuffixArraySample sample(final int[] sourceQuery,int maxSamples,int minBound,int maxBound){ return sample(sourceQuery,maxSamples,minBound,maxBound,false); }
Return a sample of sentences from the suffix array.
private Thread fullGetFirstQueuedThread(){ Node h, s; Thread st; if (((h=head) != null && (s=h.next) != null && s.prev == head && (st=s.thread) != null) || ((h=head) != null && (s=h.next) != null && s.prev == head && (st=s.thread) != null)) return st; Node t=tail; Thread firstThread=null; while (t != null...
Version of getFirstQueuedThread called when fastpath fails
public TransformVariablesXHat(BBOBFunction function,long seed){ super(function); this.seed=seed; }
Constructs a new instance of the x-hat transformation.
private synchronized void _serializeDateTime(DateTime dateTime,StringBuilder sb){ Calendar c=JREDateTimeUtil.getThreadCalendar(ThreadLocalPageContext.getTimeZone()); c.setTime(dateTime); sb.append(goIn()); sb.append("new Date("); sb.append(c.get(Calendar.YEAR)); sb.append(","); sb.append(c.get(Calendar.MO...
serialize a DateTime
public void runTest() throws Throwable { Document doc; NodeList elementList; Element testAddr; Node textNode; int nodeType; doc=(Document)load("hc_staff",false); elementList=doc.getElementsByTagName("acronym"); testAddr=(Element)elementList.item(0); textNode=testAddr.getFirstChild(); nodeType=(int)t...
Runs the test case.
public static _ExecutionSettingEnum fromString(final String value) throws SOAPSerializationException { return (_ExecutionSettingEnum)Enumeration.fromString(value,_ExecutionSettingEnum.VALUES_TO_INSTANCES); }
Gets the specific enumeration value in this class appropriate for the given XML attribute value. If no value is known, null is returned (_DEFAULT is not used; that value is for when the attribute is not present).
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:17.148 -0500",hash_original_method="8CB3016823DC727CE96A9F34A7CC13A4",hash_generated_method="5A20A63F96B1A47B139B807B81054F73") public static Formatter formatDateRange(Context context,Formatter formatter,long startMillis,long endMil...
Formats a date or a time range according to the local conventions. <p> Example output strings (date formats in these examples are shown using the US date format convention but that may change depending on the local settings): <ul> <li>10:15am</li> <li>3:00pm - 4:00pm</li> <li>3pm - 4pm</li> <li>3PM - 4PM</li> <li>08:00...
public void deactivate(){ int actionMask=0; if (currentEditable != null) { actionMask=currentEditable.getActionMask(); } deactivate(actionMask); }
Turn the drawing tool off, disconnecting it from the MouseDelegator or canvas component, and removing the palette. Called automatically from the mouse mode an GUI when appropriate, although you can force a cleanup if needed by calling this method. Calling this version of deactivate() just uses the action mask stored in...
private void checkServerResponseCode(HttpURLConnection urlConnection) throws RequestFailureException { try { if (urlConnection.getResponseCode() != 200) { throw new RequestFailureException("Received " + urlConnection.getResponseCode() + " code instead of 200 (OK) from the server. Aborting."); } } ca...
Confirms that the Omaha server sent back an "OK" code.
public static RedditPostFragment newInstance(String param1,String param2){ RedditPostFragment fragment=new RedditPostFragment(); Bundle args=new Bundle(); args.putString(ARG_PARAM1,param1); args.putString(ARG_PARAM2,param2); fragment.setArguments(args); return fragment; }
Use this factory method to create a new instance of this fragment using the provided parameters.
public void xor(ShiftingBitSet set){ int wordsInCommon=Math.min(wordsInUse,set.wordsInUse); if (wordsInUse < set.wordsInUse) { ensureCapacity(set.wordsInUse); wordsInUse=set.wordsInUse; } for (int i=0; i < wordsInCommon; i++) words[i]^=set.words[i]; if (wordsInCommon < set.wordsInUse) System.array...
Performs a logical <b>XOR</b> of this bit set with the bit set argument. This bit set is modified so that a bit in it has the value <code>true</code> if and only if one of the following statements holds: <ul> <li>The bit initially has the value <code>true</code>, and the corresponding bit in the argument has the value ...
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:19.018 -0500",hash_original_method="70B1862B4F6250E0DD71D86C1C84F44C",hash_generated_method="A3DE51B2043BB8B2898D278AD98EF725") @Deprecated public static boolean cacheDisabled(){ return mDisabled; }
Whether the cache is disabled.
protected ChannelCalculatorCommon assignCalcObjectContinuous(String selectedCalcType) throws Exception { if (selectedCalcType.equalsIgnoreCase(CALC_TYPE_GAUSSIAN)) { return new TransferEntropyCalculatorGaussian(); } else if (selectedCalcType.equalsIgnoreCase(CALC_TYPE_KRASKOV)) { return new TransferEntro...
Method to assign and initialise our continuous calculator class
public SolrConfig() throws ParserConfigurationException, IOException, SAXException { this((SolrResourceLoader)null,DEFAULT_CONF_FILE,null); }
Creates a default instance from the solrconfig.xml.
public static void main(String[] args){ FindWithCapabilities find; Vector<String> list; String result; int i; boolean printMisses; Iterator<Capability> iter; boolean first; printMisses=false; try { find=new FindWithCapabilities(); try { printMisses=Utils.getFlag("misses",args); fin...
Executes the location of classes with parameters from the commandline.
UUID senderNodeId(){ return sndNode.id(); }
Gets property senderNodeId.
public boolean isHittable(){ return hittable && !hit && !destroyed&& !missing; }
Can this slot be hit by a critical hit roll?
private static Object runJUnit3Test(Class scriptClass){ try { Object testSuite=InvokerHelper.invokeConstructorOf("junit.framework.TestSuite",new Object[]{scriptClass}); return InvokerHelper.invokeStaticMethod("junit.textui.TestRunner","run",new Object[]{testSuite}); } catch ( ClassNotFoundException e) { ...
Run the specified class extending TestCase as a unit test. This is done through reflection, to avoid adding a dependency to the JUnit framework. Otherwise, developers embedding Groovy and using GroovyShell to load/parse/compile groovy scripts and classes would have to add another dependency on their classpath.
public ObjectArrayList copy(){ return (ObjectArrayList)clone(); }
Returns a copy of the receiver; call <code>clone()</code> and casts the result. Returns a copy such that the copy and the receiver <i>share</i> the same elements, but do not share the same array to index them; So modifying an object in the copy modifies the object in the receiver and vice versa; However, structurally m...
public ReceiveFileTransfer acceptResumeAndTransfer(File destination,long startPosition) throws IOException, InterruptedException { ReceiveFileTransfer transfer=acceptResume(destination,startPosition); transfer.transfer(); return transfer; }
Accept the resume request and transfer the file now, blocking until finished.
@Override public String toString(){ return "LogKillEventCommand [frozenKilled=" + frozenKilled + ", frozenKiller="+ frozenKiller+ "]"; }
returns a string suitable for debug output of this DBCommand.
public int optInt(String key){ return optInt(key,0); }
Get an optional int value associated with a key, or zero if there is no such key or if the value is not a number. If the value is a string, an attempt will be made to evaluate it as a number.
@Override public boolean equals(Object o){ if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } final SimpleClassLabel that=(SimpleClassLabel)o; return label.equals(that.label); }
Any ClassLabel should ensure a natural ordering that is consistent with equals. Thus, if <code>this.compareTo(o)==0</code>, then <code>this.equals(o)</code> should be <code>true</code>.
public void registerMediaButtonIntent(PendingIntent mediaIntent,ComponentName eventReceiver,IBinder token){ Log.i(TAG," Remote Control registerMediaButtonIntent() for " + mediaIntent); synchronized (mAudioFocusLock) { synchronized (mRCStack) { pushMediaButtonReceiver_syncAfRcs(mediaIntent,eventReceiver,token...
see AudioManager.registerMediaButtonIntent(PendingIntent pi, ComponentName c) precondition: mediaIntent != null
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:01:24.254 -0500",hash_original_method="6B7A6AA30AC9918948A2664C57D48C07",hash_generated_method="6B7A6AA30AC9918948A2664C57D48C07") void append(byte[] xml,int offset,int le...
Appends part of an XML document. This parser will parse the given XML to the extent possible and dispatch to the appropriate methods.
private void initTreeMap(){ if (entityType == null) { entityType="Mouse"; } if (entityType.equalsIgnoreCase("Circle")) { imageMap=RotatingEntityManager.getCircle(); } if (entityType.equalsIgnoreCase("Mouse")) { imageMap=RotatingEntityManager.getMouse(); } else if (entityType.equalsIgnoreCase(...
Initialize the tree map, which associates angles with images / animations.
public static SecretKeys generateKeyFromPassword(String password,String salt) throws GeneralSecurityException { return generateKeyFromPassword(password,Base64.decode(salt,BASE64_FLAGS)); }
A function that generates password-based AES & HMAC keys. See generateKeyFromPassword.
@Override protected Object convertToType(final Class type,final Object value) throws Throwable { return new URL(value.toString()); }
<p>Convert a java.net.URL or object into a String.</p>
public boolean scheduleOnce(final Steppable event,final int ordering){ synchronized (lock) { return _scheduleOnce(new Key(time + 1.0,ordering),event); } }
Schedules the event to occur at getTime() + 1.0, and in the ordering provided. If this is a valid time and event, schedules the event and returns TRUE. This method at present returns FALSE if the schedule cannot schedule any more events (it's sealed or the time is AFTER_SIMULATION), or if the event is being scheduled f...
ResolvedMigration extractMigrationInfo(JavaMigration javaMigration){ Integer checksum=null; if (javaMigration instanceof MigrationChecksumProvider) { MigrationChecksumProvider checksumProvider=(MigrationChecksumProvider)javaMigration; checksum=checksumProvider.getChecksum(); } MigrationVersion version; ...
Extracts the migration info from this migration.
protected void threadStop(){ if (thread == null) { return; } threadDone=true; thread.interrupt(); try { thread.join(); } catch ( InterruptedException e) { ; } thread=null; }
Stop the background thread that is periodically checking for changes to compile time included files in a JSP.
public String map(String typeName){ return typeName; }
Map type name to the new name. Subclasses can override.
public int next(){ TreeNode n=stack.pop(); pushAll(n.right); return n.val; }
To get the next smallest value. We pop the leftmost leaf from the stack. Then we add all its right child's left children to stack. Imagine all left children of a node is popped out. The next will be itself. And the next will be its right child's leftmost child.
public boolean isRunning(){ return mIsRunning; }
Indicates whether Face Unlock is currently running.
public void sendSerialMessage(SerialMessage m,SerialListener reply){ sendMessage(m,reply); }
Forward a preformatted message to the actual interface.
public MariaDbBlob(byte[] bytes){ if (bytes == null) { throw new AssertionError("byte array is null"); } this.blobContent=bytes; this.actualSize=bytes.length; }
creates a blob with content.
public static void warningcallRFFI(Object call,String message){ warningCallInvoke(call,RDataFactory.createStringVectorFromScalar(message)); }
Entry point for Rf_warningCall from RFFI.
public ZeroLengthPath(Scope scope,Var subject,Var object){ this(scope,subject,object,null); }
Creates a zero-length path that matches a subject-, predicate- and object variable against statements from the specified context scope.
@Parameterized.Parameters public static Collection<Object[]> params(){ return Arrays.asList(new Object[][]{{"/?x=y"},{"/robots.txt"},{"/xsl/layout.xsl"},{"/css/main.css"},{"/images/logo.svg"},{"/images/logo.png"}}); }
Params for JUnit.
static public void addTransformHandles(Figure f,Collection<Handle> handles){ handles.add(new BoundsOutlineHandle(f,true,false)); if (f.isTransformable()) { addCornerTransformHandles(f,handles); addEdgeTransformHandles(f,handles); handles.add(new RotateHandle(f)); } }
Adds handles for scaling, moving, rotating and shearing a Figure.
@Deprecated public boolean readInstance(Reader reader) throws IOException { ArffReader arff=new ArffReader(reader,this,m_Lines,1); Instance inst=arff.readInstance(arff.getData(),false); m_Lines=arff.getLineNo(); if (inst != null) { add(inst); return true; } else { return false; } }
Reads a single instance from the reader and appends it to the dataset. Automatically expands the dataset if it is not large enough to hold the instance. This method does not check for carriage return at the end of the line.
public MissingLabelsCondition(ExampleSet exampleSet,String parameterString){ }
Throws an exception since a parameter string is not allowed for this condition.
public int compareTo(Object other){ @SuppressWarnings("unchecked") Ranking<V> otherRanking=(Ranking<V>)other; return Double.compare(otherRanking.rankScore,rankScore); }
Compares two ranking based on the rank score.
public void error(JSONObject message){ try { WritableMap writableMap=SQLitePluginConverter.jsonToReact(message); errorCallback.invoke(writableMap); } catch ( JSONException ex) { errorCallback.invoke("Internal error converting results:" + ex.getMessage()); } }
Helper for error callbacks that just returns the Status.ERROR by default
public synchronized void nominate(CandidatePair pair) throws IllegalStateException { if (!isControlling()) { throw new IllegalStateException("Only controlling agents can nominate pairs"); } Component parentComponent=pair.getParentComponent(); IceMediaStream parentStream=parentComponent.getParentStream(); ...
Raises <tt>pair</tt>'s nomination flag and schedules a triggered check. Applications only need to use this method if they disable this <tt>Agent</tt>'s internal nomination and implement their own nominator and turn off nominations in this agent.
protected void clearEvents(){ sCInterface.clearEvents(); }
This method resets the incoming events (time events included).
public void deleteInstances(){ int[] indices; if (m_TableArff.getSelectedRow() == -1) { return; } indices=m_TableArff.getSelectedRows(); ((ArffSortedTableModel)m_TableArff.getModel()).deleteInstances(indices); }
deletes all the currently selected instances
public void testAllowAccess(){ EndToEndTestUtils.findMenuItem(trackListActivity.getString(R.string.menu_settings),true); EndToEndTestUtils.SOLO.clickOnText(trackListActivity.getString(R.string.settings_advanced)); assertTrue(EndToEndTestUtils.SOLO.waitForText(trackListActivity.getString(R.string.settings_sharing_...
Tests allow access.
private FixedAllocator establishFreeFixedAllocator(final int block){ final ArrayList<FixedAllocator> list=m_freeFixed[block]; for (int i=0; i < list.size(); i++) { FixedAllocator f=list.get(i); if (!isOnCommitList(f)) { list.remove(i); return f; } } final int allocSize=64 * m_allocSizes[...
Called from ContextAllocation when no free FixedAllocator is immediately available. First the free list will be checked to see if one is available, otherwise it will be created. When the calling ContextAllocation is released, its allocators will be added to the global free lists.
private void appendValueAsString(StringBuffer buffer,String value){ buffer.append("\"" + value + "\""); }
Appends the given String in parenthesis to the given StringBuffer.
public void close(){ try { this.connection.close(); } catch ( Exception e) { System.err.println("JdbcXYDataset: swallowing exception."); } }
Close the database connection
private void removeOldCertificateValues(){ final Element toRemove=xadesSignature.getCertificateValues(); if (toRemove != null) { unsignedSignaturePropertiesDom.removeChild(toRemove); xadesSignature.resetCertificateSource(); } }
This method removes old certificates values from the unsigned signature properties element.
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 static Throwable shouldFail(Class clazz,String script){ Throwable th=null; try { GroovyShell shell=new GroovyShell(); shell.evaluate(script,genericScriptName()); } catch ( GroovyRuntimeException gre) { th=ScriptBytecodeAdapter.unwrap(gre); } catch ( Throwable e) { th=e; } if (th ==...
Asserts that the given script fails when it is evaluated and that a particular type of exception is thrown.
public boolean wasLastRunPaused(){ return mPrefs.getBoolean(KEY_LAST_RUN_PAUSED,false); }
Used to determine whether or not the previous browser run crashed. Once the previous state has been determined, the value will be set to false until a pause is received.
private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (xmlWriter.getPrefix(namespace) == null) { xmlWriter.writeNamespace(prefix,namespace); x...
Util method to write an attribute with the ns prefix
private static boolean isViewDescendantOf(View child,View parent){ if (child == parent) { return true; } final ViewParent theParent=child.getParent(); return (theParent instanceof ViewGroup) && isViewDescendantOf((View)theParent,parent); }
Return true if child is a descendant of parent, (or equal to the parent).
public LocalResult(){ }
Construct a local result object.
public static Object newProxyInstance(List<ClassLoader> classLoadersToTry,Class<?>[] minimumSetOfInterfaces,Class<?>[] interfaces,InvocationHandler delegate) throws IllegalArgumentException { Object ret=null; try { ret=newProxyInstance(classLoadersToTry,interfaces,delegate); } catch ( IllegalArgumentExcepti...
Creates a new dynamic proxy instance for the given delegate.
public void paintScrollBarTrackBackground(SynthContext context,Graphics g,int x,int y,int w,int h,int orientation){ paintScrollBarTrackBackground(context,g,x,y,w,h); }
Paints the background of the track of a scrollbar. The track contains the thumb. This implementation invokes the method of the same name without the orientation.
public FrameworkException(){ super(); }
Constructs a new framework exception with no message or cause.
@Post public String handlePost(String fmJson){ IFirewallService firewall=(IFirewallService)getContext().getAttributes().get(IFirewallService.class.getCanonicalName()); String newMask; try { newMask=jsonExtractSubnetMask(fmJson); } catch ( IOException e) { log.error("Error parsing new subnet mask: " + ...
Allows setting of subnet mask
public static String toString(byte[] id){ StringBuilder buff=new StringBuilder(); ByteBuffer idBuffer=ByteBuffer.wrap(id); long length=0; while (idBuffer.hasRemaining()) { long block; int len; switch (idBuffer.get()) { case 0: len=DataUtils.readVarInt(idBuffer); idBuffer.position(idBuffer.posi...
Convert the id to a human readable string.
private XML checksGlobalAbsence(Class<?> aClass){ if (!classExists(aClass)) Error.xmlClassInexistent(this.xmlPath,aClass); if (findXmlClass(aClass).global != null) Error.xmlGlobalExistent(aClass); return this; }
Verifies that the global mapping exist in aClass.