Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
20.9.2014 - We have just updated our course layouts and descriptions and added our 2015 schedule.

What methods are available on this Java object?

Q: "What can I do with an ArrayIndexOutOfBoundsException?" for example ...

A: Use the javap utility to ask what methods are available on the class ... and descent into its base class structure too, using further javap calls:

wizard:java graham$ javap java.lang.ArrayIndexOutOfBoundsException
Compiled from "ArrayIndexOutOfBoundsException.java"
public class java.lang.ArrayIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException{
public java.lang.ArrayIndexOutOfBoundsException();
public java.lang.ArrayIndexOutOfBoundsException(int);
public java.lang.ArrayIndexOutOfBoundsException(java.lang.String);
}
 
wizard:java graham$ javap java.lang.IndexOutOfBoundsException
Compiled from "IndexOutOfBoundsException.java"
public class java.lang.IndexOutOfBoundsException extends java.lang.RuntimeException{
public java.lang.IndexOutOfBoundsException();
public java.lang.IndexOutOfBoundsException(java.lang.String);
}
 
wizard:java graham$ javap java.lang.RuntimeException
Compiled from "RuntimeException.java"
public class java.lang.RuntimeException extends java.lang.Exception{
static final long serialVersionUID;
public java.lang.RuntimeException();
public java.lang.RuntimeException(java.lang.String);
public java.lang.RuntimeException(java.lang.String, java.lang.Throwable);
public java.lang.RuntimeException(java.lang.Throwable);
}
 
wizard:java graham$ javap java.lang.Exception
Compiled from "Exception.java"
public class java.lang.Exception extends java.lang.Throwable{
static final long serialVersionUID;
public java.lang.Exception();
public java.lang.Exception(java.lang.String);
public java.lang.Exception(java.lang.String, java.lang.Throwable);
public java.lang.Exception(java.lang.Throwable);
}
 
wizard:java graham$ javap java.lang.Throwable
Compiled from "Throwable.java"
public class java.lang.Throwable extends java.lang.Object implements java.io.Serializable{
public java.lang.Throwable();
public java.lang.Throwable(java.lang.String);
public java.lang.Throwable(java.lang.String, java.lang.Throwable);
public java.lang.Throwable(java.lang.Throwable);
public java.lang.String getMessage();
public java.lang.String getLocalizedMessage();
public java.lang.Throwable getCause();
public synchronized java.lang.Throwable initCause(java.lang.Throwable);
public java.lang.String toString();
public void printStackTrace();
public void printStackTrace(java.io.PrintStream);
public void printStackTrace(java.io.PrintWriter);
public synchronized native java.lang.Throwable fillInStackTrace();
public java.lang.StackTraceElement[] getStackTrace();
public void setStackTrace(java.lang.StackTraceElement[]);
}
 
wizard:java graham$ javap java.lang.Object
Compiled from "Object.java"
public class java.lang.Object{
public java.lang.Object();
public final native java.lang.Class getClass();
public native int hashCode();
public boolean equals(java.lang.Object);
protected native java.lang.Object clone() throws java.lang.CloneNotSupportedException;
public java.lang.String toString();
public final native void notify();
public final native void notifyAll();
public final native void wait(long) throws java.lang.InterruptedException;
public final void wait(long, int) throws java.lang.InterruptedException;
public final void wait() throws java.lang.InterruptedException;
protected void finalize() throws java.lang.Throwable;
static {};
}


I can feel a bit of scripting coming on (Jython would seem appropriate!) if I wanted to do that sort of thing on a regular basis!
(written 2010-07-08, updated 2010-07-09)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
J710 - Java - Extending Classes and More
  [3047] What is a universal superclass? Java / Perl / Python / Other OO languages - (2010-11-13)
  [2604] Tips for writing a test program (Ruby / Python / Java) - (2010-01-29)
  [2434] Abstract classes, Interfaces, PHP and Java - (2009-10-03)
  [2185] Abstract Classes - Java - (2009-05-16)
  [1819] Calling base class constructors - (2008-10-03)
  [1556] Java - a demonstration of inheritance on just one page - (2008-02-26)
  [1538] Teaching Object Oriented Java with Students and Ice Cream - (2008-02-12)
  [1501] Java - using super to call a method in the parent class - (2008-01-10)
  [1294] An example of Java Inheritance from scratch - (2007-08-00)
  [1217] What are factory and singleton classes? - (2007-06-04)
  [1066] Final, Finally and Finalize - three special words in Java - (2007-02-05)
  [831] Comparison of Object Oriented Philosophy - Python, Java, C++, Perl - (2006-08-13)
  [656] Think about your design even if you don't use full UML - (2006-03-24)


Back to
Using java, javac, jar, and CLASSPATH - a simple example
Previous and next
or
Horse's mouth home
Forward to
MySQL and Java - connectivity past, present, and future thoughts
Some other Articles
Changing with weather and seasons
Writing a server in Java
Fail Safe Error Handling in Java via Exceptions
MySQL and Java - connectivity past, present, and future thoughts
What methods are available on this Java object?
Using java, javac, jar, and CLASSPATH - a simple example
The healthy option - away from the private car
Park and Ride at Batheaston - will it solve Wiltshires Ills?
Two sides of the coin
Train Services - Melksham to Bath and Bristol (and airport)
4289 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/2860_Wha ... ject-.html • PAGE BUILT: Thu Sep 18 15:30:25 2014 • BUILD SYSTEM: WomanWithCat