Class IntegrityDSLUIUtil


  • public final class IntegrityDSLUIUtil
    extends java.lang.Object
    Utility class providing various helper functions. This one performs Eclipse JDT stuff.
    Author:
    Rene Schneider - initial API and implementation
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.jdt.core.IField findFieldByName​(org.eclipse.jdt.core.IType aType, java.lang.String aFieldName)
      Finds an IField by its name in a given IType.
      static org.eclipse.jdt.core.IType findTypeByName​(java.lang.String aFullyQualifiedClassName)
      Finds an IType by its corresponding fully qualified name.
      static java.util.List<IntegrityDSLUIUtil.FieldDescription> getAllFields​(org.eclipse.jdt.core.IType aType, boolean aFilterSetterlessPrivateFields)
      Finds all IFields in a given IType (including fields defined in supertypes!).
      static IntegrityDSLUIUtil.ResolvedTypeName getResolvedTypeName​(java.lang.String aTypeSignature, org.eclipse.jdt.core.IType aDeclaringType)
      Determines the fully qualified class name from a type signature and a type where that type signature is declared.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getResolvedTypeName

        public static IntegrityDSLUIUtil.ResolvedTypeName getResolvedTypeName​(java.lang.String aTypeSignature,
                                                                              org.eclipse.jdt.core.IType aDeclaringType)
                                                                       throws org.eclipse.jdt.core.JavaModelException
        Determines the fully qualified class name from a type signature and a type where that type signature is declared.
        Parameters:
        aTypeSignature - the type signature
        aDeclaringType - the type in which the type signature was found
        Returns:
        the fully qualified class name, packaged up with generics parameter information
        Throws:
        org.eclipse.jdt.core.JavaModelException
      • findTypeByName

        public static org.eclipse.jdt.core.IType findTypeByName​(java.lang.String aFullyQualifiedClassName)
        Finds an IType by its corresponding fully qualified name.
        Parameters:
        aFullyQualifiedClassName - the fully qualified name
        Returns:
        the type or null if not found
      • findFieldByName

        public static org.eclipse.jdt.core.IField findFieldByName​(org.eclipse.jdt.core.IType aType,
                                                                  java.lang.String aFieldName)
                                                           throws org.eclipse.jdt.core.JavaModelException
        Finds an IField by its name in a given IType.
        Parameters:
        aType - the type to search in
        aFieldName - the field name
        Returns:
        the field or null if not found
        Throws:
        org.eclipse.jdt.core.JavaModelException
      • getAllFields

        public static java.util.List<IntegrityDSLUIUtil.FieldDescription> getAllFields​(org.eclipse.jdt.core.IType aType,
                                                                                       boolean aFilterSetterlessPrivateFields)
                                                                                throws org.eclipse.jdt.core.JavaModelException
        Finds all IFields in a given IType (including fields defined in supertypes!).
        Parameters:
        aType - the type to search in
        aFilterSetterlessPrivateFields - whether setterless private fields shall be filtered out
        Returns:
        all fields
        Throws:
        org.eclipse.jdt.core.JavaModelException