コード例 #1
0
    public override bool operationNameMatches(String name)
    {
        ModelElementNameGenerator nameGenerator = CoreModelElementNameGeneratorImpl.getInstance();

        return(nameGenerator.operationNameMatches(nameGenerator.generateNameForOperation(
                                                      this.name, this.paramTypes), name));
    }
コード例 #2
0
        public static ModelElementNameGenerator getInstance()
        {
            if (instance == null)
            {
                instance = new CoreModelElementNameGeneratorImpl();
            }

            return(instance);
        }
コード例 #3
0
        public CoreModelElement addDefinedOperation(
            string source,
            string name,
            List <object> paramNames,
            List <object> paramTypes,
            CoreClassifier returnType)
        {
            CoreFeature element = createOclDefinedOperation(source, name, paramNames, paramTypes, returnType);

            element.setFeatureOwner(classifier);
            element.setElemOwner(classifier);
            ModelElementNameGenerator nameGenerator = CoreModelElementNameGeneratorImpl.getInstance();

            string mangledName = nameGenerator.generateNameForOperation(name, paramTypes);

            this.definedFeatures.Add(mangledName, element);
            addElementToDefinedFeaturesBySource(source, element);

            return(element);
        }
コード例 #4
0
        /* (non-Javadoc)
         * @see ocl20.CoreOperation#operationNameMatches(java.lang.String)
         */

        public virtual bool operationNameMatches(String name)
        {
            ModelElementNameGenerator nameGenerator = CoreModelElementNameGeneratorImpl.getInstance();

            return(nameGenerator.operationNameMatches(nameGenerator.generateName(this), name));
        }