Changeset 3069
- Timestamp:
- 01/19/12 13:28:58 (4 months ago)
- Location:
- AnalyzerBeans/trunk/core/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
AnalyzerBeans/trunk/core/src/main/java/org/eobjects/analyzer/util/ReflectionUtils.java
r3053 r3069 79 79 thisClass = (Class<?>) thisType; 80 80 if (includeArray && thisClass.isArray() && !ofThatType.isArray()) { 81 if (ofThatType == Object.class) { 82 return true; 83 } 84 81 85 thisClass = thisClass.getComponentType(); 82 86 } 83 87 } 88 84 89 if (thisClass == ofThatType) { 85 90 return true; … … 479 484 } 480 485 } 481 486 482 487 public static <A extends Annotation> A getAnnotation(Enum<?> enumConstant, Class<A> annotationClass) { 483 488 try { … … 494 499 } 495 500 } 496 501 497 502 public static boolean isAnnotationPresent(Enum<?> enumConstant, Class<? extends Annotation> annotationClass) { 498 503 try { -
AnalyzerBeans/trunk/core/src/test/java/org/eobjects/analyzer/util/ReflectionUtilsTest.java
r2341 r3069 131 131 } 132 132 133 public void testIsArrayAnObject() throws Exception { 134 assertTrue(ReflectionUtils.is(byte[].class, Object.class)); 135 } 136 137 public void testIsPrimitiveByteAnObject() throws Exception { 138 assertFalse(ReflectionUtils.is(byte.class, Object.class)); 139 } 140 141 public void testIsByteWrapperAnObject() throws Exception { 142 assertTrue(ReflectionUtils.is(Byte.class, Object.class)); 143 } 144 133 145 }
Note: See TracChangeset
for help on using the changeset viewer.
