AbstractMethodError in Java

AbstractMethodError in Java

AbstractMethodError in Java

AbstractMethodError is thrown when an application tries to call an abstract method. Normally this error is caught by the compiler. This error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.

Hierarchy of AbstractMethodError

java.lang.Object
   ↳java.lang.Throwable
   ↳java.lang.Error
   ↳java.lang.LinkageError
   ↳java.lang.IncompatibleClassChangeError
   ↳java.lang.AbstractMethodError
hierarchy of AbstractMethodError
hierarchy of AbstractMethodError

The structure of AbstractMethodError is defined as below:

public class java.lang.AbstractMethodError extends
             java.lang.IncompatibleClassChangeError{
//constructor
public AbstractMethodError();
//constructs an empty AbstractMethodError object that is an object with no 
//message specified.
public AbstractMethodError(String message);
//constructs an AbstractMethodError object with the message specified.
//Parameters:
message - the detail provided message.

}

Apart from these this class also has the below-inherited methods:
From Object class”

Ads code goes here
  • clone()
  • getClass()
  • equals(Object obj);
  • finalize()
  • hashCode()
  • notify()
  • notifyAll()
  • wait()
  • wait(long timeput)
  • wait(long timeout,int nanos)

From Throwable:

  • fillInStackTrace()
  • addSuppressed()
  • getMessage()
  • getStackTrace()
  • getSuppressed()
  • getCause()
  • getLocalizedMessage()
  • initCause()
  • printStackTrace()
  • printStackTrace(PrintWriter writer)
  • printStackTrace(PrintStream out)
  • toString()
  • setStackTrace()

AbstractMethodError in Android

Constructors

CONSTRUCTORS
AbstractMethodError()Constructs a new AbstractMethodError that includes the current stack trace.
AbstractMethodError(IntPtr, JniHandleOwnership)A constructor used when creating managed representations of JNI objects; called by the runtime.
AbstractMethodError(String)Constructs a new AbstractMethodError with the current stack trace and the specified detail message.

Properties

PROPERTIES
CauseReturns the cause of this Throwable, or null if there is no cause.

(Inherited from Throwable)

ClassInherited from Throwable
HandleThe handle to the underlying Android instance.

(Inherited from Throwable)

IJavaObjectEx.IsProxyInherited from Throwable
IJavaObjectEx.KeyHandleInherited from Throwable
IJavaObjectEx.NeedsActivationInherited from Throwable
IJavaPeerable.JniManagedPeerStateInherited from Throwable
JniIdentityHashCodeInherited from Throwable

JniPeerMembers

LocalizedMessageReturns the detail message which was provided when this Throwable was created.

(Inherited from Throwable)

MessageReturns the detail message which was provided when this Throwable was created.

(Inherited from Throwable)

PeerReferenceInherited from Throwable
StackTraceInherited from Throwable
ThresholdClassThis API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
ThresholdTypeThis API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

METHODS
AddSuppressed(Throwable)Adds throwable to the list of throwables suppressed by this.

(Inherited from Throwable)

Dispose()Inherited from Throwable
Dispose(Boolean)Inherited from Throwable
FillInStackTrace()Records the stack trace from the point where this method has been called to this Throwable.

(Inherited from Throwable)

GetStackTrace()Returns a clone of the array of stack trace elements of this Throwable.

(Inherited from Throwable)

GetSuppressed()Returns the throwables suppressed by this.

(Inherited from Throwable)

InitCause(Throwable)Initializes the cause of this Throwable.

(Inherited from Throwable)

PrintStackTrace()Writes a printable representation of this Throwable’s stack trace to the System.err stream.

(Inherited from Throwable)

PrintStackTrace(PrintStream)Writes a printable representation of this Throwable’s stack trace to the given print stream.

(Inherited from Throwable)

PrintStackTrace(PrintWriter)Writes a printable representation of this Throwable’s stack trace to the specified print writer.

(Inherited from Throwable)

SetHandle(IntPtr, JniHandleOwnership)Sets the Handle property.

(Inherited from Throwable)

SetStackTrace(StackTraceElement[])Sets the array of stack trace elements.

(Inherited from Throwable)

ToString()Inherited from Throwable
UnregisterFromRuntime()Inherited from Throwable

Fields

FIELDS
is_generatedInherited from Throwable

Explicit Interface Implementations

EXPLICIT INTERFACE IMPLEMENTATIONS
IJavaObjectEx.ToLocalJniHandle()Inherited from Throwable
IJavaPeerable.Disposed()Inherited from Throwable
IJavaPeerable.DisposeUnlessReferenced()Inherited from Throwable
IJavaPeerable.Finalized()Inherited from Throwable
IJavaPeerable.SetJniIdentityHashCode(Int32)Inherited from Throwable
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)Inherited from Throwable
IJavaPeerable.SetPeerReference(JniObjectReference)Inherited from Throwable

Extension Methods

EXTENSION METHODS
JavaCast<TResult>(IJavaObject)Performs an Android runtime-checked type conversion.
JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Share and Enjoy !

READ  Constant Concept Simplified in Java

Leave a Comment

Your email address will not be published. Required fields are marked *