当前位置: 首页>>代码示例>>Java>>正文


Java OutputPin类代码示例

本文整理汇总了Java中org.eclipse.uml2.uml.OutputPin的典型用法代码示例。如果您正苦于以下问题:Java OutputPin类的具体用法?Java OutputPin怎么用?Java OutputPin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OutputPin类属于org.eclipse.uml2.uml包,在下文中一共展示了OutputPin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
private void init() {

		createdClassDependencies = new LinkedList<String>();

		tempVariableExporter = new OutVariableExporter();
		userVariableExporter = new UserVariableExporter();
		returnOutputsToCallActions = new HashMap<CallOperationAction, OutputPin>();
		objectMap = new HashMap<CreateObjectAction, String>();
		activityExportResolver = new ActivityNodeResolver(objectMap, returnOutputsToCallActions, tempVariableExporter,
				userVariableExporter);
		returnNodeExporter = new ReturnNodeExporter(activityExportResolver);
		callOperationExporter = new CallOperationExporter(tempVariableExporter, returnOutputsToCallActions,
				activityExportResolver);
		linkActionExporter = new LinkActionExporter(tempVariableExporter, activityExportResolver);
		objectActionExporter = new ObjectActionExporter(tempVariableExporter, objectMap, activityExportResolver,
				createdClassDependencies);
		controlNodeExporter = new StructuredControlNodeExporter(this, activityExportResolver, userVariableExporter,
				returnNodeExporter);

	}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:21,代码来源:ActivityExporter.java

示例2: caseAExtentIdentifierExpression

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
@Override
public void caseAExtentIdentifierExpression(AExtentIdentifierExpression node) {
    String classifierName = TextUMLCore.getSourceMiner().getQualifiedIdentifier(node.getMinimalTypeIdentifier());
    final Classifier classifier = (Classifier) getRepository().findNamedElement(classifierName,
            IRepository.PACKAGE.getClassifier(), namespaceTracker.currentPackage());
    if (classifier == null) {
        problemBuilder.addError("Unknown classifier '" + classifierName + "'", node.getMinimalTypeIdentifier());
        throw new AbortedStatementCompilationException();
    }
    ReadExtentAction action = (ReadExtentAction) builder.createAction(IRepository.PACKAGE.getReadExtentAction());
    try {
        action.setClassifier(classifier);
        final OutputPin result = action.createResult(null, classifier);
        result.setUpperValue(MDDUtil.createLiteralUnlimitedNatural(namespaceTracker.currentPackage(),
                LiteralUnlimitedNatural.UNLIMITED));
        result.setIsUnique(true);
        builder.registerOutput(result);
        fillDebugInfo(action, node);
    } finally {
        builder.closeAction();
    }
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:23,代码来源:BehaviorGenerator.java

示例3: caseAEmptySet

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
@Override
public void caseAEmptySet(AEmptySet node) {
    final ValueSpecificationAction action = (ValueSpecificationAction) builder.createAction(IRepository.PACKAGE
            .getValueSpecificationAction());
    String qualifiedIdentifier = TextUMLCore.getSourceMiner().getQualifiedIdentifier(
            node.getMinimalTypeIdentifier());
    Classifier classifier = (Classifier) getRepository().findNamedElement(qualifiedIdentifier,
            IRepository.PACKAGE.getClassifier(), namespaceTracker.currentPackage());
    if (classifier == null) {
        problemBuilder.addProblem(new UnknownType(qualifiedIdentifier), node.getMinimalTypeIdentifier());
        throw new AbortedStatementCompilationException();
    }
    try {
        action.setValue(MDDUtil.createLiteralNull(namespaceTracker.currentPackage()));
        OutputPin result = action.createResult(null, classifier);
        result.setUpperValue(MDDUtil.createLiteralUnlimitedNatural(namespaceTracker.currentPackage(),
                LiteralUnlimitedNatural.UNLIMITED));
        builder.registerOutput(result);
        fillDebugInfo(action, node);
    } finally {
        builder.closeAction();
    }
    checkIncomings(action, node, getBoundElement());
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:25,代码来源:BehaviorGenerator.java

示例4: caseAVariableAccess

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
@Override
public void caseAVariableAccess(AVariableAccess node) {
    ReadVariableAction action = (ReadVariableAction) builder.createAction(IRepository.PACKAGE
            .getReadVariableAction());
    try {
        super.caseAVariableAccess(node);
        final OutputPin result = action.createResult(null, null);
        builder.registerOutput(result);
        String variableName = TextUMLCore.getSourceMiner().getIdentifier(node.getIdentifier());
        Variable variable = builder.getVariable(variableName);
        ensure(variable != null, node.getIdentifier(), Severity.ERROR, () -> "Unknown local variable '" + variableName + "'");
        action.setVariable(variable);
        TypeUtils.copyType(variable, result, getBoundElement());
        fillDebugInfo(action, node);
    } finally {
        builder.closeAction();
    }
    checkIncomings(action, node.getIdentifier(), getBoundElement());
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:20,代码来源:BehaviorGenerator.java

示例5: ActivityNodeResolver

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
public ActivityNodeResolver(Map<CreateObjectAction, String> objectMap,Map<CallOperationAction, OutputPin> returnOutputsToCallActions,
		OutVariableExporter tempVariableExporter, UserVariableExporter userVariableExporter) {
    this.objectMap = objectMap;
	this.returnOutputsToCallActions = returnOutputsToCallActions;
	this.tempVariableExporter = tempVariableExporter;
	this.userVariableExporter = userVariableExporter;
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:8,代码来源:ActivityNodeResolver.java

示例6: exportOutputPinToMap

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
public void exportOutputPinToMap(OutputPin out) {
	if (!outTempVariables.containsKey(out)) {
		outTempVariables.put(out, ActivityTemplates.TempVar + tempVariableCounter);
		tempVariableCounter++;
	}

}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:8,代码来源:OutVariableExporter.java

示例7: CallOperationExporter

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
public CallOperationExporter(OutVariableExporter tempVariableExporter,
		Map<CallOperationAction, OutputPin> returnOutputsToCallActions,
		ActivityNodeResolver activityExportResolver) {
	containsTimerOperator = false;
	declaredTempVariables = new HashSet<String>();

	this.tempVariableExporter = tempVariableExporter;
	this.returnOutputsToCallActions = returnOutputsToCallActions;
	this.activityExportResolver = activityExportResolver;
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:11,代码来源:CallOperationExporter.java

示例8: declareAllOutTempParameters

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
private String declareAllOutTempParameters(EList<OutputPin> outParamaterPins) {
	StringBuilder declerations = new StringBuilder("");
	for (OutputPin outPin : outParamaterPins) {
		declerations.append(VariableTemplates.variableDecl(outPin.getType().getName(),
				tempVariableExporter.getRealVariableName(outPin), false));
	}

	return declerations.toString();
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:10,代码来源:CallOperationExporter.java

示例9: searchReturnPin

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
private OutputPin searchReturnPin(EList<OutputPin> results, EList<Parameter> outputParameters) {
	for (int i = 0; i < Math.min(results.size(), outputParameters.size()); i++) {

		if (outputParameters.get(i).getDirection().equals(ParameterDirectionKind.RETURN_LITERAL)) {
			return results.get(i);
		}
	}
	return null;
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:10,代码来源:CallOperationExporter.java

示例10: resolveWildcardTypes

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
/**
 * In the context of an operation call, copies types from source to target
 * for every target that still has a wildcard type.
 * 
 * In the case of a target that is a signature,
 * 
 * @param wildcardSubstitutions
 * @param source
 * @param target
 */
private void resolveWildcardTypes(Map<Type, Type> wildcardSubstitutions, TypedElement source, TypedElement target) {
    if (wildcardSubstitutions.isEmpty())
        return;
    if (MDDExtensionUtils.isWildcardType(target.getType())) {
        Type subbedType = wildcardSubstitutions.get(source.getType());
        if (subbedType != null)
            target.setType(subbedType);
    } else if (MDDExtensionUtils.isSignature(target.getType())) {
        List<Parameter> originalSignatureParameters = MDDExtensionUtils.getSignatureParameters(target.getType());
        boolean signatureUsesWildcardTypes = false;
        for (Parameter parameter : originalSignatureParameters) {
            if (MDDExtensionUtils.isWildcardType(parameter.getType())) {
                signatureUsesWildcardTypes = true;
                break;
            }
        }
        if (signatureUsesWildcardTypes) {
            Activity closure = (Activity) ActivityUtils.resolveBehaviorReference((Action) ((OutputPin) source)
                    .getOwner());
            Type resolvedSignature = MDDExtensionUtils.createSignature(namespaceTracker.currentNamespace(null));
            for (Parameter closureParameter : closure.getOwnedParameters()) {
                Parameter resolvedParameter = MDDExtensionUtils.createSignatureParameter(resolvedSignature,
                        closureParameter.getName(), closureParameter.getType());
                resolvedParameter.setDirection(closureParameter.getDirection());
                resolvedParameter.setUpper(closureParameter.getUpper());
            }
            target.setType(resolvedSignature);
        }
    }
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:41,代码来源:BehaviorGenerator.java

示例11: caseALoopTest

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
@Override
public void caseALoopTest(ALoopTest node) {
    LoopNode currentLoop = (LoopNode) builder.getCurrentBlock();
    builder.createBlock(IRepository.PACKAGE.getStructuredActivityNode());
    try {
        super.caseALoopTest(node);
        currentLoop.getTests().add(builder.getCurrentBlock());
        final OutputPin decider = ActivityUtils.getActionOutputs(builder.getLastRootAction()).get(0);
        currentLoop.setDecider(decider);
    } finally {
        builder.closeBlock();
    }
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:14,代码来源:BehaviorGenerator.java

示例12: caseANewIdentifierExpression

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
@Override
public void caseANewIdentifierExpression(final ANewIdentifierExpression node) {
    ensureNotQuery(node);
    final CreateObjectAction action = (CreateObjectAction) builder.createAction(IRepository.PACKAGE
            .getCreateObjectAction());
    try {
        super.caseANewIdentifierExpression(node);
        final OutputPin output = builder.registerOutput(action.createResult(null, null));
        String qualifiedIdentifier = TextUMLCore.getSourceMiner().getQualifiedIdentifier(
                node.getMinimalTypeIdentifier());
        Classifier classifier = (Classifier) getRepository().findNamedElement(qualifiedIdentifier,
                IRepository.PACKAGE.getClassifier(), namespaceTracker.currentPackage());
        if (classifier == null) {
            problemBuilder.addError("Unknown classifier '" + qualifiedIdentifier + "'",
                    node.getMinimalTypeIdentifier());
            throw new AbortedStatementCompilationException();
        }
        if (classifier.isAbstract()) {
            problemBuilder.addProblem(new NotAConcreteClassifier(qualifiedIdentifier),
                    node.getMinimalTypeIdentifier());
            throw new AbortedStatementCompilationException();
        }
        output.setType(classifier);
        action.setClassifier(classifier);
        fillDebugInfo(action, node);
    } finally {
        builder.closeAction();
    }
    checkIncomings(action, node.getNew(), getBoundElement());
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:31,代码来源:BehaviorGenerator.java

示例13: caseAParenthesisOperand

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
@Override
public void caseAParenthesisOperand(AParenthesisOperand node) {
    if (node.getCast() == null) {
        // no casting, just process inner expression
        node.getExpression().apply(this);
        return;
    }
    StructuredActivityNode action = (StructuredActivityNode) builder
            .createAction(Literals.STRUCTURED_ACTIVITY_NODE);
    MDDExtensionUtils.makeCast(action);
    try {
        // register the target input pin (type is null)
        InputPin sourcePin = (InputPin) action.createStructuredNodeInput(null, null);
        builder.registerInput(sourcePin);
        // process the target expression - this will connect its output pin
        // to the input pin we just created
        node.getExpression().apply(this);
        // copy whatever multiplicity coming into the source to the source
        TypeUtils.copyMultiplicity((MultiplicityElement) sourcePin.getIncomings().get(0).getSource(), sourcePin);
        // register the result output pin
        OutputPin destinationPin = (OutputPin) action.createStructuredNodeOutput(null, null);

        new TypeSetter(sourceContext, namespaceTracker.currentNamespace(null), destinationPin).process(node
                .getCast());
        builder.registerOutput(destinationPin);
        // copy whatever multiplicity coming into the source to the
        // destination
        TypeUtils.copyMultiplicity(sourcePin, destinationPin);
        fillDebugInfo(action, node);
    } finally {
        builder.closeAction();
    }
    checkIncomings(action, node.getCast(), getBoundElement());
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:35,代码来源:BehaviorGenerator.java

示例14: createClauseTest

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
private void createClauseTest(Clause clause, PRootExpression node) {
    builder.createBlock(IRepository.PACKAGE.getStructuredActivityNode());
    try {
        node.apply(this);
        clause.getTests().add(builder.getCurrentBlock());
        final OutputPin decider = ActivityUtils.getActionOutputs(builder.getLastRootAction()).get(0);
        clause.setDecider(decider);
    } finally {
        builder.closeBlock();
    }
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:12,代码来源:BehaviorGenerator.java

示例15: isTerminal

import org.eclipse.uml2.uml.OutputPin; //导入依赖的package包/类
public static boolean isTerminal(Action instance) {
    List<OutputPin> outputPins = getActionOutputs(instance);
    for (OutputPin current : outputPins)
        if (!current.getOutgoings().isEmpty())
            return false;
    return true;
}
 
开发者ID:abstratt,项目名称:textuml,代码行数:8,代码来源:ActivityUtils.java


注:本文中的org.eclipse.uml2.uml.OutputPin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。