Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,113 @@ import SwiftJavaJNICore

@JavaClass("java.lang.reflect.AccessibleObject")
open class AccessibleObject: JavaObject {
/// Java method `setAccessible`.
///
/// ### Java method signature
/// ```java
/// public void java.lang.reflect.AccessibleObject.setAccessible(boolean)
/// ```
@JavaMethod
open func isAnnotationPresent(_ arg0: JavaClass<Annotation>?) -> Bool
open func setAccessible(_ arg0: Bool)

/// Java method `isAnnotationPresent`.
///
/// ### Java method signature
/// ```java
/// public boolean java.lang.reflect.AccessibleObject.isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation>)
/// ```
@JavaMethod
open func getAnnotation(_ arg0: JavaClass<Annotation>?) -> Annotation!
open func isAnnotationPresent(_ arg0: JavaClass<Annotation>?) -> Bool

/// Java method `getAnnotation`.
///
/// ### Java method signature
/// ```java
/// public <T extends java.lang.annotation.Annotation> T java.lang.reflect.AccessibleObject.getAnnotation(java.lang.Class<T>)
/// ```
@JavaMethod(typeErasedResult: "T!")
open func getAnnotation<T: AnyJavaObject>(_ arg0: JavaClass<T>?) -> T!

/// Java method `getAnnotationsByType`.
///
/// ### Java method signature
/// ```java
/// public <T extends java.lang.annotation.Annotation> T[] java.lang.reflect.AccessibleObject.getAnnotationsByType(java.lang.Class<T>)
/// ```
@JavaMethod
open func getAnnotationsByType(_ arg0: JavaClass<Annotation>?) -> [Annotation?]
open func getAnnotationsByType<T: AnyJavaObject>(_ arg0: JavaClass<T>?) -> [T?]

/// Java method `getAnnotations`.
///
/// ### Java method signature
/// ```java
/// public java.lang.annotation.Annotation[] java.lang.reflect.AccessibleObject.getAnnotations()
/// ```
@JavaMethod
open func getAnnotations() -> [Annotation?]

@JavaMethod
open func getDeclaredAnnotation(_ arg0: JavaClass<Annotation>?) -> Annotation!
/// Java method `getDeclaredAnnotation`.
///
/// ### Java method signature
/// ```java
/// public <T extends java.lang.annotation.Annotation> T java.lang.reflect.AccessibleObject.getDeclaredAnnotation(java.lang.Class<T>)
/// ```
@JavaMethod(typeErasedResult: "T!")
open func getDeclaredAnnotation<T: AnyJavaObject>(_ arg0: JavaClass<T>?) -> T!

/// Java method `getDeclaredAnnotationsByType`.
///
/// ### Java method signature
/// ```java
/// public <T extends java.lang.annotation.Annotation> T[] java.lang.reflect.AccessibleObject.getDeclaredAnnotationsByType(java.lang.Class<T>)
/// ```
@JavaMethod
open func getDeclaredAnnotationsByType(_ arg0: JavaClass<Annotation>?) -> [Annotation?]
open func getDeclaredAnnotationsByType<T: AnyJavaObject>(_ arg0: JavaClass<T>?) -> [T?]

/// Java method `getDeclaredAnnotations`.
///
/// ### Java method signature
/// ```java
/// public java.lang.annotation.Annotation[] java.lang.reflect.AccessibleObject.getDeclaredAnnotations()
/// ```
@JavaMethod
open func getDeclaredAnnotations() -> [Annotation?]

@JavaMethod
open func setAccessible(_ arg0: Bool)

/// Java method `trySetAccessible`.
///
/// ### Java method signature
/// ```java
/// public final boolean java.lang.reflect.AccessibleObject.trySetAccessible()
/// ```
@JavaMethod
open func trySetAccessible() -> Bool

/// Java method `canAccess`.
///
/// ### Java method signature
/// ```java
/// public final boolean java.lang.reflect.AccessibleObject.canAccess(java.lang.Object)
/// ```
@JavaMethod
open func canAccess(_ arg0: JavaObject?) -> Bool

/// Java method `isAccessible`.
///
/// ### Java method signature
/// ```java
/// public boolean java.lang.reflect.AccessibleObject.isAccessible()
/// ```
@available(*, deprecated)
@JavaMethod
open func isAccessible() -> Bool
}
extension JavaClass<AccessibleObject> {
/// Java method `setAccessible`.
///
/// ### Java method signature
/// ```java
/// public static void java.lang.reflect.AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[],boolean)
/// ```
@JavaStaticMethod
public func setAccessible(_ arg0: [AccessibleObject?], _ arg1: Bool)
}
161 changes: 143 additions & 18 deletions Sources/JavaStdlib/JavaLangReflect/generated/Constructor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,201 @@ import SwiftJavaJNICore

@JavaClass("java.lang.reflect.Constructor")
open class Constructor<T: AnyJavaObject>: Executable {
/// Java method `getName`.
///
/// ### Java method signature
/// ```java
/// public java.lang.String java.lang.reflect.Constructor.getName()
/// ```
@JavaMethod
open override func getName() -> String

/// Java method `equals`.
///
/// ### Java method signature
/// ```java
/// public boolean java.lang.reflect.Constructor.equals(java.lang.Object)
/// ```
@JavaMethod
open override func equals(_ arg0: JavaObject?) -> Bool

/// Java method `toString`.
///
/// ### Java method signature
/// ```java
/// public java.lang.String java.lang.reflect.Constructor.toString()
/// ```
@JavaMethod
open override func toString() -> String

/// Java method `hashCode`.
///
/// ### Java method signature
/// ```java
/// public int java.lang.reflect.Constructor.hashCode()
/// ```
@JavaMethod
open override func hashCode() -> Int32

/// Java method `getModifiers`.
///
/// ### Java method signature
/// ```java
/// public int java.lang.reflect.Constructor.getModifiers()
/// ```
@JavaMethod
open override func getModifiers() -> Int32

/// Java method `getTypeParameters`.
///
/// ### Java method signature
/// ```java
/// public java.lang.reflect.TypeVariable<java.lang.reflect.Constructor<T>>[] java.lang.reflect.Constructor.getTypeParameters()
/// ```
@JavaMethod
open func getTypeParameters() -> [TypeVariable<Constructor<JavaObject>>?]
open func getTypeParameters() -> [TypeVariable<Constructor<T>>?]

/// Java method `setAccessible`.
///
/// ### Java method signature
/// ```java
/// public void java.lang.reflect.Constructor.setAccessible(boolean)
/// ```
@JavaMethod
open func newInstance(_ arg0: [JavaObject?]) throws -> JavaObject!
open override func setAccessible(_ arg0: Bool)

/// Java method `newInstance`.
///
/// ### Java method signature
/// ```java
/// public T java.lang.reflect.Constructor.newInstance(java.lang.Object...) throws java.lang.InstantiationException,java.lang.IllegalAccessException,java.lang.IllegalArgumentException,java.lang.reflect.InvocationTargetException
/// ```
@JavaMethod(typeErasedResult: "T!")
open func newInstance(_ arg0: [JavaObject?]) throws -> T!

/// Java method `getParameterTypes`.
///
/// ### Java method signature
/// ```java
/// public java.lang.Class<?>[] java.lang.reflect.Constructor.getParameterTypes()
/// ```
@JavaMethod
open override func getParameterTypes() -> [JavaClass<JavaObject>?]

/// Java method `toGenericString`.
///
/// ### Java method signature
/// ```java
/// public java.lang.String java.lang.reflect.Constructor.toGenericString()
/// ```
@JavaMethod
open override func toGenericString() -> String

/// Java method `isSynthetic`.
///
/// ### Java method signature
/// ```java
/// public boolean java.lang.reflect.Constructor.isSynthetic()
/// ```
@JavaMethod
open override func isSynthetic() -> Bool

@JavaMethod
open override func getDeclaringClass() -> JavaClass<JavaObject>!

@JavaMethod
open override func getAnnotation(_ arg0: JavaClass<Annotation>?) -> Annotation!

/// Java method `getDeclaringClass`.
///
/// ### Java method signature
/// ```java
/// public java.lang.Class<T> java.lang.reflect.Constructor.getDeclaringClass()
/// ```
@JavaMethod
open func getDeclaringClass() -> JavaClass<T>!

/// Java method `getAnnotation`.
///
/// ### Java method signature
/// ```java
/// public <T extends java.lang.annotation.Annotation> T java.lang.reflect.Constructor.getAnnotation(java.lang.Class<T>)
/// ```
@JavaMethod(typeErasedResult: "T!")
open override func getAnnotation<T: AnyJavaObject>(_ arg0: JavaClass<T>?) -> T!

/// Java method `getDeclaredAnnotations`.
///
/// ### Java method signature
/// ```java
/// public java.lang.annotation.Annotation[] java.lang.reflect.Constructor.getDeclaredAnnotations()
/// ```
@JavaMethod
open override func getDeclaredAnnotations() -> [Annotation?]

@JavaMethod
open override func setAccessible(_ arg0: Bool)

/// Java method `isVarArgs`.
///
/// ### Java method signature
/// ```java
/// public boolean java.lang.reflect.Constructor.isVarArgs()
/// ```
@JavaMethod
open override func isVarArgs() -> Bool

/// Java method `getParameterCount`.
///
/// ### Java method signature
/// ```java
/// public int java.lang.reflect.Constructor.getParameterCount()
/// ```
@JavaMethod
open override func getParameterCount() -> Int32

/// Java method `getParameterAnnotations`.
///
/// ### Java method signature
/// ```java
/// public java.lang.annotation.Annotation[][] java.lang.reflect.Constructor.getParameterAnnotations()
/// ```
@JavaMethod
open override func getParameterAnnotations() -> [[Annotation?]]

/// Java method `getGenericParameterTypes`.
///
/// ### Java method signature
/// ```java
/// public java.lang.reflect.Type[] java.lang.reflect.Constructor.getGenericParameterTypes()
/// ```
@JavaMethod
open override func getGenericParameterTypes() -> [Type?]

/// Java method `getGenericExceptionTypes`.
///
/// ### Java method signature
/// ```java
/// public java.lang.reflect.Type[] java.lang.reflect.Constructor.getGenericExceptionTypes()
/// ```
@JavaMethod
open override func getGenericExceptionTypes() -> [Type?]

/// Java method `getExceptionTypes`.
///
/// ### Java method signature
/// ```java
/// public java.lang.Class<?>[] java.lang.reflect.Constructor.getExceptionTypes()
/// ```
@JavaMethod
open override func getExceptionTypes() -> [JavaClass<JavaObject>?]

/// Java method `getAnnotatedReturnType`.
///
/// ### Java method signature
/// ```java
/// public java.lang.reflect.AnnotatedType java.lang.reflect.Constructor.getAnnotatedReturnType()
/// ```
@JavaMethod
open override func getAnnotatedReturnType() -> AnnotatedType!

/// Java method `getAnnotatedReceiverType`.
///
/// ### Java method signature
/// ```java
/// public java.lang.reflect.AnnotatedType java.lang.reflect.Constructor.getAnnotatedReceiverType()
/// ```
@JavaMethod
open override func getAnnotatedReceiverType() -> AnnotatedType!
}
extension JavaClass {
@JavaStaticField(isFinal: true)
public var PUBLIC: Int32

@JavaStaticField(isFinal: true)
public var DECLARED: Int32
}
Loading
Loading