Package fr.skytasul.reflection.shrieker
Record Class FakeReflectionAccessor.FakeClass
java.lang.Object
java.lang.Record
fr.skytasul.reflection.shrieker.FakeReflectionAccessor.FakeClass
- All Implemented Interfaces:
fr.skytasul.reflection.ReflectionAccessor.ClassAccessor,Type
- Enclosing class:
FakeReflectionAccessor
public static record FakeReflectionAccessor.FakeClass(@NotNull String name, List<FakeReflectionAccessor.FakeClass.FakeField> fields, List<FakeReflectionAccessor.FakeClass.FakeMethod> methods)
extends Record
implements fr.skytasul.reflection.ReflectionAccessor.ClassAccessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic final recordstatic final recordNested classes/interfaces inherited from interface fr.skytasul.reflection.ReflectionAccessor.ClassAccessor
fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.ConstructorAccessor, fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.FieldAccessor, fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.MethodAccessor -
Constructor Summary
ConstructorsConstructorDescriptionFakeClass(@NotNull String name, List<FakeReflectionAccessor.FakeClass.FakeField> fields, List<FakeReflectionAccessor.FakeClass.FakeMethod> methods) Creates an instance of aFakeClassrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.@NotNull Type@NotNull Class<?> @NotNull fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.ConstructorAccessorgetConstructor(@NotNull Type... parameterTypes) @NotNull fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.FieldAccessor@NotNull fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.MethodAccessor@NotNull Stringfinal inthashCode()Returns a hash code value for this object.methods()Returns the value of themethodsrecord component.@NotNull Stringname()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface fr.skytasul.reflection.ReflectionAccessor.ClassAccessor
getConstructorInstance, getFieldInstance, getMethodInstance
-
Constructor Details
-
FakeClass
-
FakeClass
public FakeClass(@NotNull @NotNull String name, List<FakeReflectionAccessor.FakeClass.FakeField> fields, List<FakeReflectionAccessor.FakeClass.FakeMethod> methods) Creates an instance of aFakeClassrecord class.- Parameters:
name- the value for thenamerecord componentfields- the value for thefieldsrecord componentmethods- the value for themethodsrecord component
-
-
Method Details
-
getTypeName
- Specified by:
getTypeNamein interfacefr.skytasul.reflection.ReflectionAccessor.ClassAccessor- Specified by:
getTypeNamein interfaceType
-
getArrayType
- Specified by:
getArrayTypein interfacefr.skytasul.reflection.ReflectionAccessor.ClassAccessor
-
getClassInstance
- Specified by:
getClassInstancein interfacefr.skytasul.reflection.ReflectionAccessor.ClassAccessor- Throws:
ClassNotFoundException
-
getField
@NotNull public @NotNull fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.FieldAccessor getField(@NotNull @NotNull String original) throws NoSuchFieldException - Specified by:
getFieldin interfacefr.skytasul.reflection.ReflectionAccessor.ClassAccessor- Throws:
NoSuchFieldException
-
getMethod
@NotNull public @NotNull fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.MethodAccessor getMethod(@NotNull @NotNull String original, @NotNull @NotNull Type... parameterTypes) throws NoSuchMethodException, ClassNotFoundException - Specified by:
getMethodin interfacefr.skytasul.reflection.ReflectionAccessor.ClassAccessor- Throws:
NoSuchMethodExceptionClassNotFoundException
-
getConstructor
@NotNull public @NotNull fr.skytasul.reflection.ReflectionAccessor.ClassAccessor.ConstructorAccessor getConstructor(@NotNull @NotNull Type... parameterTypes) throws NoSuchMethodException, SecurityException, ClassNotFoundException - Specified by:
getConstructorin interfacefr.skytasul.reflection.ReflectionAccessor.ClassAccessor- Throws:
NoSuchMethodExceptionSecurityExceptionClassNotFoundException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-
methods
Returns the value of themethodsrecord component.- Returns:
- the value of the
methodsrecord component
-