Package io.microsphere.reflect
Class ReflectiveDefinition
- java.lang.Object
-
- io.microsphere.reflect.ReflectiveDefinition
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ClassDefinition
,MemberDefinition
public abstract class ReflectiveDefinition extends java.lang.Object implements java.io.Serializable
The abstract definition class for Java Reflection- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
ClassDefinition
,MemberDefinition
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ClassLoader
classLoader
protected java.lang.String
className
protected Deprecation
deprecation
protected Version
since
-
Constructor Summary
Constructors Constructor Description ReflectiveDefinition(Version since, Deprecation deprecation, java.lang.String className)
ReflectiveDefinition(Version since, java.lang.String className)
ReflectiveDefinition(java.lang.String since, Deprecation deprecation, java.lang.String className)
ReflectiveDefinition(java.lang.String since, java.lang.String className)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getClassName()
Get the name of classDeprecation
getDeprecation()
Get the deprecationjava.lang.Class<?>
getResolvedClass()
Get the resolved classVersion
getSince()
Get the 'since' versionint
hashCode()
boolean
isDeprecated()
Whether the member is deprecatedabstract boolean
isPresent()
Whether the member is presentjava.lang.String
toString()
-
-
-
Field Detail
-
since
@Nonnull protected final Version since
-
deprecation
@Nullable protected final Deprecation deprecation
-
className
@Nonnull protected final java.lang.String className
-
classLoader
@Nullable protected final transient java.lang.ClassLoader classLoader
-
-
Constructor Detail
-
ReflectiveDefinition
public ReflectiveDefinition(@Nonnull java.lang.String since, @Nonnull java.lang.String className)
- Parameters:
since
- the 'since' versionclassName
- the name of class
-
ReflectiveDefinition
public ReflectiveDefinition(@Nonnull java.lang.String since, @Nullable Deprecation deprecation, @Nonnull java.lang.String className)
- Parameters:
since
- the 'since' versiondeprecation
- the deprecationclassName
- the name of class
-
ReflectiveDefinition
public ReflectiveDefinition(@Nonnull Version since, @Nonnull java.lang.String className)
- Parameters:
since
- the 'since' versionclassName
- the name of class
-
ReflectiveDefinition
public ReflectiveDefinition(@Nonnull Version since, @Nullable Deprecation deprecation, @Nonnull java.lang.String className)
- Parameters:
since
- the 'since' versiondeprecation
- the deprecationclassName
- the name of class
-
-
Method Detail
-
getSince
@Nonnull public final Version getSince()
Get the 'since' version- Returns:
- non-null
-
getDeprecation
@Nullable public final Deprecation getDeprecation()
Get the deprecation- Returns:
- nullable
-
getClassName
@Nonnull public final java.lang.String getClassName()
Get the name of class- Returns:
- non-null
-
getResolvedClass
@Nullable public final java.lang.Class<?> getResolvedClass()
Get the resolved class- Returns:
null
if can't be resolved
-
isDeprecated
public final boolean isDeprecated()
Whether the member is deprecated
-
isPresent
public abstract boolean isPresent()
Whether the member is present- Returns:
true
if present
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-