Ejemplo n.º 1
0
 public ClassNode withMethods_classMethods_isExtension_(
     final MethodNode[] _anArray, final MethodNode[] _anArray2, final boolean _aBoolean) {
   ClassNode _temp1 = this.copy();
   _temp1.pvtSetMethods_(_anArray);
   _temp1.pvtSetClassMethods_(_anArray2);
   _temp1.pvtSetExtension_(_aBoolean);
   return _temp1;
 }
Ejemplo n.º 2
0
 public ClassNode copy() {
   try {
     ClassNode _temp1 = (ClassNode) this.clone();
     _temp1.postCopy();
     return _temp1;
   } catch (CloneNotSupportedException e) {
     throw new RuntimeException(e);
   }
 }
Ejemplo n.º 3
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()));
 }
Ejemplo n.º 4
0
 @Override
 public ClassNode flattenTraitsIn_(final SystemNode _aSystemNode) {
   final MetaclassNode _newMetaclassNode;
   final ClassNode _newClassNode;
   _newMetaclassNode = _metaclassNode.flattenTraitsIn_(_aSystemNode);
   _newClassNode = _traitUsage.flattenClassNode_in_(this, _aSystemNode);
   if ((_newClassNode == this) && (_newMetaclassNode == _metaclassNode)) {
     return ClassNode.this;
   }
   return _newClassNode.copy().pvtSetMetaclassNode_(_newMetaclassNode);
 }
Ejemplo n.º 5
0
 public ClassNode basicNew() {
   ClassNode newInstance = new ClassNode();
   newInstance.initialize();
   return newInstance;
 }
Ejemplo n.º 6
0
 public ClassNode mergedWithExtension_(final ClassNode _aClassNode) {
   return this.withMethods_classMethods_isExtension_(
       this.mergeMethods_with_(_methods, _aClassNode.methods()),
       this.mergeMethods_with_(this.classMethods(), _aClassNode.classMethods()),
       false);
 }
Ejemplo n.º 7
0
 public ClassNode beExtension() {
   ClassNode _temp1 = this.copy();
   _temp1.pvtSetExtension_(true);
   _temp1.pvtSetProperties_(new java.util.HashMap<String, String>());
   return _temp1;
 }
Ejemplo n.º 8
0
 public ClassNode asTrait() {
   ClassNode _temp1 = this.copy();
   _temp1.pvtSetTrait_(true);
   return _temp1;
 }