MCPcopy Create free account
hub / github.com/androrm/androrm / getEligableFields

Method getEligableFields

src/src/com/orm/androrm/Model.java:189–207  ·  view source on GitHub ↗
(
			
			Class<? extends Model> 	clazz, 
			T 						instance
			
	)

Source from the content-addressed store, hash-verified

187 }
188
189 private static final <T extends Model> List<String> getEligableFields(
190
191 Class<? extends Model> clazz,
192 T instance
193
194 ) {
195
196 List<String> eligableFields = new ArrayList<String>();
197
198 if(clazz != null) {
199 for(Field field: DatabaseBuilder.getFields(clazz, instance)) {
200 eligableFields.add(field.getName());
201 }
202
203 eligableFields.addAll(getEligableFields(getSuperclass(clazz), instance));
204 }
205
206 return eligableFields;
207 }
208
209 private static final <T extends Model> void raiseFieldExecption(T instance, String fieldName) {
210 throw new NoSuchFieldException("No field named "

Callers 2

raiseFieldExecptionMethod · 0.95
setBackLinkMethod · 0.95

Calls 5

getFieldsMethod · 0.95
getSuperclassMethod · 0.95
addMethod · 0.65
addAllMethod · 0.65
getNameMethod · 0.45

Tested by

no test coverage detected