Esempio n. 1
0
 @Override
 public boolean isNilClass() {
   final String _isNilClass;
   String _temp1 = _properties.get("isNilClass");
   _isNilClass = ((String) _temp1);
   return st.gravel.support.jvm.StringExtensions.equals_(_isNilClass, "true");
 }
Esempio n. 2
0
 public UpdateClassDiff diffTo_(final ClassNode _aClassNode) {
   if (!st.gravel.support.jvm.ObjectExtensions.equals_(_aClassNode.name(), _name)) {
     st.gravel.support.jvm.ObjectExtensions.halt(_aClassNode);
   }
   if (!st.gravel.support.jvm.ArrayExtensions.equals_(_aClassNode.namespace(), _namespace)) {
     st.gravel.support.jvm.ObjectExtensions.halt(_aClassNode);
   }
   if (!st.gravel.support.jvm.StringExtensions.equals_(
       _aClassNode.superclassPath(), _superclassPath)) {
     st.gravel.support.jvm.ObjectExtensions.halt(_aClassNode);
   }
   if (!st.gravel.support.jvm.DictionaryExtensions.equals_(
       _aClassNode.properties(), _properties)) {
     st.gravel.support.jvm.ObjectExtensions.halt(_aClassNode);
   }
   if (!st.gravel.support.jvm.BooleanExtensions.equals_(_aClassNode.isExtension(), _isExtension)) {
     st.gravel.support.jvm.ObjectExtensions.halt(_aClassNode);
   }
   if (!st.gravel.support.jvm.BooleanExtensions.equals_(_aClassNode.isTrait(), _isTrait)) {
     st.gravel.support.jvm.ObjectExtensions.halt(_aClassNode);
   }
   return UpdateClassDiff.factory.reference_superclassReference_thisDiff_metaDiff_(
       _aClassNode.reference(),
       ((AbsoluteReference) _aClassNode.superclassReference()),
       this.diffToClassDescriptionNode_(_aClassNode),
       _metaclassNode.diffToClassDescriptionNode_(_aClassNode.metaclassNode()));
 }
Esempio n. 3
0
 @Test
 public void testParseString2() {
   final StringLiteralNode _node;
   _node = ((StringLiteralNode) Parser.factory.source_("\'from\'\'age\'").parseExpression());
   assertTrue(
       st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), StringLiteralNode.factory));
   assertTrue(st.gravel.support.jvm.StringExtensions.equals_(_node.value(), "from\'age"));
 }
Esempio n. 4
0
 public boolean isPropertyPragmaAt_(final st.gravel.core.Symbol _aKey) {
   return st.gravel.support.jvm.StringExtensions.equals_(_expression.selector(), "propertyAt:put:")
       && (_expression.arguments()[0].isSymbolLiteralNode()
           && st.gravel.support.jvm.ObjectExtensions.equals_(
               ((SymbolLiteralNode) _expression.arguments()[0]).value(), _aKey));
 }
Esempio n. 5
0
 @Override
 public boolean equals(final Object _anObject) {
   if (!super.equals(_anObject)) {
     return false;
   }
   if (this._name == null) {
     if (!(((ClassNode) _anObject)._name == null)) {
       return false;
     }
   } else {
     if (!st.gravel.support.jvm.ObjectExtensions.equals_(
         this._name, ((ClassNode) _anObject)._name)) {
       return false;
     }
   }
   if (this._namespace == null) {
     if (!(((ClassNode) _anObject)._namespace == null)) {
       return false;
     }
   } else {
     if (!st.gravel.support.jvm.ArrayExtensions.equals_(
         this._namespace, ((ClassNode) _anObject)._namespace)) {
       return false;
     }
   }
   if (this._superclassPath == null) {
     if (!(((ClassNode) _anObject)._superclassPath == null)) {
       return false;
     }
   } else {
     if (!st.gravel.support.jvm.StringExtensions.equals_(
         this._superclassPath, ((ClassNode) _anObject)._superclassPath)) {
       return false;
     }
   }
   if (this._properties == null) {
     if (!(((ClassNode) _anObject)._properties == null)) {
       return false;
     }
   } else {
     if (!st.gravel.support.jvm.DictionaryExtensions.equals_(
         this._properties, ((ClassNode) _anObject)._properties)) {
       return false;
     }
   }
   if (!st.gravel.support.jvm.BooleanExtensions.equals_(
       this._isExtension, ((ClassNode) _anObject)._isExtension)) {
     return false;
   }
   if (this._metaclassNode == null) {
     if (!(((ClassNode) _anObject)._metaclassNode == null)) {
       return false;
     }
   } else {
     if (!st.gravel.support.jvm.ObjectExtensions.equals_(
         this._metaclassNode, ((ClassNode) _anObject)._metaclassNode)) {
       return false;
     }
   }
   if (!st.gravel.support.jvm.BooleanExtensions.equals_(
       this._isTrait, ((ClassNode) _anObject)._isTrait)) {
     return false;
   }
   return true;
 }