Java源码示例:org.apache.jasper.runtime.JspSourceDependent
示例1
/**
* Get a list of files that the current page has source dependency on.
*/
public java.util.Map<String,Long> getDependants() {
try {
Object target;
if (isTagFile) {
if (reload) {
tagHandlerClass = ctxt.load();
reload = false;
}
target = tagHandlerClass.newInstance();
} else {
target = getServlet();
}
if (target != null && target instanceof JspSourceDependent) {
return ((JspSourceDependent) target).getDependants();
}
} catch (AbstractMethodError ame) {
// Almost certainly a pre Tomcat 7.0.17 compiled JSP using the old
// version of the interface. Force a re-compile.
return ALWAYS_OUTDATED_DEPENDENCIES;
} catch (Throwable ex) {
ExceptionUtils.handleThrowable(ex);
}
return null;
}
示例2
/**
* Get a list of files that the current page has source dependency on.
*/
public java.util.Map<String,Long> getDependants() {
try {
Object target;
if (isTagFile) {
if (reload) {
tagHandlerClass = ctxt.load();
reload = false;
}
target = tagHandlerClass.newInstance();
} else {
target = getServlet();
}
if (target != null && target instanceof JspSourceDependent) {
return ((JspSourceDependent) target).getDependants();
}
} catch (AbstractMethodError ame) {
// Almost certainly a pre Tomcat 7.0.17 compiled JSP using the old
// version of the interface. Force a re-compile.
return ALWAYS_OUTDATED_DEPENDENCIES;
} catch (Throwable ex) {
ExceptionUtils.handleThrowable(ex);
}
return null;
}
示例3
/**
* Get a list of files that the current page has source dependency on.
*/
public java.util.List<String> getDependants() {
try {
Object target;
if (isTagFile) {
if (reload) {
tagHandlerClass = ctxt.load();
}
target = tagHandlerClass.newInstance();
} else {
target = getServlet();
}
if (target != null && target instanceof JspSourceDependent) {
return ((JspSourceDependent) target).getDependants();
}
} catch (Throwable ex) {
}
return null;
}
示例4
/**
* Get a list of files that the current page has source dependency on.
* @return the map of dependent resources
*/
public java.util.Map<String,Long> getDependants() {
try {
Object target;
if (isTagFile) {
if (reload) {
synchronized (this) {
if (reload) {
tagHandlerClass = ctxt.load();
reload = false;
}
}
}
target = tagHandlerClass.getConstructor().newInstance();
} else {
target = getServlet();
}
if (target instanceof JspSourceDependent) {
return ((JspSourceDependent) target).getDependants();
}
} catch (AbstractMethodError ame) {
// Almost certainly a pre Tomcat 7.0.17 compiled JSP using the old
// version of the interface. Force a re-compile.
return ALWAYS_OUTDATED_DEPENDENCIES;
} catch (Throwable ex) {
ExceptionUtils.handleThrowable(ex);
}
return null;
}