private HGAtomRef.Mode getReferenceMode(Class<?> javaClass, PropertyDescriptor desc)
	{
		//
		// Retrieve or recursively create a new type for the nested
		// bean.
		//
		try
		{
			Field field = JavaTypeFactory.findDeclaredField(javaClass, desc.getName());
			if (field == null)
			    return null;
			AtomReference ann = (AtomReference)field.getAnnotation(AtomReference.class);
			if (ann == null)
				return null;
			String s = ann.value();
			if ("hard".equals(s))
				return HGAtomRef.Mode.hard;
			else if ("symbolic".equals(s))
				return HGAtomRef.Mode.symbolic;
			else if ("floating".equals(s))
				return HGAtomRef.Mode.floating;
			else
				throw new HGException("Wrong annotation value '" + s + 
						"' for field '" + field.getName() + "' of class '" +
						javaClass.getName() + "', must be one of \"hard\", \"symbolic\" or \"floating\".");
		}
		catch (Throwable ex)
		{
			// Perhaps issue a warning here if people are misspelling
			// unintentionally? Proper spelling is only useful for
			// annotation, so a warning/error should be really issued if
			// we find an annotation for a field that we can't make
			// use of?
			return null;
		}		
	}