01: /*
02: * Copyright (c) 2002-2006 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.xwork.util;
06:
07: /**
08: * Determines what the key and and element class of a Map or Collection should be. For Maps, the elements are the
09: * values. For Collections, the elements are the elements of the collection.
10: *
11: * @author Gabriel Zimmerman
12: */
13: public interface ObjectTypeDeterminer {
14: public Class getKeyClass(Class parentClass, String property);
15:
16: public Class getElementClass(Class parentClass, String property,
17: Object key);
18:
19: public String getKeyProperty(Class parentClass, String property);
20:
21: public boolean shouldCreateIfNew(Class parentClass,
22: String property, Object target, String keyProperty,
23: boolean isIndexAccessed);
24: }
|