diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..d47badd --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_11.xml b/.idea/libraries/Maven__junit_junit_4_11.xml new file mode 100644 index 0000000..f33320d --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 0000000..f58bbc1 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..baffb29 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..1ee38f5 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..cafda27 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,901 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + true + + + + DIRECTORY + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + 1493751767576 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No facets are configured + + + + + + + + + + + + + + + 1.8 + + + + + + + + TypeInformation + + + + + + + + 1.8 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TypeInformation.iml b/TypeInformation.iml new file mode 100644 index 0000000..132c515 --- /dev/null +++ b/TypeInformation.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..86af8ca --- /dev/null +++ b/pom.xml @@ -0,0 +1,34 @@ + + + 4.0.0 + + sima.cameron.TypeInformation + TypeInformation + 1.0-SNAPSHOT + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 1.8 + 1.8 + + + + + + + + + junit + junit + 4.11 + + + + + \ No newline at end of file diff --git a/src/main/java/sima/cameron/reflector/Reflector.java b/src/main/java/sima/cameron/reflector/Reflector.java new file mode 100644 index 0000000..d17089e --- /dev/null +++ b/src/main/java/sima/cameron/reflector/Reflector.java @@ -0,0 +1,128 @@ +package sima.cameron.reflector; + +import java.lang.reflect.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Created by cameronsima on 5/2/17. + */ +public class Reflector { + + public boolean classImplementsInterface(Object object, String interfaceName) { + + try { + Class intface = Class.forName(interfaceName); + + return intface.isAssignableFrom(object.getClass()); + } catch (ClassNotFoundException e) { + System.out.println(e); + return false; + } + } + + public boolean classImplementsInterface(String objectName, String interfaceName) { + + try { + Class object = Class.forName(objectName); + Class intface = Class.forName(interfaceName); + return intface.isAssignableFrom(object); + } catch (ClassNotFoundException e) { + System.out.println(e); + return false; + } + } + + public boolean classImplementsInterface(Class clASS, String interfaceName) { + + try { + Class intface = Class.forName(interfaceName); + return intface.isAssignableFrom(clASS); + } catch (ClassNotFoundException e){ + System.out.println(e); + return false; + } + } + + public String listAllMembers(Object object) { + + ArrayList classes = getSuperClassArray(object); + StringBuilder sb = new StringBuilder(); + + for (Class cls : classes) { + System.out.println(cls); + sb.append(getClassMembers(cls)); + } + return sb.toString(); + } + + public String getClassMembers(Class cls) { + StringBuilder sb = new StringBuilder(); + + for (Field field : cls.getDeclaredFields()) { + sb.append(field + "\n"); + } + for (Constructor constructor : cls.getConstructors()) { + sb.append(constructor + "\n"); + } + + for (Method method : cls.getDeclaredMethods()) { + sb.append(method + "\n"); + } + + String result = sb.toString(); + return result; + } + + private ArrayList getSuperClassArray(Object object) { + + Class cls = object.getClass(); + ArrayList classes = new ArrayList<>(); + + while(cls != null) { + classes.add(cls); + cls = cls.getSuperclass(); + } + Collections.reverse(classes); + return classes; + } + + public String getClassHierarchy(Object object) { + + ArrayList classes = getSuperClassArray(object); + return buildHierarchyString(classes); + } + + private String buildHierarchyString(ArrayList classes) { + + StringBuilder sb = new StringBuilder(); + + for (int i = 0; i classes = getSuperClassArray(object); + ArrayList instances = new ArrayList<>(); + + for (Class cls : classes) { + try { + instances.add(cls.newInstance()); + } catch (Exception e) { + System.out.println(e); + System.out.println(cls + " can't be instantiated."); + } + } + return instances; + } +} diff --git a/src/main/java/sima/cameron/unitcorn/Result.java b/src/main/java/sima/cameron/unitcorn/Result.java new file mode 100644 index 0000000..9f7a04a --- /dev/null +++ b/src/main/java/sima/cameron/unitcorn/Result.java @@ -0,0 +1,30 @@ +package sima.cameron.unitcorn; + +import java.lang.reflect.Method; + +/** + * Created by cameronsima on 5/3/17. + */ +public class Result { + + private Object error; + + public Result() { + error = null; + } + + public void setError(Object object) { + this.error = object; + } + + public String getResult() { + + String resultString; + if (error != null) { + resultString = "Test failed with error: " + error.toString(); + } else { + resultString = "Test passed"; + } + return resultString; + } +} diff --git a/src/main/java/sima/cameron/unitcorn/UnitCornTestRunner.java b/src/main/java/sima/cameron/unitcorn/UnitCornTestRunner.java new file mode 100644 index 0000000..0e5e6bf --- /dev/null +++ b/src/main/java/sima/cameron/unitcorn/UnitCornTestRunner.java @@ -0,0 +1,108 @@ +package sima.cameron.unitcorn; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.lang.annotation.Annotation; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; + +/** + * Created by cameronsima on 5/3/17. + */ +public class UnitCornTestRunner { + + public Result runTest(Class c, String methodName) { + + Method method = getMethod(c, methodName); + Object obj = getClassInstance(c); + Result result = new Result(); + Throwable err = catchError(method, obj); + result.setError(err); + return result; + } + + private Method getMethod(Class c, String methodName) { + Method[] methods = c.getMethods(); + for (Method method : methods) { + if (method.toString().equals(methodName)) { + return method; + } + } + return null; + } + + private Object getClassInstance(Class c) { + try { + Object o = c.newInstance(); + return o; + } catch (InstantiationException e) { + System.out.println("Can't instantiate"); + } catch (IllegalAccessException e) { + System.out.println(e); + } + return null; + } + + private Throwable catchError(Method method, Object obj) { + try { + method.invoke(obj); + } catch (Exception e) { + + // unwrap InvocationTargetException to get to underlying error, if it exists + return e.getCause(); + } + return null; + } + + public String runTests(Class c) { + + StringBuilder sb = new StringBuilder(); + Method[] methods = c.getDeclaredMethods(); + ArrayList testMethods = getAnnotatedMethods(methods, Test.class); + + for (Method method : testMethods) { + runBeforeMethods(methods, c); + Result result = runTest(c, method.toString()); + runAfterMethods(methods, c); + sb.append(result.getResult() + "\n"); + } + return sb.toString(); + } + + private void runBeforeMethods(Method[] methods, Class c) { + ArrayList beforeMethods = getAnnotatedMethods(methods, Before.class); + Method[] resultArr = beforeMethods.toArray(new Method[beforeMethods.size()]); + runMethods(resultArr, c); + } + + private void runAfterMethods(Method[] methods, Class c) { + ArrayList afterMethods = getAnnotatedMethods(methods, After.class); + Method[] resultArr = afterMethods.toArray(new Method[afterMethods.size()]); + runMethods(resultArr, c); + } + + private void runMethods(Method[] methods, Class c) { + for (Method method : methods) { + Object obj = getClassInstance(c); + Throwable err = catchError(method, obj); + if (err != null){ + System.out.println(err); + } + } + } + + public ArrayList getAnnotatedMethods(Method[] methods, Class annotationClass) { + ArrayList methodsArr = new ArrayList<>(); + + for (Method method : methods) { + if (method.isAnnotationPresent(annotationClass)) { + methodsArr.add(method); + } + } + return methodsArr; + } +} diff --git a/src/test/java/ReflectorTest.java b/src/test/java/ReflectorTest.java new file mode 100644 index 0000000..849337d --- /dev/null +++ b/src/test/java/ReflectorTest.java @@ -0,0 +1,197 @@ +import com.google.common.io.CharStreams; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import sima.cameron.reflector.Reflector; + +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + + +/** + * Created by cameronsima on 5/2/17. + */ +public class ReflectorTest { + + private Reflector reflector; + private Class cls; + + + @Before + public void setUp() { + + reflector = new Reflector(); + try { + cls = Class.forName("java.util.List"); + } catch (ClassNotFoundException e) { + System.out.println(e); + } + + + } + + @Test + public void testClassImplementsInterfaceObject() { + + ArrayList arrayList= new ArrayList<>(); + Assert.assertTrue(reflector.classImplementsInterface(arrayList, "java.util.List")); + } + + @Test + public void testClassImplementsInterfaceString() { + + Assert.assertTrue(reflector.classImplementsInterface("java.util.ArrayList", "java.util.List")); + + } + @Test + public void testClassImplementsInterfaceClass() { + + Assert.assertTrue(reflector.classImplementsInterface(cls, "java.util.List")); + } + + @Test + public void testGetClassMembers() { + + Class cls = new Integer(1).getClass(); + + String actualValue = reflector.getClassMembers(cls); + + String expectedValue = "public static final int java.lang.Integer.MIN_VALUE\n" + + "public static final int java.lang.Integer.MAX_VALUE\n" + + "public static final java.lang.Class java.lang.Integer.TYPE\n" + + "static final char[] java.lang.Integer.digits\n" + + "static final char[] java.lang.Integer.DigitTens\n" + + "static final char[] java.lang.Integer.DigitOnes\n" + + "static final int[] java.lang.Integer.sizeTable\n" + + "private final int java.lang.Integer.value\n" + + "public static final int java.lang.Integer.SIZE\n" + + "public static final int java.lang.Integer.BYTES\n" + + "private static final long java.lang.Integer.serialVersionUID\n" + + "public java.lang.Integer(int)\n" + + "public java.lang.Integer(java.lang.String) throws java.lang.NumberFormatException\n" + + "public static int java.lang.Integer.numberOfLeadingZeros(int)\n" + + "public static int java.lang.Integer.numberOfTrailingZeros(int)\n" + + "public static int java.lang.Integer.bitCount(int)\n" + + "public boolean java.lang.Integer.equals(java.lang.Object)\n" + + "public static java.lang.String java.lang.Integer.toString(int,int)\n" + + "public java.lang.String java.lang.Integer.toString()\n" + + "public static java.lang.String java.lang.Integer.toString(int)\n" + + "public static int java.lang.Integer.hashCode(int)\n" + + "public int java.lang.Integer.hashCode()\n" + + "public static int java.lang.Integer.min(int,int)\n" + + "public static int java.lang.Integer.max(int,int)\n" + + "public static int java.lang.Integer.reverseBytes(int)\n" + + "public int java.lang.Integer.compareTo(java.lang.Integer)\n" + + "public int java.lang.Integer.compareTo(java.lang.Object)\n" + + "public byte java.lang.Integer.byteValue()\n" + + "public short java.lang.Integer.shortValue()\n" + + "public int java.lang.Integer.intValue()\n" + + "public long java.lang.Integer.longValue()\n" + + "public float java.lang.Integer.floatValue()\n" + + "public double java.lang.Integer.doubleValue()\n" + + "public static java.lang.Integer java.lang.Integer.valueOf(int)\n" + + "public static java.lang.Integer java.lang.Integer.valueOf(java.lang.String) throws java.lang.NumberFormatException\n" + + "public static java.lang.Integer java.lang.Integer.valueOf(java.lang.String,int) throws java.lang.NumberFormatException\n" + + "public static java.lang.String java.lang.Integer.toHexString(int)\n" + + "static void java.lang.Integer.getChars(int,int,char[])\n" + + "public static java.lang.Integer java.lang.Integer.decode(java.lang.String) throws java.lang.NumberFormatException\n" + + "public static int java.lang.Integer.compare(int,int)\n" + + "public static int java.lang.Integer.reverse(int)\n" + + "static int java.lang.Integer.stringSize(int)\n" + + "public static int java.lang.Integer.sum(int,int)\n" + + "public static long java.lang.Integer.toUnsignedLong(int)\n" + + "public static int java.lang.Integer.parseInt(java.lang.String) throws java.lang.NumberFormatException\n" + + "public static int java.lang.Integer.parseInt(java.lang.String,int) throws java.lang.NumberFormatException\n" + + "public static java.lang.String java.lang.Integer.toUnsignedString(int)\n" + + "public static java.lang.String java.lang.Integer.toUnsignedString(int,int)\n" + + "public static java.lang.String java.lang.Integer.toOctalString(int)\n" + + "public static java.lang.String java.lang.Integer.toBinaryString(int)\n" + + "private static java.lang.String java.lang.Integer.toUnsignedString0(int,int)\n" + + "static int java.lang.Integer.formatUnsignedInt(int,int,char[],int,int)\n" + + "public static int java.lang.Integer.parseUnsignedInt(java.lang.String) throws java.lang.NumberFormatException\n" + + "public static int java.lang.Integer.parseUnsignedInt(java.lang.String,int) throws java.lang.NumberFormatException\n" + + "public static java.lang.Integer java.lang.Integer.getInteger(java.lang.String,int)\n" + + "public static java.lang.Integer java.lang.Integer.getInteger(java.lang.String)\n" + + "public static java.lang.Integer java.lang.Integer.getInteger(java.lang.String,java.lang.Integer)\n" + + "public static int java.lang.Integer.compareUnsigned(int,int)\n" + + "public static int java.lang.Integer.divideUnsigned(int,int)\n" + + "public static int java.lang.Integer.remainderUnsigned(int,int)\n" + + "public static int java.lang.Integer.highestOneBit(int)\n" + + "public static int java.lang.Integer.lowestOneBit(int)\n" + + "public static int java.lang.Integer.rotateLeft(int,int)\n" + + "public static int java.lang.Integer.rotateRight(int,int)\n" + + "public static int java.lang.Integer.signum(int)\n"; + + Assert.assertEquals(expectedValue, actualValue); + } + + + @Test + public void testListAllMembers() { + + try { + String url = getClass().getClassLoader().getResource("IntegerAllMembers.txt").getFile(); + FileReader reader = new FileReader(url); + + String expectedValue = CharStreams.toString(reader); + + Integer i = new Integer(1); + + String actualValue = reflector.listAllMembers(i); + + Assert.assertEquals(expectedValue, actualValue); + } catch (IOException e) { + System.out.println(e); + } + } + + + + @Test + public void testGetClassHierarchy() { + + Integer i = new Integer(3); + + String expectedValue = "class java.lang.Object\n" + + "\tclass java.lang.Number\n" + + "\t\tclass java.lang.Integer\n"; + + String actualValue = reflector.getClassHierarchy(i); + + Assert.assertEquals(expectedValue, actualValue); + + } + + @Test + public void testGetInstancesFromHierarchy_arraysAreEqual() { + Integer i = new Integer(1); + Object obj = new Object(); + + // Only Object can be instantiated in hierarchy Integer > Number > Object + List list = new ArrayList(); + list.add(obj); + Object[] expectedArr = new Object[list.size()]; + + List result = reflector.instantiateClassHierarchy(i); + Object[] resultArr = new Object[result.size()]; + + Assert.assertArrayEquals(expectedArr, resultArr); + + } + + @Test + public void testGetInstancesFromHierarchy_classesAreUnique() { + Integer i = new Integer(1); + List result = reflector.instantiateClassHierarchy(i); + + // confirm each list item is an instance of a different class + Class cls = null; + for (Object o : result) { + Assert.assertTrue((o.getClass() != cls)); + cls = o.getClass(); + } + } + +} diff --git a/src/test/java/UnitCornTestRunnerTestTests.java b/src/test/java/UnitCornTestRunnerTestTests.java new file mode 100644 index 0000000..b6d7933 --- /dev/null +++ b/src/test/java/UnitCornTestRunnerTestTests.java @@ -0,0 +1,33 @@ +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * Created by cameronsima on 5/4/17. + */ +public class UnitCornTestRunnerTestTests { + + @Before + public void setUp() { + System.out.println("Setting up. . ."); + } + + @After + public void tearDown() { + System.out.println("Tearing down. . ."); + } + + @Test + public void testThatPasses() { + + int i = 5; + + Assert.assertEquals(i, i); + } + @Test + public void testThatFails() { + + Assert.assertTrue(false); + } +} diff --git a/src/test/java/UnitCornTests.java b/src/test/java/UnitCornTests.java new file mode 100644 index 0000000..ecf5ac8 --- /dev/null +++ b/src/test/java/UnitCornTests.java @@ -0,0 +1,68 @@ +import jdk.management.cmm.SystemResourcePressureMXBean; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import sima.cameron.unitcorn.Result; +import sima.cameron.unitcorn.UnitCornTestRunner; + +/** + * Created by cameronsima on 5/4/17. + */ +public class UnitCornTests { + + private Class cls; + private Class testTestsClass; + + @Before + public void setup() { + + try { + cls = Class.forName("ReflectorTest"); + // System.out.println("CLass: " + cls.toString()); + } catch (ClassNotFoundException e) { + System.out.println("Class not found"); + } + + try { + testTestsClass = Class.forName("UnitCornTestRunnerTestTests"); + } catch (ClassNotFoundException e) { + System.out.println("Test Class not found"); + } + } + + @Test + public void testRunTest_withFailingTest() { + + UnitCornTestRunner utr = new UnitCornTestRunner(); + + Result result = utr.runTest(testTestsClass,"public void UnitCornTestRunnerTestTests.testThatFails()"); + String expectedValue = "Test failed with error: java.lang.AssertionError"; + String actualValue = result.getResult(); + + Assert.assertEquals(expectedValue, actualValue); + } + + @Test + public void testRunTest_withPassingTest() { + + UnitCornTestRunner utr = new UnitCornTestRunner(); + + Result result = utr.runTest(testTestsClass,"public void UnitCornTestRunnerTestTests.testThatPasses()"); + String expectedValue = "Test passed"; + String actualValue = result.getResult(); + + Assert.assertEquals(expectedValue, actualValue); + } + + @Test + public void testRunTests() { + + UnitCornTestRunner utr = new UnitCornTestRunner(); + + String expectedValue = "Test passed\n" + + "Test failed with error: java.lang.AssertionError\n"; + String actualValue = utr.runTests(testTestsClass); + + Assert.assertEquals(expectedValue, actualValue); + } +} diff --git a/src/test/resources/IntegerAllMembers.txt b/src/test/resources/IntegerAllMembers.txt new file mode 100644 index 0000000..6f69194 --- /dev/null +++ b/src/test/resources/IntegerAllMembers.txt @@ -0,0 +1,86 @@ +public java.lang.Object() +protected void java.lang.Object.finalize() throws java.lang.Throwable +public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException +public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException +public final void java.lang.Object.wait() throws java.lang.InterruptedException +public boolean java.lang.Object.equals(java.lang.Object) +public java.lang.String java.lang.Object.toString() +public native int java.lang.Object.hashCode() +public final native java.lang.Class java.lang.Object.getClass() +protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException +private static native void java.lang.Object.registerNatives() +public final native void java.lang.Object.notify() +public final native void java.lang.Object.notifyAll() +private static final long java.lang.Number.serialVersionUID +public java.lang.Number() +public byte java.lang.Number.byteValue() +public short java.lang.Number.shortValue() +public abstract int java.lang.Number.intValue() +public abstract long java.lang.Number.longValue() +public abstract float java.lang.Number.floatValue() +public abstract double java.lang.Number.doubleValue() +public static final int java.lang.Integer.MIN_VALUE +public static final int java.lang.Integer.MAX_VALUE +public static final java.lang.Class java.lang.Integer.TYPE +static final char[] java.lang.Integer.digits +static final char[] java.lang.Integer.DigitTens +static final char[] java.lang.Integer.DigitOnes +static final int[] java.lang.Integer.sizeTable +private final int java.lang.Integer.value +public static final int java.lang.Integer.SIZE +public static final int java.lang.Integer.BYTES +private static final long java.lang.Integer.serialVersionUID +public java.lang.Integer(int) +public java.lang.Integer(java.lang.String) throws java.lang.NumberFormatException +public static int java.lang.Integer.numberOfLeadingZeros(int) +public static int java.lang.Integer.numberOfTrailingZeros(int) +public static int java.lang.Integer.bitCount(int) +public boolean java.lang.Integer.equals(java.lang.Object) +public static java.lang.String java.lang.Integer.toString(int,int) +public java.lang.String java.lang.Integer.toString() +public static java.lang.String java.lang.Integer.toString(int) +public static int java.lang.Integer.hashCode(int) +public int java.lang.Integer.hashCode() +public static int java.lang.Integer.min(int,int) +public static int java.lang.Integer.max(int,int) +public static int java.lang.Integer.reverseBytes(int) +public int java.lang.Integer.compareTo(java.lang.Integer) +public int java.lang.Integer.compareTo(java.lang.Object) +public byte java.lang.Integer.byteValue() +public short java.lang.Integer.shortValue() +public int java.lang.Integer.intValue() +public long java.lang.Integer.longValue() +public float java.lang.Integer.floatValue() +public double java.lang.Integer.doubleValue() +public static java.lang.Integer java.lang.Integer.valueOf(int) +public static java.lang.Integer java.lang.Integer.valueOf(java.lang.String) throws java.lang.NumberFormatException +public static java.lang.Integer java.lang.Integer.valueOf(java.lang.String,int) throws java.lang.NumberFormatException +public static java.lang.String java.lang.Integer.toHexString(int) +static void java.lang.Integer.getChars(int,int,char[]) +public static java.lang.Integer java.lang.Integer.decode(java.lang.String) throws java.lang.NumberFormatException +public static int java.lang.Integer.compare(int,int) +public static int java.lang.Integer.reverse(int) +static int java.lang.Integer.stringSize(int) +public static int java.lang.Integer.sum(int,int) +public static long java.lang.Integer.toUnsignedLong(int) +public static int java.lang.Integer.parseInt(java.lang.String) throws java.lang.NumberFormatException +public static int java.lang.Integer.parseInt(java.lang.String,int) throws java.lang.NumberFormatException +public static java.lang.String java.lang.Integer.toUnsignedString(int) +public static java.lang.String java.lang.Integer.toUnsignedString(int,int) +public static java.lang.String java.lang.Integer.toOctalString(int) +public static java.lang.String java.lang.Integer.toBinaryString(int) +private static java.lang.String java.lang.Integer.toUnsignedString0(int,int) +static int java.lang.Integer.formatUnsignedInt(int,int,char[],int,int) +public static int java.lang.Integer.parseUnsignedInt(java.lang.String) throws java.lang.NumberFormatException +public static int java.lang.Integer.parseUnsignedInt(java.lang.String,int) throws java.lang.NumberFormatException +public static java.lang.Integer java.lang.Integer.getInteger(java.lang.String,int) +public static java.lang.Integer java.lang.Integer.getInteger(java.lang.String) +public static java.lang.Integer java.lang.Integer.getInteger(java.lang.String,java.lang.Integer) +public static int java.lang.Integer.compareUnsigned(int,int) +public static int java.lang.Integer.divideUnsigned(int,int) +public static int java.lang.Integer.remainderUnsigned(int,int) +public static int java.lang.Integer.highestOneBit(int) +public static int java.lang.Integer.lowestOneBit(int) +public static int java.lang.Integer.rotateLeft(int,int) +public static int java.lang.Integer.rotateRight(int,int) +public static int java.lang.Integer.signum(int)