Code examples for Field

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
156:	field.setAccessible(true); 
157:	int fieldValue = (Integer) field.get(object); 
Full Snippet Info
10
CodeRank
171:	cdBackgroundStateColorField.setAccessible(true); 
Full Snippet Info
9
CodeRank
183:	boolean accessibility = field.isAccessible(); 
184:	field.setAccessible(true); 
-
191:	throw new IllegalStateException("Inject failed for field "+field.getName()); 
Full Snippet Info
9
CodeRank
66:	Object value = field.get(null); 
-
69:	field.set(null, "www.example.com"); 
-
73:	Assert.assertEquals("www.example.com", domain); 
74:	} 
-
76:	field.set(null, value); 
Full Snippet Info
8
CodeRank
29:	return field.get(target); 
Full Snippet Info
8
CodeRank
43:	cleanerField.setAccessible(true); 
44:	Cleaner cleaner = (Cleaner) cleanerField.get(direct); 
-
46:	fieldOffset = PlatformDependent0.objectFieldOffset(cleanerField); 
Full Snippet Info
8
CodeRank
95:	final Class<?> t = field.getType(); 
-
117:	if (value == null && Nullable.notNullable(field) ) { 
118:	throw new NullPointerException(String.format("Can't inject null value into %s.%s when field is not @Nullable", field.getDeclaringClass(), field 
119:	.getName())); 
-
130:	field.getType(), field.getName())); 
Full Snippet Info
8
CodeRank
14:	field.setAccessible(true); 
15:	return field.get(object); 
Full Snippet Info
8
CodeRank
185:	field.setAccessible(true); 
186:	return field.get(object); 
-
188:	throw new InfinitumRuntimeException("Unable to access field '" + field.getName() + "' for object of type '" 
-
191:	throw new InfinitumRuntimeException("Unable to access field '" + field.getName() + "' for object of type '" 
Full Snippet Info
8
CodeRank
48:	field.setAccessible(true); 
49:	long delay = ((Long) field.get(targetSource)).longValue(); 
Full Snippet Info
8
CodeRank
38:	builderField.setAccessible(true); 
39:	Object oldBuilder = builderField.get(null); 
40:	builderField.set(null, null); 
-
46:	builderField.set(null, oldBuilder); 
Full Snippet Info
8
CodeRank
63:	f.setAccessible(true); 
Full Snippet Info
8
CodeRank
112:	mSuperScrollListener = (OnScrollChangedListener) superListenerField.get(this); 
113:	superListenerField.set(this, NOP); 
Full Snippet Info
8
CodeRank
26:	return field.get(object); 
Full Snippet Info
8
CodeRank
73:	mockUtil.maybeRedefineMockName(instance, field.getName()); 
-
80:	return null != field.getAnnotation(Spy.class) 
81:	|| null != field.getAnnotation(Mock.class) 
82:	|| null != field.getAnnotation(MockitoAnnotations.Mock.class); 
Full Snippet Info
8
CodeRank
77:	switch (densityDpiFiled.getInt(metrics)) { 
Full Snippet Info
8
CodeRank
58:	f.setAccessible(true); 
-
68:	Object o = f.get(bean); 
-
71:	f.set(bean,o); 
-
74:	throw new IllegalAnnotationError(Messages.ILLEGAL_LIST.format(f)); 
Full Snippet Info
8
CodeRank
57:	Class<?> type = field.getType(); 
Full Snippet Info
7
CodeRank
58:	field.set(o, value); 
Full Snippet Info
7
CodeRank
97:	if (f.isAnnotationPresent(Column.class)) 
-
99:	Column c = f.getAnnotation(Column.class); 
-
106:	name = f.getName(); 
-
109:	else if (f.isAnnotationPresent(Basic.class)) 
-
111:	name = f.getName(); 
-
114:	if (f.isAnnotationPresent(Temporal.class)) 
-
116:	if (!f.getType().equals(Date.class)) 
-
118:	log.error("@Temporal must map to java.util.Date for @Entity(" + entity.getName() + "." + f.getName() 
-
124:	name = f.getName(); 
Full Snippet Info
7
CodeRank