All Superinterfaces:
XElement

public interface XClass extends XElement
Since:
4.3
Author:
[email protected]
  • Method Details

    • getFactory

      XTypeFactory getFactory()
    • asClass

      Deprecated.
      This is the only place we can get back the java.lang.Class object and should be used very sparingly. Some implementations can throw UnsupportedOperationException.
      Throws:
      UnsupportedOperationException
    • getSimpleName

      String getSimpleName()
    • getCanonicalName

      String getCanonicalName()
    • getPackageName

      String getPackageName()
    • isPrimitive

      boolean isPrimitive()
    • isEnum

      boolean isEnum()
    • getEnumConstants

      Iterable<? extends XEnumConstant> getEnumConstants()
      Enum constants, for enums only.
    • getEnumConstant

      XEnumConstant getEnumConstant(String name)
    • isArray

      boolean isArray()
    • getComponentType

      XClass getComponentType()
      Array component type, for arrays only.
    • getEnclosingClass

      XClass getEnclosingClass()
    • getSuperclass

      XClass getSuperclass()
    • getInterfaces

      XClass[] getInterfaces()
      Directly implemented interfaces.
    • getGenericInterfaceParameterTypes

      String[] getGenericInterfaceParameterTypes(Class<?> c)
      Gets the actual type params of an interface implemented directly by this class or all its supers.
    • isAssignableTo

      boolean isAssignableTo(XClass c)
    • isAssignableTo

      default boolean isAssignableTo(Class<?> c)
      Should only be used with class literals. Any other type of usage should be considered suspect.
    • getDeclaredConstructor

      XConstructor getDeclaredConstructor(XClass... argTypes)
    • getDeclaredConstructors

      Iterable<? extends XConstructor> getDeclaredConstructors()
    • getDeclaredMethods

      Iterable<? extends XMethod> getDeclaredMethods()
    • getMethod

      XMethod getMethod(String methodName, XClass... argTypes)
    • getDeclaredFields

      Iterable<? extends XField> getDeclaredFields()
    • isLocal

      boolean isLocal()
      Is it a local or anonymous class?
    • isAbstract

      default boolean isAbstract()
    • isInterface

      default boolean isInterface()