< prev index next > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
Print this page
/*
- * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
import java.lang.annotation.Annotation;
import java.lang.annotation.Inherited;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
- import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.function.Supplier;
import java.util.function.Predicate;
(flags() & STATIC) != 0 ||
(owner.flags() & INTERFACE) != 0 && kind != MTH &&
name != name.table.names._this;
}
+ public boolean isStrict() {
+ return (flags() & STRICT) != 0;
+ }
+
+ public boolean isSynthetic() {
+ return (flags() & SYNTHETIC) != 0;
+ }
+
+ public boolean isStrictInstance() {
+ return (flags() & STRICT) != 0 && (flags() & STATIC) == 0;
+ }
+
public boolean isInterface() {
- return (flags() & INTERFACE) != 0;
+ return (flags_field & INTERFACE) != 0;
}
public boolean isAbstract() {
return (flags_field & ABSTRACT) != 0;
}
public boolean isPrivate() {
return (flags_field & Flags.AccessFlags) == PRIVATE;
}
+ public boolean isValueClass() {
+ return (flags_field & VALUE_CLASS) != 0;
+ }
+
+ public boolean isIdentityClass() {
+ return !isInterface() && (flags_field & IDENTITY_TYPE) != 0;
+ }
+
public boolean isPublic() {
return (flags_field & Flags.AccessFlags) == PUBLIC;
}
public boolean isEnum() {
public ClassSymbol(long flags, Name name, Symbol owner) {
this(
flags,
name,
- new ClassType(Type.noType, null, null),
+ new ClassType(Type.noType, null, null, List.nil()),
owner);
this.type.tsym = this;
}
public void addPermittedSubclass(ClassSymbol csym, int pos) {
< prev index next >