/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends NumericalValueValidator { @Pure @Override public @Nonnull String getComparisonOperator() { return "<"; } }
/** * This error indicates that the runtime system does not support a required feature. */ @Immutable public abstract class SupportError extends InitializationError { /* -------------------------------------------------- Cause -------------------------------------------------- */ @Pure @Override public abstract @Nonnull Throwable getCause(); }
/** * Classes with a non-reentrant lock should implement this interface. */ @Mutable public interface Locking { /** * Returns whether the lock is held by the current thread. */ @Pure public boolean isLockHeldByCurrentThread(); }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator implements ValueAnnotationValidator { @Pure @Override public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) { return Contract.with((ProcessingUtility.getType(element).getKind().isPrimitive() ? "" : "# == null || ") + "!String.valueOf(#).equals(\"@\")", "The # may not equal '@' but was $.", element, annotationMirror); } }
/** * This exception allows to tunnel checked exceptions through the methods of {@link Iterable}. */ @Immutable public abstract class IterationException extends UncheckedException {}
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends ElementsValidator {}
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends FileValidator { @Pure @Override public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) { return Contract.with("# == null || !#.exists() || #.isDirectory()", "The # $ has to be a directory.", element); } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends NestingKindValidator { @Pure @Override public @Nonnull NestingKind getKind() { return NestingKind.LOCAL; } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends ValueRelativeNumericalValueValidator { @Pure @Override public @Nonnull String getComparisonOperator() { return "<="; } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends NumericalValueValidator { @Pure @Override public @Nonnull String getComparisonOperator() { return ">"; } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends FileValidator { @Pure @Override public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) { return Contract.with("# == null || !#.exists() || System.getProperty(\"os.name\").startsWith(\"Windows\") || !#.canExecute()", "The # $ may not be executable.", element); } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends ElementKindValidator { @Pure @Override public @Nonnull ElementKind getKind() { return ElementKind.ANNOTATION_TYPE; } }
/** * This type visitor returns the simple name of the given type without generic parameters. */ @Stateless public static class SimpleNameTypeVisitor extends QualifiedNameTypeVisitor { protected SimpleNameTypeVisitor() {} @Pure @Override public @Nonnull String visitDeclared(@Nonnull DeclaredType type, @Nullable Void none) { return type.asElement().getSimpleName().toString(); } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends ValueRelativeNumericalValueValidator { @Pure @Override public @Nonnull String getComparisonOperator() { return ">"; } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends FileValidator { @Pure @Override public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) { return Contract.with("# == null || !#.exists() || System.getProperty(\"os.name\").startsWith(\"Windows\") || #.canExecute()", "The # $ has to be executable.", element); } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends ElementKindValidator { @Pure @Override public @Nonnull ElementKind getKind() { return ElementKind.ENUM; } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends ElementKindValidator { @Pure @Override public @Nonnull ElementKind getKind() { return ElementKind.INTERFACE; } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends FileValidator { @Pure @Override public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) { return Contract.with("# == null || System.getProperty(\"os.name\").startsWith(\"Windows\") || !#.isHidden()", "The # $ has to be visible.", element); } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends FileValidator { @Pure @Override public @Nonnull Contract generateContract(@Nonnull Element element, @Nonnull AnnotationMirror annotationMirror, @NonCaptured @Modified @Nonnull TypeImporter typeImporter) { return Contract.with("# == null || !#.isAbsolute()", "The path of the # $ has to be relative.", element); } }
/** * This class checks the use of and generates the contract for the surrounding annotation. */ @Stateless public static class Validator extends NumericalValueValidator { @Pure @Override public @Nonnull String getComparisonOperator() { return ">="; } }