code: protected final Direction getDirectionForType(final Class<S> sourceType, final Class<T> targetType, final Class<? extends NodeInterface> type) {
  
  		// FIXME: this method will most likely not do what it's supposed to do..
  		if (sourceType.equals(type) && targetType.equals(type)) {
  			return Direction.BOTH;
  		}
  
  		if (sourceType.equals(type)) {
  			return Direction.OUTGOING;
  		}
  
  		if (targetType.equals(type)) {
  			return Direction.INCOMING;
  		}
  
  		/* one of these blocks is wrong...*/
  		if (sourceType.isAssignableFrom(type) && targetType.isAssignableFrom(type)) {
  			return Direction.BOTH;
  		}
  
  		if (sourceType.isAssignableFrom(type)) {
  			return Direction.OUTGOING;
  		}
  
  		if (targetType.isAssignableFrom(type)) {
  			return Direction.INCOMING;
  		}
  
  		/* one of these blocks is wrong...*/
  		if (type.isAssignableFrom(sourceType) && type.isAssignableFrom(targetType)) {
  			return Direction.BOTH;
  		}
  
  		if (type.isAssignableFrom(sourceType)) {
  			return Direction.OUTGOING;
  		}
  
  		if (type.isAssignableFrom(targetType)) {
  			return Direction.INCOMING;
  		}
  
  		return Direction.BOTH;
  	}
docs: ----- protected methods -----