Abstract Interface Member in Java

digitization, transformation, binary

Abstract Interface Member in Java

The Member interface defines methods shared by members of a class: fields, methods, and constructors.

The structure of the abstract interface Member is given by

public abstract interface java.lang.reflect.Member {
// Constants
public final static int DECLARED;
public final static int PUBLIC;
// Methods
public abstract Class getDeclaringClass();
public abstract int getModifiers();
public abstract String getName();
}

The details of the class structure are given as follows:

Ads code goes here
public final static int DECLARED;

public final static int DECLARED represents a  constant that represents the set of all declared members of a class or interface. This set does not include inherited members. The set can be used in calls to SecurityManager.checkMemberAccess().

public final static int PUBLIC;

public final static int PUBLIC represents a constant that represents the set of all public members of a class or interface, including inherited members. The set can be used in calls to SecurityManager.checkMemberAccess().

public abstract Class getDeclaringClass();

public abstract Class getDeclaringClass() method returns the Class object for the class in which this member is declared.

This method returns the Class object that represents the class that declared this member.

public abstract int getModifiers();

public abstract int getModifiers() method returns an integer value that represents the modifiers of this member. The Modifier class should be used to decode the returned value.

This method returns an integer that represents the modifier keywords used to declare this member.

public abstract String getName();

public abstract String getName() method returns the name of this member.

This method returns the name of this member as a String.

Share and Enjoy !

Leave a Comment

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