Class IntegrityDSLUIUtil


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

      • getResolvedTypeName

        public static IntegrityDSLUIUtil.ResolvedTypeName getResolvedTypeName​(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​(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,
                                                                  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 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