private ClassName bindingClassName(ClassName adapterName, ExecutableElement providerMethod, Map<ExecutableElement, ClassName> methodToClassName, Map<String, AtomicInteger> methodNameToNextId) { ClassName className = methodToClassName.get(providerMethod); if (className != null) return className; String methodName = providerMethod.getSimpleName().toString(); String suffix = ""; AtomicInteger id = methodNameToNextId.get(methodName); if (id == null) { methodNameToNextId.put(methodName, new AtomicInteger(2)); } else { suffix = id.toString(); id.incrementAndGet(); } String uppercaseMethodName = Character.toUpperCase(methodName.charAt(0)) + methodName.substring(1); className = adapterName.nestedClass(uppercaseMethodName + "ProvidesAdapter" + suffix); methodToClassName.put(providerMethod, className); return className; }
/** * 写出方法信息 */ public synchronized static void flushMethodData() { fileWriter.append("instrumentclass:"); fileWriter.append(Profiler.instrumentClassCount.toString()); fileWriter.append(" instrumentmethod:"); fileWriter.append(Profiler.instrumentMethodCount.toString()); fileWriter.append("\n"); Vector<MethodInfo> vector = mCacheMethods; int size = vector.size(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < size; i++) { sb.append(i); sb.append(' '); sb.append(vector.get(i).toString()); sb.append('\n'); fileWriter.append(sb.toString()); sb.setLength(0); if ((i % 50) == 0) { fileWriter.flushAppend(); } } fileWriter.flushAppend(); } }
assertTrue(reCount.toString(), reCount.get() >= store.getNumThreads() && reCount.get() < thread.length);
/** * This method is used to convert the provided value into an XML * usable format. This is used in the serialization process when * there is a need to convert a field value in to a string so * that that value can be written as a valid XML entity. * * @param value this is the value to be converted to a string * * @return this is the string representation of the given value */ public String write(AtomicInteger value) { return value.toString(); } }
public String toString() { return i.toString(); }
/** * This method is used to convert the provided value into an XML * usable format. This is used in the serialization process when * there is a need to convert a field value in to a string so * that that value can be written as a valid XML entity. * * @param value this is the value to be converted to a string * * @return this is the string representation of the given value */ public String write(AtomicInteger value) { return value.toString(); } }
public String toString() { return i.toString(); }
public void writePrimitiveForm(Object o, Writer output) throws IOException { AtomicInteger value = (AtomicInteger) o; output.write(value.toString()); } }
void releaseLock() { synchronized (this) { locks.decrementAndGet(); if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, "{0} locks count == {1}", new Object[]{logPrefix, locks.toString()}); // NOI18N } } }
void addLock() throws IllegalStateException { synchronized (this) { if (stopped) { throw new IllegalStateException("er_print is scheduled to be stopped already!"); // NOI18N } locks.incrementAndGet(); if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, "{0}locks count == {1}", new Object[]{logPrefix, locks.toString()}); // NOI18N } } }
public String listRemovedReferenceToString() { if (classesRemoved == null) { return ""; } final StringBuilder builder = new StringBuilder(500); builder.append("List of classes removed in Java layer:\n"); for (Entry<String, AtomicInteger> entry : classesRemoved.entrySet()) { builder.append(" - ").append(entry.getKey()).append(": ").append(entry.getValue().toString()).append("\n"); } return builder.toString(); }
public String listKeptReferenceToString() { if (classesKept == null) { return ""; } final StringBuilder builder = new StringBuilder(500); builder.append("List of classes kept in Java layer:\n"); for (Entry<String, AtomicInteger> entry : classesKept.entrySet()) { builder.append(" - ").append(entry.getKey()).append(": ").append(entry.getValue().toString()).append("\n"); } return builder.toString(); }
public void write(Object obj, boolean showType, Writer output) throws IOException { if (showType) { AtomicInteger value = (AtomicInteger) obj; output.write("\"value\":"); output.write(value.toString()); } else { writePrimitiveForm(obj, output); } }
@Override public void endRDF() throws RDFHandlerException { this.logger.debug("Parsed {} statements", this.statementCount.toString()); try { this.endModel(); } catch(final SAXException e) { throw new RDFHandlerException(e); } }
@Override public boolean authenticate(String username, String password, ServerSession session) throws PasswordChangeRequiredException { if (attemptsCount.incrementAndGet() == 1) { throw new PasswordChangeRequiredException(attemptsCount.toString(), getCurrentTestName(), ServerFactoryManager.DEFAULT_WELCOME_BANNER_LANGUAGE); } return delegate.authenticate(username, password, session); } });
@Override public boolean authenticate(String username, String password, ServerSession session) throws PasswordChangeRequiredException { if (attemptsCount.incrementAndGet() == 1) { throw new PasswordChangeRequiredException(attemptsCount.toString(), getCurrentTestName(), ServerFactoryManager.DEFAULT_WELCOME_BANNER_LANGUAGE); } return delegate.authenticate(username, password, session); } });
@Override public boolean authenticate(String username, String password, ServerSession session) throws PasswordChangeRequiredException { if (attemptsCount.incrementAndGet() == 1) { throw new PasswordChangeRequiredException(attemptsCount.toString(), getCurrentTestName(), ServerFactoryManager.DEFAULT_WELCOME_BANNER_LANGUAGE); } return delegate.authenticate(username, password, session); } });
@Override public boolean authenticate(String username, String password, ServerSession session) throws PasswordChangeRequiredException { if (attemptsCount.incrementAndGet() == 1) { throw new PasswordChangeRequiredException(attemptsCount.toString(), getCurrentTestName(), ServerFactoryManager.DEFAULT_WELCOME_BANNER_LANGUAGE); } return delegate.authenticate(username, password, session); } });
@Override public boolean authenticate(String username, String password, ServerSession session) throws PasswordChangeRequiredException { if (attemptsCount.incrementAndGet() == 1) { throw new PasswordChangeRequiredException(attemptsCount.toString(), getCurrentTestName(), ServerFactoryManager.DEFAULT_WELCOME_BANNER_LANGUAGE); } return delegate.authenticate(username, password, session); } });
@Override public boolean authenticate(String username, String password, ServerSession session) throws PasswordChangeRequiredException { if (attemptsCount.incrementAndGet() == 1) { throw new PasswordChangeRequiredException(attemptsCount.toString(), getCurrentTestName(), ServerFactoryManager.DEFAULT_WELCOME_BANNER_LANGUAGE); } return delegate.authenticate(username, password, session); } });