Evalute the Pure annotatino adapters.

@param operation the operation to adapt.
@param context the context.
@return {@code true} if the pure annotation could be associated to the given operation.
974678
boolean evaluatePureAnnotationAdapters(org.eclipse.xtext.common.types.JvmOperation operation, ISideEffectContext context) {
		int index = -1;
		int i = 0;
		for (final Adapter adapter : operation.eAdapters()) {
			if (adapter.isAdapterForType(AnnotationJavaGenerationAdapter.class)) {
				index = i;
				break;
			}
			++i;
		}
		if (index >= 0) {
			final AnnotationJavaGenerationAdapter annotationAdapter = (AnnotationJavaGenerationAdapter) operation.eAdapters().get(index);
			assert annotationAdapter != null;
			return annotationAdapter.applyAdaptations(this, operation, context);
		}
		return false;
	}
919622
@Override
	public Element execute(Context context) {
		Element result = Undef.VALUE;
		for (Operation op : ops) {
			try {
				result = op.execute(context);
			} catch (EvaluationException ee) {
				throw ee.addExceptionInfo(sourceRange, context);
			}
		}
		return result;
	}
208827
@Override
    protected final void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
        throw new UnsupportedOperationException();
    }
66015
public static boolean hasValidContentAdditionParameterDefined(ModelNode operation) {
        for (String s : DeploymentAttributes.MANAGED_CONTENT_ATTRIBUTES.keySet()) {
            if (operation.hasDefined(s)) {
                return true;
            }
        }
        return false;
    }
995925
@Override
    public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
        final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR));
        ListIterator<PathElement> iterator = address.iterator();
        PathElement element = iterator.next();
        while (!element.getValue().equals(InfinispanSubsystem.SUBSYSTEM_NAME)) {
            element = iterator.next();
        }
        final String cacheContainerName = iterator.next().getValue();
        final String cacheName = iterator.next().getValue();
        if (context.isNormalServer()) {
            final ServiceController<?> controller = context.getServiceRegistry(false).getService(CacheServiceName.CACHE.getServiceName(cacheContainerName, cacheName));
            Cache<?, ?> cache = (Cache<?, ?>) controller.getValue();

            ModelNode operationResult;
            try {
                operationResult = invokeCommand(cache, operation, context);
            } catch (Exception e) {
                throw new OperationFailedException(MESSAGES.failedToInvokeOperation(e.getLocalizedMessage()), e);
            }
            if (operationResult != null) {
                context.getResult().set(operationResult);
            }
        }
    }
809803
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSInt cmd_index_validator = new MPSInt();
		cmd_index_validator.validate(operationType, cmd_index, "\"cmd_index\"");
		
		MPSString command_validator = new MPSString();
		command_validator.validate(operationType, command, "\"command\"");
		
	}
135965
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString id_validator = new MPSString();
		id_validator.setConstraintIsReq(MPSConstants.DELETE_CONSTRAINT, true);
		id_validator.setConstraintIsReq(MPSConstants.MODIFY_CONSTRAINT, true);
		id_validator.validate(operationType, id, "\"id\"");
		
		MPSInt adapter_id_validator = new MPSInt();
		adapter_id_validator.validate(operationType, adapter_id, "\"adapter_id\"");
		
		MPSInt pdcount_validator = new MPSInt();
		pdcount_validator.validate(operationType, pdcount, "\"pdcount\"");
		
		MPSInt ldcount_validator = new MPSInt();
		ldcount_validator.validate(operationType, ldcount, "\"ldcount\"");
		
	}
101964
@Override
	@SuppressWarnings({ "rawtypes" })
	public void accept(final TransformContext transformContext) {
		Object var = eval(transformContext);

		if (var == null) {
			throw new ParameterNotFoundRuntimeException("Parameter is not set. [" + expression + "]");
		} else if (var instanceof List) {
			bindArray(transformContext, ((List) var).toArray());
		} else if (var.getClass().isArray()) {
			bindArray(transformContext, var);
		} else {
			bindArray(transformContext, new Object[] { var });
		}
		pass();
	}
277740
@SuppressWarnings({"unchecked", "vararg"})
    public static Filter<InstanceField> annotatedBy(final Class<? extends Annotation>... annotations) {
        return new Filter<InstanceField>() {
            public boolean isOut(InstanceField instanceField) {
                Checks.checkNotNull(annotations, "Provide at least one annotation class");

                for (Class<? extends Annotation> annotation : annotations) {
                    if(instanceField.isAnnotatedBy(annotation)) {
                        return false;
                    }
                }
                return true;
            }
        };
    }
1283583
private boolean isSupportedAnnotation(final Annotation anno) {

        final String name = anno.annotationType().getName();
        if(name.startsWith("java.lang.annotation.")) {
            return false;
        }

        return true;
    }
801865
private void applyExecute(ExecuteOperation operation) {
    Session session = context.getOrCreateSession(operation.session(), operation.node());
    if (operation.operation() != null) {
      try {
        context.service().apply(new DefaultCommit<>(
            context.setIndex(operation.index()),
            operation.operation().id(),
            operation.operation().value(),
            context.setSession(session),
            context.setTimestamp(operation.timestamp())));
      } catch (Exception e) {
        log.warn("Failed to apply operation: {}", e);
      } finally {
        context.setSession(null);
      }
    }
  }
1093944
@Override
    public void planOperation(Runnable operation) {
        operations.add(operation);

        if (operation instanceof AbstractOperation) {
            ExecutionEntity execution = ((AbstractOperation) operation).getExecution();
            if (execution != null) {
                commandContext.addInvolvedExecution(execution);
            }
        }

        logger.debug("Operation {} added to agenda", operation.getClass());
    }
218532
public JsonObject getJSONwithOperations(TreeContext context, ITree tree, List<Operation> operations) {

		OperationNodePainter opNodePainter = new OperationNodePainter(operations);
		Collection<NodePainter> painters = new ArrayList<NodePainter>();
		painters.add(opNodePainter);
		return getJSONwithCustorLabels(context, tree, painters);
	}
1149974
public void setOperation(String operation) throws ApplicationException {
	if (StringUtil.isEmpty(operation)) return;
	operation = operation.toLowerCase().trim();
	if (!operation.equals("httprequest")) throw new ApplicationException("attribute operation must have the value [HTTPRequest]");
    }
388035
public static ModelNode createOperation(final String operation) {
        final ModelNode op = new ModelNode();
        op.get(OP).set(operation);
        op.get(OP_ADDR).setEmptyList();
        return op;
    }
910230
static SpatialOperation parseSpatialOperation(String operation) {
        if (operation == null) {
            throw new IndexException("Operation is required");
        } else if (operation.equalsIgnoreCase("is_within")) {
            return SpatialOperation.IsWithin;
        } else if (operation.equalsIgnoreCase("contains")) {
            return SpatialOperation.Contains;
        } else if (operation.equalsIgnoreCase("intersects")) {
            return SpatialOperation.Intersects;
        } else {
            throw new IndexException("Operation is invalid: {}", operation);
        }
    }
477184
private void applyPathOperationComponent(MarkupDocBuilder markupDocBuilder, PathOperation operation) {
        if (operation != null) {
            pathOperationComponent.apply(markupDocBuilder, PathOperationComponent.parameters(operation));
        }
    }