本文整理匯總了Java中net.ssehub.easy.instantiation.core.model.common.VilException.ID_INTERNAL屬性的典型用法代碼示例。如果您正苦於以下問題:Java VilException.ID_INTERNAL屬性的具體用法?Java VilException.ID_INTERNAL怎麽用?Java VilException.ID_INTERNAL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.ssehub.easy.instantiation.core.model.common.VilException
的用法示例。
在下文中一共展示了VilException.ID_INTERNAL屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: CallExpression
/**
* Creates a new transparent call expression from a conversion or optimization operation.
*
* @param operation the operation to be considered
* @param arg the one and only argument
* @throws VilException in case that the operation does not exactly take one argument and provide a result
*/
public CallExpression(OperationDescriptor operation, CallArgument arg) throws VilException {
super(operation.getName(), false);
if (1 != operation.getParameterCount()) {
throw new VilException("operation " + operation.getJavaSignature()
+ " does not accept exactly one parameter", VilException.ID_INTERNAL);
}
if (TypeRegistry.voidType() == operation.getReturnType()) {
throw new VilException("operation " + operation.getJavaSignature()
+ " does not return a return value", VilException.ID_INTERNAL);
}
resolved = operation;
callType = CallType.TRANSPARENT;
arguments = new CallArgument[1];
arguments[0] = arg;
}
示例2: setFields
/**
* Sets the fields of this descriptor, only if there have no fields been defined at all so far.
*
* @param slots the slots defining the fields
* @throws VilException in case that fields have been defined already
*/
public void setFields(SlotDescriptor[] slots) throws VilException {
if (isFieldsNull()) {
super.setFields(slots);
} else {
throw new VilException("Fields are already defined", VilException.ID_INTERNAL);
}
}
示例3: accept
/**
* Visits the expression in this argument. [convenience]
*
* @param visitor the visitor
* @return the result of visiting this expression (may be <b>null</b>)
* @throws VilException in case that visiting fails (e.g., execution)
*/
public Object accept(IExpressionVisitor visitor) throws VilException {
Object result;
if (fixed) {
result = fixedValue;
} else {
if (null == expr) {
throw new VilException("expr is null", VilException.ID_INTERNAL);
}
result = expr.accept(visitor);
}
return result;
}
示例4: AbstractCallExpression
/**
* Creates an instance from the given call name.
*
* @param name the name of the call
* @param unqualify reduce the name into name and prefix if possible, else leave name untouched
* @throws VilException in case of an illegal qualified name
*/
protected AbstractCallExpression(String name, boolean unqualify) throws VilException {
this.name = name;
if (unqualify && null != name) {
int pos = name.lastIndexOf(Constants.QUALIFICATION_SEPARATOR);
if (pos > 0) {
this.prefix = name.substring(0, pos);
this.name = name.substring(pos + 2, name.length());
if (0 == this.name.length()) {
throw new VilException("illegal qualified name " + name, VilException.ID_INTERNAL);
}
}
}
}
示例5: inferType
@Override
public TypeDescriptor<?> inferType() throws VilException {
TypeDescriptor<?> result;
switch (type) {
case EXECUTE:
result = inferTypeExecute();
break;
case INSTANTIATOR:
result = super.inferType(); // via determineOperand!
break;
default:
throw new VilException("illegal strategy type " + type, VilException.ID_INTERNAL);
}
return result;
}
示例6: setPostprocessing
/**
* Defines the element of the postprocessing part.
*
* @param block the elements of the postprocessing part
*/
public void setPostprocessing(final IRuleElement[] block) {
if (null != block) {
postProcessing = new IRuleBlock() {
private IRuleElement[] elements = block;
@Override
public boolean isVirtual() {
return true;
}
@Override
public int getBodyElementCount() {
return elements.length;
}
@Override
public IRuleElement getBodyElement(int index) {
return elements[index];
}
@Override
public void addBodyElement(int index, IRuleElement element) throws VilException {
throw new VilException("unsupported", VilException.ID_INTERNAL);
}
@Override
public boolean returnActualValue() {
return false;
}
};
}
}
示例7: createExpression
/**
* Parses <code>text</code> into an expression.
*
* @param text the text to be parsed
* @param environment the runtime environment for resolving variables
* @param an optional buffer to collect warnings
* @return the resulting expression
* @throws VilException in case that parsing fails
*/
public Expression createExpression(String text, Resolver resolver, StringBuilder warnings) throws VilException {
Expression result = null;
IParseResult parseResult = parseFragment("Expression", text);
if (null != parseResult) {
StringBuilder errors = new StringBuilder();
for (INode error : parseResult.getSyntaxErrors()) {
appendWithNewLine(errors, error.getText());
}
if (0 == errors.length()) {
if (null == parseResult.getRootASTElement()) {
appendWithNewLine(errors, "empty expression");
}
}
if (0 == errors.length()) {
ExpressionTranslator translator = new ExpressionTranslator();
de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression expr =
(de.uni_hildesheim.sse.vil.expressions.expressionDsl.Expression) parseResult.getRootASTElement();
translator.enactIvmlWarnings();
try {
result = translator.processExpression(expr, resolver);
for (int i = 0; i < translator.getMessageCount(); i++) {
Message msg = translator.getMessage(i);
if (Status.ERROR == msg.getStatus()) {
appendWithNewLine(errors, msg.getDescription());
} else {
if (null != warnings) {
appendWithNewLine(warnings, msg.getDescription());
}
}
}
if (translator.getErrorCount() > 0) {
throw new VilException(errors.toString(), VilException.ID_INTERNAL);
}
} catch (TranslatorException e) {
throw new VilException(e, e.getId());
}
}
}
return result;
}
示例8: visitVariableDeclaration
@Override
public Object visitVariableDeclaration(VariableDeclaration var) throws VilException {
throw new VilException("not an expression", VilException.ID_INTERNAL);
}
示例9: visitLoop
@Override
public Object visitLoop(LoopStatement loop) throws VilException {
throw new VilException("not an expression", VilException.ID_INTERNAL);
}
示例10: visitTemplate
@Override
public Object visitTemplate(Template template) throws VilException {
throw new VilException("not an expression", VilException.ID_INTERNAL);
}
示例11: visitLoadProperties
@Override
public Object visitLoadProperties(LoadProperties properties) throws VilException {
throw new VilException("not an expression", VilException.ID_INTERNAL);
}
示例12: visitRule
@Override
public Object visitRule(Rule rule) throws VilException {
throw new VilException("not an expression", VilException.ID_INTERNAL);
}
示例13: addBodyElement
@Override
public void addBodyElement(int index, IRuleElement element) throws VilException {
throw new VilException("cannot add to a simple statement", VilException.ID_INTERNAL);
}
示例14: visitJoinVariableDeclaration
@Override
public Object visitJoinVariableDeclaration(JoinVariableDeclaration decl) throws VilException {
throw new VilException("not an expression", VilException.ID_INTERNAL);
}
示例15: visitCompound
@Override
public Object visitCompound(net.ssehub.easy.instantiation.core.model.common.Compound compound) throws VilException {
throw new VilException("not an expression", VilException.ID_INTERNAL);
}