Table of Contents

Class Class

Namespace
Java.Lang
Assembly
MASES.JNet.dll
public class Class : JVMBridgeBase<Class>, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition, IGenericDeclaration, IAnnotatedElement
Inheritance
JVMBridgeBase
JVMBridgeBase<Class>
Class
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IJVMBridgeBase
IJVMBridgeDefinition
Inherited Members
JVMBridgeBase<Class>.IsAssignableFrom(IJavaType)
JVMBridgeBase<Class>.IsAssignableFrom<T>()
JVMBridgeBase<Class>.Execute<T>(params T[])
JVMBridgeBase<Class>.DynBridgeClazz
JVMBridgeBase<Class>.BridgeClazz
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.Dispose()
JVMBridgeBase.ToString()
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeListener
Extension Methods

Constructors

Class()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

public Class()

Class(params object[])

Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class

public Class(params object[] args)

Parameters

args object[]

Properties

AnnotatedInterfaces

public AnnotatedType[] AnnotatedInterfaces { get; }

Property Value

AnnotatedType[]

AnnotatedSuperclass

public AnnotatedType AnnotatedSuperclass { get; }

Property Value

AnnotatedType

Annotations

public Annotation[] Annotations { get; }

Property Value

Annotation[]

BridgeClassName

public override string BridgeClassName { get; }

Property Value

string

CanonicalName

public String CanonicalName { get; }

Property Value

String

ClassLoader

public ClassLoader ClassLoader { get; }

Property Value

ClassLoader

Classes

public Class[] Classes { get; }

Property Value

Class[]

ComponentType

public Class ComponentType { get; }

Property Value

Class

Constructors

public Constructor[] Constructors { get; }

Property Value

Constructor[]

DeclaredAnnotations

public Annotation[] DeclaredAnnotations { get; }

Property Value

Annotation[]

DeclaredClasses

public Class[] DeclaredClasses { get; }

Property Value

Class[]

DeclaredConstructors

public Constructor[] DeclaredConstructors { get; }

Property Value

Constructor[]

DeclaredFields

public Field[] DeclaredFields { get; }

Property Value

Field[]

DeclaredMethods

public Method[] DeclaredMethods { get; }

Property Value

Method[]

DeclaringClass

public Class DeclaringClass { get; }

Property Value

Class

EnclosingClass

public Class EnclosingClass { get; }

Property Value

Class

EnclosingConstructor

public Constructor EnclosingConstructor { get; }

Property Value

Constructor

EnclosingMethod

public Method EnclosingMethod { get; }

Property Value

Method

EnumConstants

public object[] EnumConstants { get; }

Property Value

object[]

Fields

public Field[] Fields { get; }

Property Value

Field[]

GenericInterfaces

public Type[] GenericInterfaces { get; }

Property Value

Type[]

GenericString

Returns a string describing this Class, including information about modifiers and type parameters.

public string GenericString { get; }

Property Value

string

GenericSuperClass

Returns the Type representing the direct superclass of the entity (class, interface, primitive type or void) represented by this Class.

public Type GenericSuperClass { get; }

Property Value

Type

GenericSuperclass

public Type GenericSuperclass { get; }

Property Value

Type

Interfaces

public Class[] Interfaces { get; }

Property Value

Class[]

IsBridgeAbstract

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

public override bool IsBridgeStatic { get; }

Property Value

bool

Methods

public Method[] Methods { get; }

Property Value

Method[]

Modifiers

public int Modifiers { get; }

Property Value

int

Module

public Module Module { get; }

Property Value

Module

Name

public String Name { get; }

Property Value

String

NestHost

public Class NestHost { get; }

Property Value

Class

NestMembers

public Class[] NestMembers { get; }

Property Value

Class[]

Package

public Package Package { get; }

Property Value

Package

PackageName

public String PackageName { get; }

Property Value

String

ProtectionDomain

public ProtectionDomain ProtectionDomain { get; }

Property Value

ProtectionDomain

Signers

public object[] Signers { get; }

Property Value

object[]

SimpleName

public String SimpleName { get; }

Property Value

String

SuperClass

Returns the Class representing the superclass of the entity (class, interface, primitive type or void) represented by this Class.

public Class SuperClass { get; }

Property Value

Class

Superclass

public Class Superclass { get; }

Property Value

Class

SystemClassLoader

Returns the cached SystemClassLoader, it is used internally from Of<T>(ClassLoader)

public static ClassLoader SystemClassLoader { get; }

Property Value

ClassLoader

TypeName

public String TypeName { get; }

Property Value

String

TypeParameters

public TypeVariable[] TypeParameters { get; }

Property Value

TypeVariable[]

Methods

AsSubclass(Class)

public Class AsSubclass(Class arg0)

Parameters

arg0 Class

Class

Returns

Class

Class

AsSubclass<U>(Class<U>)

Casts this Class object to represent a subclass of the class represented by the specified class object. Checks that the cast is valid, and throws a ClassCastException if it is not. If this method succeeds, it always returns a reference to this class object.

public Class<U> AsSubclass<U>(Class<U> clazz) where U : IJVMBridgeBase, new()

Parameters

clazz Class<U>

The class of the type to cast this class object to

Returns

Class<U>

This Class object, cast to represent a subclass of the specified class object.

Type Parameters

U

The type implementing MASES.JCOBridge.C2JBridge.IJVMBridgeBase

Cast(object)

public object Cast(object arg0)

Parameters

arg0 object

object

Returns

object

object

DesiredAssertionStatus()

public bool DesiredAssertionStatus()

Returns

bool

bool

ForName(Module, String)

public static Class ForName(Module arg0, String arg1)

Parameters

arg0 Module

Module

arg1 String

String

Returns

Class

Class

ForName(String)

public static Class ForName(String arg0)

Parameters

arg0 String

String

Returns

Class

Class

Exceptions

ClassNotFoundException

ForName(String, bool, ClassLoader)

public static Class ForName(String arg0, bool arg1, ClassLoader arg2)

Parameters

arg0 String

String

arg1 bool

bool

arg2 ClassLoader

ClassLoader

Returns

Class

Class

Exceptions

ClassNotFoundException

ForName(string)

Returns the Class object associated with the class or interface with the given string name.

public static Class ForName(string className)

Parameters

className string

The fully qualified name of the desired class.

Returns

Class

The Class object for the class with the specified name.

ForName(string, bool, ClassLoader)

Returns the Class object associated with the class or interface with the given string name.

public static Class ForName(string className, bool initialize, ClassLoader loader)

Parameters

className string

The fully qualified name of the desired class.

initialize bool

If true the class will be initialized. See Section 12.4 of The Java Language Specification.

loader ClassLoader

Class loader from which the class must be loaded

Returns

Class

The Class object for the class with the specified name.

GetAnnotation(Class)

public Annotation GetAnnotation(Class arg0)

Parameters

arg0 Class

Class

Returns

Annotation

Annotation

GetAnnotation<T>(Class)

public T GetAnnotation<T>(Class arg0) where T : IAnnotation, new()

Parameters

arg0 Class

Returns

T

Type Parameters

T

GetAnnotation<A>(Class<A>)

Returns this element's annotation for the specified type if such an annotation is present, else null.

public A GetAnnotation<A>(Class<A> annotationClass) where A : Annotation

Parameters

annotationClass Class<A>

Returns

A

Type Parameters

A

GetAnnotationsByType(Class)

public Annotation[] GetAnnotationsByType(Class arg0)

Parameters

arg0 Class

Class

Returns

Annotation[]

Annotation

GetAnnotationsByType<T>(Class)

public T[] GetAnnotationsByType<T>(Class arg0) where T : IAnnotation, new()

Parameters

arg0 Class

Returns

T[]

Type Parameters

T

GetAnnotationsByType<A>(Class<A>)

Returns annotations that are associated with this element.

public A[] GetAnnotationsByType<A>(Class<A> annotationClass) where A : Annotation

Parameters

annotationClass Class<A>

Returns

A[]

Type Parameters

A

GetConstructor(params Class[])

public Constructor GetConstructor(params Class[] arg0)

Parameters

arg0 Class[]

Class

Returns

Constructor

Constructor

Exceptions

NoSuchMethodException
SecurityException

GetDeclaredAnnotation(Class)

public Annotation GetDeclaredAnnotation(Class arg0)

Parameters

arg0 Class

Class

Returns

Annotation

Annotation

GetDeclaredAnnotation<T>(Class)

public T GetDeclaredAnnotation<T>(Class arg0) where T : IAnnotation, new()

Parameters

arg0 Class

Returns

T

Type Parameters

T

GetDeclaredAnnotationsByType(Class)

public Annotation[] GetDeclaredAnnotationsByType(Class arg0)

Parameters

arg0 Class

Class

Returns

Annotation[]

Annotation

GetDeclaredAnnotationsByType<T>(Class)

public T[] GetDeclaredAnnotationsByType<T>(Class arg0) where T : IAnnotation, new()

Parameters

arg0 Class

Returns

T[]

Type Parameters

T

GetDeclaredConstructor(params Class[])

public Constructor GetDeclaredConstructor(params Class[] arg0)

Parameters

arg0 Class[]

Class

Returns

Constructor

Constructor

Exceptions

NoSuchMethodException
SecurityException

GetDeclaredField(String)

public Field GetDeclaredField(String arg0)

Parameters

arg0 String

String

Returns

Field

Field

Exceptions

NoSuchFieldException
SecurityException

GetDeclaredField(string)

Returns a Field object that reflects the specified declared field of the class or interface represented by this Class object.

public Field GetDeclaredField(string name)

Parameters

name string

Returns

Field

GetDeclaredMethod(String, params Class[])

public Method GetDeclaredMethod(String arg0, params Class[] arg1)

Parameters

arg0 String

String

arg1 Class[]

Class

Returns

Method

Method

Exceptions

NoSuchMethodException
SecurityException

GetDeclaredMethod(string)

Returns a Method object that reflects the specified declared method of the class or interface represented by this Class object.

public Method GetDeclaredMethod(string name)

Parameters

name string

Returns

Method

GetField(String)

public Field GetField(String arg0)

Parameters

arg0 String

String

Returns

Field

Field

Exceptions

NoSuchFieldException
SecurityException

GetField(string)

Returns a Field object that reflects the specified public member field of the class or interface represented by this Class object.

public Field GetField(string name)

Parameters

name string

Returns

Field

GetMethod(String, params Class[])

public Method GetMethod(String arg0, params Class[] arg1)

Parameters

arg0 String

String

arg1 Class[]

Class

Returns

Method

Method

Exceptions

NoSuchMethodException
SecurityException

GetMethod(string, params Class[])

Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object.

public Method GetMethod(string name, params Class[] parameterTypes)

Parameters

name string
parameterTypes Class[]

Returns

Method

GetResource(String)

public URL GetResource(String arg0)

Parameters

arg0 String

String

Returns

URL

URL

GetResourceAsStream(String)

public InputStream GetResourceAsStream(String arg0)

Parameters

arg0 String

String

Returns

InputStream

InputStream

IsAnnotation()

public bool IsAnnotation()

Returns

bool

bool

IsAnnotationPresent(Class)

public bool IsAnnotationPresent(Class arg0)

Parameters

arg0 Class

Class

Returns

bool

bool

IsAnnotationPresent<TAnnotation>(Class<TAnnotation>)

Returns true if an annotation for the specified type is present on this element, else false. This method is designed primarily for convenient access to marker annotations.

public bool IsAnnotationPresent<TAnnotation>(Class<TAnnotation> annotationClass) where TAnnotation : Annotation, IJVMBridgeBase, new()

Parameters

annotationClass Class<TAnnotation>

the Class object corresponding to the annotation type

Returns

bool

true if an annotation for the specified annotation type is present on this element, else false

Type Parameters

TAnnotation

The Annotation class

IsAnonymousClass()

public bool IsAnonymousClass()

Returns

bool

bool

IsArray()

public bool IsArray()

Returns

bool

bool

IsAssignableFrom(Class)

public bool IsAssignableFrom(Class arg0)

Parameters

arg0 Class

Class

Returns

bool

bool

IsEnum()

public bool IsEnum()

Returns

bool

bool

IsInstance(object)

public bool IsInstance(object arg0)

Parameters

arg0 object

object

Returns

bool

bool

IsInterface()

public bool IsInterface()

Returns

bool

bool

IsLocalClass()

public bool IsLocalClass()

Returns

bool

bool

IsMemberClass()

public bool IsMemberClass()

Returns

bool

bool

IsNestmateOf(Class)

public bool IsNestmateOf(Class arg0)

Parameters

arg0 Class

Class

Returns

bool

bool

IsPrimitive()

public bool IsPrimitive()

Returns

bool

bool

IsSynthetic()

public bool IsSynthetic()

Returns

bool

bool

Of<T>()

Returns the Class object associated with the class or interface with the given string name.

public static Class<T> Of<T>() where T : IJVMBridgeBase, new()

Returns

Class<T>

The Class<T> object for the class with the specified name.

Type Parameters

T

The type implementing MASES.JCOBridge.C2JBridge.IJVMBridgeBase

Of<T>(ClassLoader)

Returns the Class object associated with the class or interface with the given string name.

public static Class<T> Of<T>(ClassLoader loader = null) where T : IJVMBridgeBase, new()

Parameters

loader ClassLoader

The ClassLoader to be used, default will use SystemClassLoader

Returns

Class<T>

The Class<T> object for the class with the specified name.

Type Parameters

T

The type implementing MASES.JCOBridge.C2JBridge.IJVMBridgeBase

ToGenericString()

public String ToGenericString()

Returns

String

String

Operators

implicit operator Serializable(Class)

Converter from Class to Serializable

public static implicit operator Serializable(Class t)

Parameters

t Class

Returns

Serializable

implicit operator AnnotatedElement(Class)

Converter from Class to AnnotatedElement

public static implicit operator AnnotatedElement(Class t)

Parameters

t Class

Returns

AnnotatedElement

implicit operator GenericDeclaration(Class)

Converter from Class to GenericDeclaration

public static implicit operator GenericDeclaration(Class t)

Parameters

t Class

Returns

GenericDeclaration

implicit operator Type(Class)

Converter from Class to Type

public static implicit operator Type(Class t)

Parameters

t Class

Returns

Type