HasClass() public method

public HasClass ( string name ) : bool
name string
return bool
Exemplo n.º 1
0
        private void ProcessMessageExpression(CodeModel model, MessageExpression expression)
        {
            // TODO implements weakSubclass
            if (expression.Selector.StartsWith("subclass:") || expression.Selector.StartsWith("weakSubclass:") || expression.Selector.StartsWith("variableSubclass:"))
            {
                bool isvariable = expression.Selector.StartsWith("variableSubclass:");
                SymbolExpression symbol = (SymbolExpression)expression.Arguments.First();
                VariableExpression variable = (VariableExpression)expression.Target;

                ClassModel super = null;

                if (variable.Name != null && variable.Name != symbol.Symbol)
                    //// TODO review quick hack if class is not defined yet
                    if (model.HasClass(variable.Name))
                        super = model.GetClass(variable.Name);

                ClassModel @class;

                if (super != null || variable.Name == null)
                    @class = new ClassModel(symbol.Symbol, super, GetInstanceVariableNames(expression), GetClassVariableNames(expression), isvariable, GetPoolDictionariesNames(expression), GetCategory(expression));
                else
                    @class = new ClassModel(symbol.Symbol, variable.Name, GetInstanceVariableNames(expression), GetClassVariableNames(expression), isvariable, GetPoolDictionariesNames(expression), GetCategory(expression));

                model.AddElement(@class);
            }
        }