@FinalFieldsConstructor private static class SwitchContext extends Context { private boolean validationMode; public SwitchContext(final JvmTypeReference expectedType, final ClassFinder classFinder, final Map<String, JvmIdentifiableElement> visibleFeatures, final Set<XExpression> alreadyEvaluating) { super(expectedType, classFinder, visibleFeatures, alreadyEvaluating); } }
@FinalFieldsConstructor @Accessors protected static class SuperGrammar extends AdapterImpl { private final Grammar grammar; @Override public boolean isAdapterForType(final Object type) { return (type == SemanticSequencerExtensions.SuperGrammar.class); } public SuperGrammar(final Grammar grammar) { super(); this.grammar = grammar; } @Pure public Grammar getGrammar() { return this.grammar; } }
/** * @author kosyakov - Initial contribution and API * @since 2.10 */ @Accessors @SuppressWarnings("all") public class DefaultHierarchyRoot implements IHierarchyRoot { private final List<IHierarchyNode> roots = CollectionLiterals.<IHierarchyNode>newArrayList(); @Pure public List<IHierarchyNode> getRoots() { return this.roots; } }
protected void _transform(final MutableFieldDeclaration it, @Extension final TransformationContext context) { @Extension final AccessorsProcessor.Util util = new AccessorsProcessor.Util(context); boolean _shouldAddGetter = util.shouldAddGetter(it); if (_shouldAddGetter) { util.addGetter(it, util.toVisibility(util.getGetterType(it))); } boolean _shouldAddSetter = util.shouldAddSetter(it); if (_shouldAddSetter) { util.addSetter(it, util.toVisibility(util.getSetterType(it))); } }
@Delegate public GlobalTypeLookup getGlobalTypeLookup() { return this.unit.getTypeLookup(); }
protected boolean _isValidDelegate(final MethodDeclaration it) { return (((this.hasValidType(it) && this.hasValidSignature(it)) && (!this.hasDelegationConflicts(it))) && this.areListedInterfacesValid(it)); }
protected boolean _isValidDelegate(final FieldDeclaration it) { return ((this.hasValidType(it) && (!this.hasDelegationConflicts(it))) && this.areListedInterfacesValid(it)); }
public boolean shouldAddGetter(final FieldDeclaration it) { return ((!this.hasGetter(it)) && (this.getGetterType(it) != AccessorType.NONE)); }
protected void _transform(final MutableConstructorDeclaration it, @Extension final TransformationContext context) { @Extension final FinalFieldsConstructorProcessor.Util util = new FinalFieldsConstructorProcessor.Util(context); util.makeFinalFieldsConstructor(it); }
@FinalFieldsConstructor public static class Result { @Accessors private final Set<CategorizedProblem> compilationProblems = CollectionLiterals.<CategorizedProblem>newLinkedHashSet(); private final HashMap<String, byte[]> classMap = new HashMap<String, byte[]>(); private final ClassLoader parentClassLoader; public ClassLoader getClassLoader() { return new InMemoryJavaCompiler.ByteClassLoader(this.classMap, this.parentClassLoader); } public Result(final ClassLoader parentClassLoader) { super(); this.parentClassLoader = parentClassLoader; } @Pure public Set<CategorizedProblem> getCompilationProblems() { return this.compilationProblems; } }
@FinalFieldsConstructor public static class FactoryImpl extends EcoreResourceFactoryImpl { public static final String ECORE_SUFFIX = "ecore"; private final Wrapper<Boolean> isSaving; @Override public Resource createResource(final URI uri) { return new FragmentFakingEcoreResource(uri, this.isSaving); } public FactoryImpl(final Wrapper<Boolean> isSaving) { super(); this.isSaving = isSaving; } }
/** * A fragment that generates a class that inherits from the generated class of the super-grammar. * This inheritance can be disabled with the {@code inheritImplementation} property. */ @SuppressWarnings("all") public abstract class AbstractInheritingFragment extends AbstractStubGeneratingFragment { @Accessors private boolean inheritImplementation = true; @Pure public boolean isInheritImplementation() { return this.inheritImplementation; } public void setInheritImplementation(final boolean inheritImplementation) { this.inheritImplementation = inheritImplementation; } }
@FinalFieldsConstructor public static class QualifiedClassName { @Accessors(AccessorType.PUBLIC_GETTER) private final String packageName; @Accessors(AccessorType.PUBLIC_GETTER) private final String className; @Pure public String getPackageName() { return this.packageName; } @Pure public String getClassName() { return this.className; } public QualifiedClassName(final String packageName, final String className) { super(); this.packageName = packageName; this.className = className; } }
@FinalFieldsConstructor protected static class Entry { private final ProjectDescription description; private boolean marked; private boolean cyclic; @Override public String toString() { return this.description.getName(); } public Entry(final ProjectDescription description) { super(); this.description = description; } }
@SuppressWarnings("all") class CompositeGeneratorException extends RuntimeException { @Accessors private final List<Exception> exceptions = CollectionLiterals.<Exception>newArrayList(); public boolean addException(final Exception exception) { return this.exceptions.add(exception); } public boolean hasExceptions() { int _size = this.exceptions.size(); return (_size > 0); } @Pure public List<Exception> getExceptions() { return this.exceptions; } }
/** * Use this class to register additional components to be used within the web application. */ @FinalFieldsConstructor @SuppressWarnings("all") public class InformationModelWebModule extends AbstractInformationModelWebModule { public Class<? extends IWebResourceSetProvider> bindIWebResourceSetProvider() { return WebEditorResourceSetProvider.class; } public Class<? extends IServerResourceHandler> bindIServerResourceHandler() { return HashMapResourceHandler.class; } public InformationModelWebModule(final Provider<ExecutorService> arg0) { super(arg0); } }
@SuppressWarnings("all") public class ApiTokenAuthenticator implements Authenticator<String, User> { @Accessors(AccessorType.PUBLIC_SETTER) private String apiToken; @Override public Optional<User> authenticate(final String credentials) throws AuthenticationException { if (((!StringExtensions.isNullOrEmpty(this.apiToken)) && Objects.equal(credentials, this.apiToken))) { User _user = new User("_apiToken", "apiToken", "api.token@example.com"); return Optional.<User>of(_user); } else { return Optional.<User>empty(); } } public void setApiToken(final String apiToken) { this.apiToken = apiToken; } }
@FinalFieldsConstructor public static class BufferedCancelIndicator implements CancelIndicator { private final CancelIndicator delegate; private Long canceledSince; @Override public boolean isCanceled() { if (((this.canceledSince == null) && this.delegate.isCanceled())) { this.canceledSince = Long.valueOf(System.currentTimeMillis()); return false; } return ((this.canceledSince != null) && (System.currentTimeMillis() > ((this.canceledSince).longValue() + 1000))); } public BufferedCancelIndicator(final CancelIndicator delegate) { super(); this.delegate = delegate; } }
@FinalFieldsConstructor protected static class LineSeparatorModule extends XtextRuntimeModule { private final ILineSeparatorInformation lineSeparatorInformation; @Override public void configure(final Binder binder) { final CompoundModule compound = this.getBindings(); compound.configure(binder); } public ILineSeparatorInformation bindILineSeparatorInformation() { return this.lineSeparatorInformation; } public LineSeparatorModule(final ILineSeparatorInformation lineSeparatorInformation) { super(); this.lineSeparatorInformation = lineSeparatorInformation; } }
/** * Use this class to register additional components to be used within the web application. */ @FinalFieldsConstructor @SuppressWarnings("all") public class DatatypeWebModule extends AbstractDatatypeWebModule { public Class<? extends IWebResourceSetProvider> bindIWebResourceSetProvider() { return WebEditorResourceSetProvider.class; } public Class<? extends IServerResourceHandler> bindIServerResourceHandler() { return HashMapResourceHandler.class; } public DatatypeWebModule(final Provider<ExecutorService> arg0) { super(arg0); } }