indexedProperty = (IndexedProperty) property; } else { indexedProperty = new IndexedProperty(property); properties.put(name, indexedProperty); indexedProperty = new IndexedProperty(name, type); properties.put(name, indexedProperty); indexedProperty.addIndexedReadMethod(method); indexedProperty = (IndexedProperty) property; } else { indexedProperty = new IndexedProperty(property); properties.put(name, indexedProperty); indexedProperty = new IndexedProperty(name, type); properties.put(name, indexedProperty); indexedProperty.addIndexedWriteMethod(method);
void addIndexedWriteMethod(Method method) { Class indexType = method.getParameterTypes()[0]; int count = getIndexTypesCount(); int i; for (i=0; i<count; i++) { if (getIndexType(i) == indexType) { break; } } if (i >= count) { expandCapactity(); } if (mIndexedWriteMethods[i] == null) { mIndexedWriteMethods[i] = method; } }
public String toString() { StringBuffer buf = new StringBuffer(); buf.append("BeanProperty{name="); buf.append(getName()); buf.append(", type="); buf.append(getType().getName()); Class[] covariantTypes = getCovariantTypes(); if (covariantTypes.length > 0) { buf.append(", covariantTypes="); buf.append(Arrays.toString(covariantTypes)); } buf.append(", "); int count = getIndexTypesCount(); for (int i=0; i<count; i++) { if (i > 0) { buf.append(", "); } buf.append("indexType["); buf.append(i); buf.append("]="); buf.append(getIndexType(0)); } buf.append('}'); return buf.toString(); }
indexedProperty = (IndexedProperty) property; } else { indexedProperty = new IndexedProperty(property); properties.put(name, indexedProperty); indexedProperty = new IndexedProperty(name, type); properties.put(name, indexedProperty); indexedProperty.addIndexedReadMethod(method); indexedProperty = (IndexedProperty) property; } else { indexedProperty = new IndexedProperty(property); properties.put(name, indexedProperty); indexedProperty = new IndexedProperty(name, type); properties.put(name, indexedProperty); indexedProperty.addIndexedWriteMethod(method);
public String toString() { StringBuffer buf = new StringBuffer(); buf.append("BeanProperty{name="); buf.append(getName()); buf.append(", type="); buf.append(getType().getName()); Class[] covariantTypes = getCovariantTypes(); if (covariantTypes.length > 0) { buf.append(", covariantTypes="); buf.append(Arrays.toString(covariantTypes)); } buf.append(", "); int count = getIndexTypesCount(); for (int i=0; i<count; i++) { if (i > 0) { buf.append(", "); } buf.append("indexType["); buf.append(i); buf.append("]="); buf.append(getIndexType(0)); } buf.append('}'); return buf.toString(); }
public Class getIndexType(int index) { Method[] methods = mIndexedReadMethods; if (methods != null) { Method method = methods[0]; if (method != null) { return method.getParameterTypes()[0]; } } methods = mIndexedWriteMethods; if (methods != null) { Method method = methods[index]; if (method != null) { return method.getParameterTypes()[0]; } } if (index >= getIndexTypesCount()) { throw new IndexOutOfBoundsException(); } return null; }
void addIndexedReadMethod(Method method) { Class indexType = method.getParameterTypes()[0]; int count = getIndexTypesCount(); int i; for (i=0; i<count; i++) { if (getIndexType(i) == indexType) { break; } } if (i >= count) { expandCapactity(); } if (mIndexedReadMethods[i] == null) { mIndexedReadMethods[i] = method; } }
void addIndexedWriteMethod(Method method) { Class indexType = method.getParameterTypes()[0]; int count = getIndexTypesCount(); int i; for (i=0; i<count; i++) { if (getIndexType(i) == indexType) { break; } } if (i >= count) { expandCapactity(); } if (mIndexedWriteMethods[i] == null) { mIndexedWriteMethods[i] = method; } }
private void expandCapactity() { int count = getIndexTypesCount(); Method[] methods = new Method[count + 1]; if (mIndexedReadMethods != null) { System.arraycopy(mIndexedReadMethods, 0, methods, 0, count); } mIndexedReadMethods = methods; methods = new Method[count + 1]; if (mIndexedWriteMethods != null) { System.arraycopy(mIndexedWriteMethods, 0, methods, 0, count); } mIndexedWriteMethods = methods; } }
IndexedProperty addCovariantType(Class type) { SimpleProperty property = super.addCovariantType(type); if (property == null) { return null; } IndexedProperty ix = new IndexedProperty(property); ix.mIndexedReadMethods = mIndexedReadMethods; ix.mIndexedWriteMethods = mIndexedWriteMethods; return ix; }
IndexedProperty(BeanProperty property) { super(property.getName(), property.getType(), property.getCovariantTypes()); setReadMethod(property.getReadMethod()); setWriteMethod(property.getWriteMethod()); }
public Class getIndexType(int index) { Method[] methods = mIndexedReadMethods; if (methods != null) { Method method = methods[0]; if (method != null) { return method.getParameterTypes()[0]; } } methods = mIndexedWriteMethods; if (methods != null) { Method method = methods[index]; if (method != null) { return method.getParameterTypes()[0]; } } if (index >= getIndexTypesCount()) { throw new IndexOutOfBoundsException(); } return null; }
void addIndexedReadMethod(Method method) { Class indexType = method.getParameterTypes()[0]; int count = getIndexTypesCount(); int i; for (i=0; i<count; i++) { if (getIndexType(i) == indexType) { break; } } if (i >= count) { expandCapactity(); } if (mIndexedReadMethods[i] == null) { mIndexedReadMethods[i] = method; } }
private void expandCapactity() { int count = getIndexTypesCount(); Method[] methods = new Method[count + 1]; if (mIndexedReadMethods != null) { System.arraycopy(mIndexedReadMethods, 0, methods, 0, count); } mIndexedReadMethods = methods; methods = new Method[count + 1]; if (mIndexedWriteMethods != null) { System.arraycopy(mIndexedWriteMethods, 0, methods, 0, count); } mIndexedWriteMethods = methods; } }
IndexedProperty addCovariantType(Class type) { SimpleProperty property = super.addCovariantType(type); if (property == null) { return null; } IndexedProperty ix = new IndexedProperty(property); ix.mIndexedReadMethods = mIndexedReadMethods; ix.mIndexedWriteMethods = mIndexedWriteMethods; return ix; }
IndexedProperty(BeanProperty property) { super(property.getName(), property.getType(), property.getCovariantTypes()); setReadMethod(property.getReadMethod()); setWriteMethod(property.getWriteMethod()); }