/** * Returns the number of introspected methods/properties that should be available via the TemplateHashModel * interface. */ int keyCount(Class<?> clazz) { Map<Object, Object> map = get(clazz); int count = map.size(); if (map.containsKey(CONSTRUCTORS_KEY)) count--; if (map.containsKey(GENERIC_GET_KEY)) count--; if (map.containsKey(ARG_TYPES_BY_METHOD_KEY)) count--; return count; }
classIntrospector.get(clazz);
/** * Returns the Set of names of introspected methods/properties that should be available via the TemplateHashModel * interface. */ Set<Object> keySet(Class<?> clazz) { Set<Object> set = new HashSet<Object>(get(clazz).keySet()); set.remove(CONSTRUCTORS_KEY); set.remove(GENERIC_GET_KEY); set.remove(ARG_TYPES_BY_METHOD_KEY); return set; }
classIntrospector.get(clazz);
/** @since 2.3.21 */ BeanModel(Object object, BeansWrapper wrapper, boolean inrospectNow) { this.object = object; this.wrapper = wrapper; if (inrospectNow && object != null) { // [2.4]: Could this be removed? wrapper.getClassIntrospector().get(object.getClass()); } }
classIntrospector.get(clazz);
/** * Whether the model has a plain get(String) or get(Object) method */ protected boolean hasPlainGetMethod() { return wrapper.getClassIntrospector().get(object.getClass()).get(ClassIntrospector.GENERIC_GET_KEY) != null; }
throws TemplateModelException { try { Object ctors = classIntrospector.get(clazz).get(ClassIntrospector.CONSTRUCTORS_KEY); if (ctors == null) { throw new TemplateModelException("Class " + clazz.getName() +
throws TemplateModelException { Class<?> clazz = object.getClass(); Map<Object, Object> classInfo = wrapper.getClassIntrospector().get(clazz); TemplateModel retval = null;
/** * Returns the Set of names of introspected methods/properties that should be available via the TemplateHashModel * interface. */ Set<Object> keySet(Class<?> clazz) { Set<Object> set = new HashSet<Object>(get(clazz).keySet()); set.remove(CONSTRUCTORS_KEY); set.remove(GENERIC_GET_KEY); set.remove(ARG_TYPES_BY_METHOD_KEY); return set; }
/** * Returns the number of introspected methods/properties that should be available via the TemplateHashModel * interface. */ int keyCount(Class<?> clazz) { Map<Object, Object> map = get(clazz); int count = map.size(); if (map.containsKey(CONSTRUCTORS_KEY)) count--; if (map.containsKey(GENERIC_GET_KEY)) count--; if (map.containsKey(ARG_TYPES_BY_METHOD_KEY)) count--; return count; }
/** * Returns the number of introspected methods/properties that should be available via the TemplateHashModel * interface. */ int keyCount(Class<?> clazz) { Map<Object, Object> map = get(clazz); int count = map.size(); if (map.containsKey(CONSTRUCTORS_KEY)) count--; if (map.containsKey(GENERIC_GET_KEY)) count--; if (map.containsKey(ARG_TYPES_BY_METHOD_KEY)) count--; return count; }
/** * Returns the Set of names of introspected methods/properties that should be available via the TemplateHashModel * interface. */ Set<Object> keySet(Class<?> clazz) { Set<Object> set = new HashSet<Object>(get(clazz).keySet()); set.remove(CONSTRUCTORS_KEY); set.remove(GENERIC_GET_KEY); set.remove(ARG_TYPES_BY_METHOD_KEY); return set; }
/** * Whether the model has a plain get(String) or get(Object) method */ protected boolean hasPlainGetMethod() { return wrapper.getClassIntrospector().get(object.getClass()).get(ClassIntrospector.GENERIC_GET_KEY) != null; }
/** @since 2.3.21 */ BeanModel(Object object, BeansWrapper wrapper, boolean inrospectNow) { this.object = object; this.wrapper = wrapper; if (inrospectNow && object != null) { // [2.4]: Could this be removed? wrapper.getClassIntrospector().get(object.getClass()); } }
/** * Whether the model has a plain get(String) or get(Object) method */ protected boolean hasPlainGetMethod() { return wrapper.getClassIntrospector().get(object.getClass()).get(ClassIntrospector.GENERIC_GET_KEY) != null; }
/** @since 2.3.21 */ BeanModel(Object object, BeansWrapper wrapper, boolean inrospectNow) { this.object = object; this.wrapper = wrapper; if (inrospectNow && object != null) { // [2.4]: Could this be removed? wrapper.getClassIntrospector().get(object.getClass()); } }
throws TemplateModelException { try { Object ctors = classIntrospector.get(clazz).get(ClassIntrospector.CONSTRUCTORS_KEY); if (ctors == null) { throw new TemplateModelException("Class " + clazz.getName() +
throws TemplateModelException { try { Object ctors = classIntrospector.get(clazz).get(ClassIntrospector.CONSTRUCTORS_KEY); if (ctors == null) { throw new TemplateModelException("Class " + clazz.getName() +
throws TemplateModelException { Class<?> clazz = object.getClass(); Map<Object, Object> classInfo = wrapper.getClassIntrospector().get(clazz); TemplateModel retval = null;