Package de.gebit.integrity.ui.utils
Class IntegrityDSLUIUtil
- java.lang.Object
-
- de.gebit.integrity.ui.utils.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IntegrityDSLUIUtil.FieldDescription
Encapsulates data about a field in a Java Bean Type.static class
IntegrityDSLUIUtil.ResolvedTypeName
Holds a resolved type name, as returned bygetResolvedTypeName(String, IType)
.
-
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 anIField
by its name in a givenIType
.static org.eclipse.jdt.core.IType
findTypeByName(java.lang.String aFullyQualifiedClassName)
Finds anIType
by its corresponding fully qualified name.static java.util.List<IntegrityDSLUIUtil.FieldDescription>
getAllFields(org.eclipse.jdt.core.IType aType, boolean aFilterSetterlessPrivateFields)
Finds allIField
s in a givenIType
(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.
-
-
-
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 signatureaDeclaringType
- 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 anIType
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 anIField
by its name in a givenIType
.- Parameters:
aType
- the type to search inaFieldName
- 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 allIField
s in a givenIType
(including fields defined in supertypes!).- Parameters:
aType
- the type to search inaFilterSetterlessPrivateFields
- whether setterless private fields shall be filtered out- Returns:
- all fields
- Throws:
org.eclipse.jdt.core.JavaModelException
-
-