ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/el/parser/AstAbstractEmpty.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/el/parser/AstAbstractEmpty.java
Status
scanned
Type
file
Name
AstAbstractEmpty.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2193 (2.1 KB)
MD5
a6c884a105c23489ece448cf2733b5c4
SHA1
538e6fe92406ead8f71966b280d0ca2c9301d2d7
SHA256
46ac84cf8546744ac446615f44b5aa5f1ea35d26028dedaad4c7c6f53705d654
SHA512

      
    
SHA1_git
12b31146d83aee8625f529d6d039c79bd29122bd
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
AstAbstractEmpty.java | 2.1 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Generated By:JJTree: Do not edit this line. AstEmpty.java */ package org.apache.el.parser; import java.util.Collection; import java.util.Map; import jakarta.el.ELException; import org.apache.el.lang.EvaluationContext; public abstract class AstAbstractEmpty extends SimpleNode { private final Boolean RETURN_EMPTY; private final Boolean RETURN_NOT_EMPTY; public AstAbstractEmpty(int id, boolean invert) { super(id); if (invert) { RETURN_EMPTY = Boolean.FALSE; RETURN_NOT_EMPTY = Boolean.TRUE; } else { RETURN_EMPTY = Boolean.TRUE; RETURN_NOT_EMPTY = Boolean.FALSE; } } @Override public Class<?> getType(EvaluationContext ctx) throws ELException { return Boolean.class; } @Override public Object getValue(EvaluationContext ctx) throws ELException { Object obj = this.children[0].getValue(ctx); if (obj == null || obj instanceof String && ((String) obj).isEmpty() || obj instanceof Object[] && ((Object[]) obj).length == 0 || obj instanceof Collection<?> && ((Collection<?>) obj).isEmpty() || obj instanceof Map<?,?> && ((Map<?,?>) obj).isEmpty()) { return RETURN_EMPTY; } return RETURN_NOT_EMPTY; } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
46.48
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9