Code example for Field

Methods: getModifiers

0
	} 
 
	// PROTECTED UTILS 
 
	private boolean isColField(Field toCheck) {
		int modifiers = toCheck.getModifiers();
		return (!Modifier.isTransient(modifiers)
				&& Modifier.isPublic(modifiers) && !Modifier
					.isStatic(modifiers));
	} 
 
	private Field[] getColFields() {
		// Field[] fields = getClass().getDeclaredFields(); 
		Field[] fields = getClass().getFields();
		List<Field> colFields = new ArrayList<Field>();
 
		for (int i = 0; i < fields.length; i++) {
			try { 
				Field field = fields[i];
				if (isColField(field))
					colFields.add(field);