Revision 6888 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/ProjectView.java

View differences:

ProjectView.java
42 42

  
43 43
import java.awt.Color;
44 44
import java.awt.Component;
45
import java.lang.reflect.Field;
45 46
import java.text.DateFormat;
46 47
import java.util.Date;
47 48

  
......
364 365
					e.getMessage());
365 366

  
366 367
	}
368

  
369
//	public int computeSignature() {
370
//		int result = 17;
371
//
372
//		Class clazz = getClass();
373
//		Field[] fields = clazz.getDeclaredFields();
374
//		for (int i = 0; i < fields.length; i++) {
375
//			try {
376
//				String type = fields[i].getType().getName();
377
//				if (type.equals("boolean")) {
378
//					result += 37 + ((fields[i].getBoolean(this)) ? 1 : 0);
379
//				} else if (type.equals("java.lang.String")) {
380
//					Object v = fields[i].get(this);
381
//					if (v == null) {
382
//						result += 37;
383
//						continue;
384
//					}
385
//					char[] chars = ((String) v).toCharArray();
386
//					for (int j = 0; j < chars.length; j++) {
387
//						result += 37 + (int) chars[i];
388
//					}
389
//				} else if (type.equals("byte")) {
390
//					result += 37 + (int) fields[i].getByte(this);
391
//				} else if (type.equals("char")) {
392
//					result += 37 + (int) fields[i].getChar(this);
393
//				} else if (type.equals("short")) {
394
//					result += 37 + (int) fields[i].getShort(this);
395
//				} else if (type.equals("int")) {
396
//					result += 37 + fields[i].getInt(this);
397
//				} else if (type.equals("long")) {
398
//					long f = fields[i].getLong(this) ;
399
//					result += 37 + (f ^ (f >>> 32));
400
//				} else if (type.equals("float")) {
401
//					result += 37 + Float.floatToIntBits(fields[i].getFloat(this));
402
//				} else if (type.equals("double")) {
403
//					long f = Double.doubleToLongBits(fields[i].getDouble(this));
404
//					result += 37 + (f ^ (f >>> 32));
405
//				} else {
406
//					Object obj = fields[i].get(this);
407
//					result += 37 + ((obj != null)? obj.hashCode() : 0);
408
//				}
409
//			} catch (Exception e) { e.printStackTrace(); }
410
//
411
//		}
412
//		return result;
413
//	}
367 414
}

Also available in: Unified diff