Java Code Examples for javax.tools.JavaFileObject.Kind#equals()
The following examples show how to use
javax.tools.JavaFileObject.Kind#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavaCodeScriptEngine.java From chaosblade-exec-jvm with Apache License 2.0 | 4 votes |
@Override public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; String name = getName(); return kind.equals(getKind()) && (baseName.equals(name) || name.endsWith("/" + baseName)); }
Example 2
Source File: SimpleJavaFileObject.java From jdk1.8-source-analysis with Apache License 2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 3
Source File: SimpleJavaFileObject.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 4
Source File: SimpleJavaFileObject.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 5
Source File: SimpleJavaFileObject.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 6
Source File: SimpleJavaFileObject.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 7
Source File: SimpleJavaFileObject.java From lua-for-android with BSD 3-Clause "New" or "Revised" License | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 8
Source File: SimpleJavaFileObject.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 9
Source File: SimpleJavaFileObject.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 10
Source File: SimpleJavaFileObject.java From Java8CN with Apache License 2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 11
Source File: SimpleJavaFileObject.java From hottub with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 12
Source File: SimpleJavaFileObject.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 13
Source File: SimpleJavaFileObject.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }
Example 14
Source File: SimpleJavaFileObject.java From preferencebinder with Apache License 2.0 | 3 votes |
/** * This implementation compares the path of its URI to the given * simple name. This method returns true if the given kind is * equal to the kind of this object, and if the path is equal to * {@code simpleName + kind.extension} or if it ends with {@code * "/" + simpleName + kind.extension}. * * <p>This method calls {@link #getKind} and {@link #toUri} and * does not access the fields {@link #uri} and {@link #kind} * directly. * * <p>Subclasses can change this behavior as long as the contract * of {@link JavaFileObject} is obeyed. */ public boolean isNameCompatible(String simpleName, Kind kind) { String baseName = simpleName + kind.extension; return kind.equals(getKind()) && (baseName.equals(toUri().getPath()) || toUri().getPath().endsWith("/" + baseName)); }