/** * Equivalent to {@code NANOSECONDS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toNanos(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code HOURS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toHours(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code MILLISECONDS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toMillis(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code MINUTES.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toMinutes(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code DAYS.convert(duration, this)}. * @param duration the duration * @return the converted duration * @see #convert */ public long toDays(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code MICROSECONDS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toMicros(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code SECONDS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toSeconds(long duration) { throw new AbstractMethodError(); }
/** * Convert the given time duration in the given unit to this * unit. Conversions from finer to coarser granularities * truncate, so lose precision. For example converting * {@code 999} milliseconds to seconds results in * {@code 0}. Conversions from coarser to finer granularities * with arguments that would numerically overflow saturate to * {@code Long.MIN_VALUE} if negative or {@code Long.MAX_VALUE} * if positive. * * <p>For example, to convert 10 minutes to milliseconds, use: * {@code TimeUnit.MILLISECONDS.convert(10L, TimeUnit.MINUTES)} * * @param sourceDuration the time duration in the given {@code sourceUnit} * @param sourceUnit the unit of the {@code sourceDuration} argument * @return the converted duration in this unit, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. */ public long convert(long sourceDuration, TimeUnit2 sourceUnit) { throw new AbstractMethodError(); }
/** * Convert the given time duration in the given unit to this * unit. Conversions from finer to coarser granularities * truncate, so lose precision. For example converting * {@code 999} milliseconds to seconds results in * {@code 0}. Conversions from coarser to finer granularities * with arguments that would numerically overflow saturate to * {@code Long.MIN_VALUE} if negative or {@code Long.MAX_VALUE} * if positive. * * <p>For example, to convert 10 minutes to milliseconds, use: * {@code TimeUnit.MILLISECONDS.convert(10L, TimeUnit.MINUTES)} * * @param sourceDuration the time duration in the given {@code sourceUnit} * @param sourceUnit the unit of the {@code sourceDuration} argument * @return the converted duration in this unit, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. */ public long convert(long sourceDuration, TimeUnit sourceUnit) { throw new AbstractMethodError(); }
/** * Equivalent to {@code MICROSECONDS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toMicros(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code SECONDS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toSeconds(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code NANOSECONDS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert */ public long toNanos(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code MINUTES.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert * @since 1.6 */ public long toMinutes(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code HOURS.convert(duration, this)}. * @param duration the duration * @return the converted duration, * or {@code Long.MIN_VALUE} if conversion would negatively * overflow, or {@code Long.MAX_VALUE} if it would positively overflow. * @see #convert * @since 1.6 */ public long toHours(long duration) { throw new AbstractMethodError(); }
/** * Equivalent to {@code DAYS.convert(duration, this)}. * @param duration the duration * @return the converted duration * @see #convert * @since 1.6 */ public long toDays(long duration) { throw new AbstractMethodError(); }
/** * @deprecated * Use {@link #perform(AbstractBuild, Launcher, BuildListener)} instead. */ @Deprecated public boolean perform(Build<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { if (build instanceof AbstractBuild && Util.isOverridden(BuildStepCompatibilityLayer.class, this.getClass(), "perform", AbstractBuild.class, Launcher.class, BuildListener.class)) { return perform((AbstractBuild<?, ?>) build, launcher, listener); } throw new AbstractMethodError(); }
/** * @since 1.568 */ public ChangeLogSet<? extends Entry> parse(Run build, RepositoryBrowser<?> browser, File changelogFile) throws IOException, SAXException { if (build instanceof AbstractBuild && Util.isOverridden(ChangeLogParser.class, getClass(), "parse", AbstractBuild.class, File.class)) { return parse((AbstractBuild) build, changelogFile); } else { throw new AbstractMethodError("You must override the newer overload of parse"); } }
/** * Determines the identity in which the {@link hudson.model.Queue.Executable} will run as. * The default implementation delegates to {@link #authenticate(hudson.model.Queue.Task)}. * @param item * The contextual information to assist the authentication. * The primary interest is likely {@link hudson.model.Queue.Item#task}, which is often {@link AbstractProject}. * {@link Action}s associated with the item is also likely of interest, such as {@link CauseAction}. * * @return * returning non-null will determine the identity. If null is returned, the next * configured {@link QueueItemAuthenticator} will be given a chance to authenticate * the executor. If everything fails, fall back to {@link Task#getDefaultAuthentication()}. */ public @CheckForNull Authentication authenticate(Queue.Item item) { if (Util.isOverridden(QueueItemAuthenticator.class, getClass(), "authenticate", Queue.Task.class)) { return authenticate(item.task); } else { throw new AbstractMethodError("you must override at least one of the QueueItemAuthenticator.authenticate methods"); } }
/** * Determines the identity in which the {@link hudson.model.Queue.Executable} will run as. * The default implementation delegates to {@link #authenticate(hudson.model.Queue.Item)} (there will be no associated actions). * @param task * Often {@link AbstractProject}. * * @return * returning non-null will determine the identity. If null is returned, the next * configured {@link QueueItemAuthenticator} will be given a chance to authenticate * the executor. If everything fails, fall back to {@link Task#getDefaultAuthentication()}. * @since 1.560 */ public @CheckForNull Authentication authenticate(Queue.Task task) { if (Util.isOverridden(QueueItemAuthenticator.class, getClass(), "authenticate", Queue.Item.class)) { // Need a fake (unscheduled) item. All the other calls assume a BuildableItem but probably it does not matter. return authenticate(new Queue.WaitingItem(Calendar.getInstance(), task, Collections.<Action>emptyList())); } else { throw new AbstractMethodError("you must override at least one of the QueueItemAuthenticator.authenticate methods"); } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ( method.getName().equals( "getSchema" ) && args == null ) { if ( schemaName != null ) { return schemaName; } throw new AbstractMethodError( "getSchema is not implemented" ); } else if ( method.getName().equals( "createStatement" ) && args == null ) { return StatementProxy.generateProxy( new StatementProxy() ); } throw new UnsupportedOperationException( "Unexpected call ResultSet." + method.getName() ); } }