Ejemplo n.º 1
0
 private void removeObjectReferences() {
   if (_objectRefrencesToGC != null) {
     _objectRefrencesToGC.traverse(
         new Visitor4() {
           public void visit(Object a_object) {
             ObjectReference yo = (ObjectReference) ((TreeIntObject) a_object)._object;
             ClientTransaction.this.removeReference(yo);
           }
         });
   }
   _objectRefrencesToGC = null;
 }
  private static Tree sortConstructorsByParamsCount(final ReflectConstructor[] constructors) {
    Tree sortedConstructors = null;

    // sort constructors by parameter count
    for (int i = 0; i < constructors.length; i++) {
      int parameterCount = constructors[i].getParameterTypes().length;
      sortedConstructors =
          Tree.add(
              sortedConstructors,
              new TreeIntObject(i + constructors.length * parameterCount, constructors[i]));
    }
    return sortedConstructors;
  }