Class FileSuffixes
java.lang.Object
com.ibm.wala.core.util.io.FileSuffixes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Does the file name represent a .dex file?static boolean
isClassFile
(String fileName) Does the file name represent a .class file?static boolean
Does the file name represent a .dex file?static boolean
Does the URI refer to a .dex file?static boolean
Does the file name represent a .jar file?static boolean
isRessourceFromJar
(URI uri) Does the URI point to a ressource in a jar-filestatic boolean
isSourceFile
(String fileName) Does the file name represent a .java file?static boolean
Does the file name represent a .war file?static String
stripSuffix
(String fileName) Strip the ".class" or ".java" suffix from a file name
-
Constructor Details
-
FileSuffixes
public FileSuffixes()
-
-
Method Details
-
isDexFile
Does the URI refer to a .dex file?- Throws:
IllegalArgumentException
- if uri is null
-
isDexFile
Does the file name represent a .dex file?- Parameters:
fileName
- name of a file- Returns:
- boolean
- Throws:
IllegalArgumentException
- if fileName is null
-
isApkFile
Does the file name represent a .dex file?- Parameters:
fileName
- name of a file- Returns:
- boolean
- Throws:
IllegalArgumentException
- if fileName is null
-
isClassFile
Does the file name represent a .class file?- Parameters:
fileName
- name of a file- Returns:
- boolean
- Throws:
IllegalArgumentException
- if fileName is null
-
isSourceFile
Does the file name represent a .java file?- Parameters:
fileName
- name of a file- Returns:
- boolean
- Throws:
IllegalArgumentException
- if fileName is null
-
isJarFile
Does the file name represent a .jar file?- Parameters:
fileName
- name of a file- Returns:
- boolean
- Throws:
IllegalArgumentException
- if fileName is null
-
isWarFile
Does the file name represent a .war file?- Parameters:
fileName
- name of a file- Returns:
- boolean
- Throws:
IllegalArgumentException
- if fileName is null
-
stripSuffix
Strip the ".class" or ".java" suffix from a file nameTODO: generalize for all suffixes
- Parameters:
fileName
- the file name- Throws:
IllegalArgumentException
- if fileName is null
-
isRessourceFromJar
Does the URI point to a ressource in a jar-file
-