Class Class
public class Class : JVMBridgeBase<Class>, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition, IGenericDeclaration, IAnnotatedElement
- Inheritance
-
JVMBridgeBaseJVMBridgeBase<Class>Class
- Implements
-
IJVMBridgeCoreIJVMBridgeBaseStaticIJVMBridgeBaseIJVMBridgeDefinition
- Inherited Members
-
JVMBridgeBase<Class>.IsAssignableFrom(IJavaType)JVMBridgeBase<Class>.IsAssignableFrom<T>()JVMBridgeBase<Class>.Execute<T>(params T[])JVMBridgeBase<Class>.DynBridgeClazzJVMBridgeBase<Class>.BridgeClazzJVMBridgeBase.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.IExecuteWithSignature<TNewClass, TReturn, TConverter>(string, string, params object[])JVMBridgeBase.DynBridgeInstanceJVMBridgeBase.BridgeInstanceJVMBridgeBase.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
AnnotatedSuperclass
public AnnotatedType AnnotatedSuperclass { get; }
Property Value
Annotations
public Annotation[] Annotations { get; }
Property Value
BridgeClassName
https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_BridgeClassName.htm
public override string BridgeClassName { get; }
Property Value
CanonicalName
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getCanonicalName()
public String CanonicalName { get; }
Property Value
ClassLoader
public ClassLoader ClassLoader { get; }
Property Value
Classes
public Class[] Classes { get; }
Property Value
- Class[]
ComponentType
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getComponentType()
public Class ComponentType { get; }
Property Value
Constructors
public Constructor[] Constructors { get; }
Property Value
DeclaredAnnotations
public Annotation[] DeclaredAnnotations { get; }
Property Value
DeclaredClasses
public Class[] DeclaredClasses { get; }
Property Value
- Class[]
DeclaredConstructors
public Constructor[] DeclaredConstructors { get; }
Property Value
DeclaredFields
public Field[] DeclaredFields { get; }
Property Value
- Field[]
DeclaredMethods
public Method[] DeclaredMethods { get; }
Property Value
- Method[]
DeclaringClass
public Class DeclaringClass { get; }
Property Value
EnclosingClass
public Class EnclosingClass { get; }
Property Value
EnclosingConstructor
public Constructor EnclosingConstructor { get; }
Property Value
EnclosingMethod
public Method EnclosingMethod { get; }
Property Value
EnumConstants
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getEnumConstants()
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
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
GenericSuperclass
public Type GenericSuperclass { get; }
Property Value
Interfaces
public Class[] Interfaces { get; }
Property Value
- Class[]
IsBridgeAbstract
public override bool IsBridgeAbstract { get; }
Property Value
IsBridgeCloseable
public override bool IsBridgeCloseable { get; }
Property Value
IsBridgeInterface
public override bool IsBridgeInterface { get; }
Property Value
IsBridgeStatic
public override bool IsBridgeStatic { get; }
Property Value
Methods
public Method[] Methods { get; }
Property Value
- Method[]
Modifiers
public int Modifiers { get; }
Property Value
Module
public Module Module { get; }
Property Value
Name
public String Name { get; }
Property Value
NestHost
public Class NestHost { get; }
Property Value
NestMembers
public Class[] NestMembers { get; }
Property Value
- Class[]
Package
public Package Package { get; }
Property Value
PackageName
public String PackageName { get; }
Property Value
ProtectionDomain
public ProtectionDomain ProtectionDomain { get; }
Property Value
Signers
public object[] Signers { get; }
Property Value
- object[]
SimpleName
public String SimpleName { get; }
Property Value
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
Superclass
public Class Superclass { get; }
Property Value
SystemClassLoader
Returns the cached SystemClassLoader, it is used internally from Of<T>(ClassLoader)
public static ClassLoader SystemClassLoader { get; }
Property Value
TypeName
public String TypeName { get; }
Property Value
TypeParameters
public TypeVariable[] TypeParameters { get; }
Property Value
Methods
AsSubclass(Class)
public Class AsSubclass(Class arg0)
Parameters
Returns
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
Type Parameters
U
The type implementing MASES.JCOBridge.C2JBridge.IJVMBridgeBase
Cast(object)
public object Cast(object arg0)
Parameters
Returns
DesiredAssertionStatus()
public bool DesiredAssertionStatus()
Returns
ForName(Module, String)
public static Class ForName(Module arg0, String arg1)
Parameters
Returns
ForName(String)
public static Class ForName(String arg0)
Parameters
Returns
Exceptions
ForName(String, bool, ClassLoader)
public static Class ForName(String arg0, bool arg1, ClassLoader arg2)
Parameters
arg0
Stringarg1
boolarg2
ClassLoader
Returns
Exceptions
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
stringThe fully qualified name of the desired class.
Returns
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
stringThe fully qualified name of the desired class.
initialize
boolIf true the class will be initialized. See Section 12.4 of The Java Language Specification.
loader
ClassLoaderClass loader from which the class must be loaded
Returns
GetAnnotation(Class)
public Annotation GetAnnotation(Class arg0)
Parameters
Returns
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
Returns
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
Returns
Exceptions
GetDeclaredAnnotation(Class)
public Annotation GetDeclaredAnnotation(Class arg0)
Parameters
Returns
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
Returns
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
Returns
Exceptions
GetDeclaredField(String)
public Field GetDeclaredField(String arg0)
Parameters
Returns
Exceptions
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
GetDeclaredMethod(String, params Class[])
public Method GetDeclaredMethod(String arg0, params Class[] arg1)
Parameters
Returns
Exceptions
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
GetField(String)
public Field GetField(String arg0)
Parameters
Returns
Exceptions
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
GetMethod(String, params Class[])
public Method GetMethod(String arg0, params Class[] arg1)
Parameters
Returns
Exceptions
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
Returns
GetResource(String)
public URL GetResource(String arg0)
Parameters
Returns
GetResourceAsStream(String)
public InputStream GetResourceAsStream(String arg0)
Parameters
Returns
IsAnnotation()
public bool IsAnnotation()
Returns
IsAnnotationPresent(Class)
public bool IsAnnotationPresent(Class arg0)
Parameters
Returns
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
Returns
Type Parameters
TAnnotation
The Annotation class
IsAnonymousClass()
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#isAnonymousClass()
public bool IsAnonymousClass()
Returns
IsArray()
public bool IsArray()
Returns
IsAssignableFrom(Class)
public bool IsAssignableFrom(Class arg0)
Parameters
Returns
IsEnum()
public bool IsEnum()
Returns
IsInstance(object)
public bool IsInstance(object arg0)
Parameters
Returns
IsInterface()
public bool IsInterface()
Returns
IsLocalClass()
public bool IsLocalClass()
Returns
IsMemberClass()
public bool IsMemberClass()
Returns
IsNestmateOf(Class)
public bool IsNestmateOf(Class arg0)
Parameters
Returns
IsPrimitive()
public bool IsPrimitive()
Returns
IsSynthetic()
public bool IsSynthetic()
Returns
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
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
ClassLoaderThe ClassLoader to be used, default will use SystemClassLoader
Returns
Type Parameters
T
The type implementing MASES.JCOBridge.C2JBridge.IJVMBridgeBase
ToGenericString()
public String ToGenericString()
Returns
Operators
implicit operator Serializable(Class)
Converter from Class to Serializable
public static implicit operator Serializable(Class t)
Parameters
t
Class
Returns
implicit operator AnnotatedElement(Class)
Converter from Class to AnnotatedElement
public static implicit operator AnnotatedElement(Class t)
Parameters
t
Class
Returns
implicit operator GenericDeclaration(Class)
Converter from Class to GenericDeclaration
public static implicit operator GenericDeclaration(Class t)
Parameters
t
Class
Returns
implicit operator Type(Class)
public static implicit operator Type(Class t)
Parameters
t
Class